aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-evm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/davinci/davinci-evm.c')
-rw-r--r--sound/soc/davinci/davinci-evm.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index f3bb6f60f205..a5a92124b6d5 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -54,6 +54,9 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
54 else if (machine_is_davinci_evm()) 54 else if (machine_is_davinci_evm())
55 sysclk = 12288000; 55 sysclk = 12288000;
56 56
57 else if (machine_is_davinci_da830_evm())
58 sysclk = 24576000;
59
57 else 60 else
58 return -EINVAL; 61 return -EINVAL;
59 62
@@ -162,6 +165,14 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = {
162 .ops = &evm_ops, 165 .ops = &evm_ops,
163 }, 166 },
164}; 167};
168static struct snd_soc_dai_link da830_evm_dai = {
169 .name = "TLV320AIC3X",
170 .stream_name = "AIC3X",
171 .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_I2S_DAI],
172 .codec_dai = &aic3x_dai,
173 .init = evm_aic3x_init,
174 .ops = &evm_ops,
175};
165 176
166/* davinci-evm audio machine driver */ 177/* davinci-evm audio machine driver */
167static struct snd_soc_card snd_soc_card_evm = { 178static struct snd_soc_card snd_soc_card_evm = {
@@ -179,6 +190,13 @@ static struct snd_soc_card dm6467_snd_soc_card_evm = {
179 .num_links = ARRAY_SIZE(dm6467_evm_dai), 190 .num_links = ARRAY_SIZE(dm6467_evm_dai),
180}; 191};
181 192
193static struct snd_soc_card da830_snd_soc_card = {
194 .name = "DA830 EVM",
195 .dai_link = &da830_evm_dai,
196 .platform = &davinci_soc_platform,
197 .num_links = 1,
198};
199
182/* evm audio private data */ 200/* evm audio private data */
183static struct aic3x_setup_data evm_aic3x_setup = { 201static struct aic3x_setup_data evm_aic3x_setup = {
184 .i2c_bus = 1, 202 .i2c_bus = 1,
@@ -191,6 +209,11 @@ static struct aic3x_setup_data dm6467_evm_aic3x_setup = {
191 .i2c_address = 0x18, 209 .i2c_address = 0x18,
192}; 210};
193 211
212static struct aic3x_setup_data da830_evm_aic3x_setup = {
213 .i2c_bus = 1,
214 .i2c_address = 0x18,
215};
216
194/* evm audio subsystem */ 217/* evm audio subsystem */
195static struct snd_soc_device evm_snd_devdata = { 218static struct snd_soc_device evm_snd_devdata = {
196 .card = &snd_soc_card_evm, 219 .card = &snd_soc_card_evm,
@@ -205,6 +228,13 @@ static struct snd_soc_device dm6467_evm_snd_devdata = {
205 .codec_data = &dm6467_evm_aic3x_setup, 228 .codec_data = &dm6467_evm_aic3x_setup,
206}; 229};
207 230
231/* evm audio subsystem */
232static struct snd_soc_device da830_evm_snd_devdata = {
233 .card = &da830_snd_soc_card,
234 .codec_dev = &soc_codec_dev_aic3x,
235 .codec_data = &da830_evm_aic3x_setup,
236};
237
208static struct platform_device *evm_snd_device; 238static struct platform_device *evm_snd_device;
209 239
210static int __init evm_init(void) 240static int __init evm_init(void)
@@ -222,6 +252,9 @@ static int __init evm_init(void)
222 } else if (machine_is_davinci_dm6467_evm()) { 252 } else if (machine_is_davinci_dm6467_evm()) {
223 evm_snd_dev_data = &dm6467_evm_snd_devdata; 253 evm_snd_dev_data = &dm6467_evm_snd_devdata;
224 index = 0; 254 index = 0;
255 } else if (machine_is_davinci_da830_evm()) {
256 evm_snd_dev_data = &da830_evm_snd_devdata;
257 index = 1;
225 } else 258 } else
226 return -EINVAL; 259 return -EINVAL;
227 260