diff options
-rw-r--r-- | sound/soc/davinci/Kconfig | 11 | ||||
-rw-r--r-- | sound/soc/davinci/Makefile | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 33 |
3 files changed, 45 insertions, 0 deletions
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig index 6802dd5e4731..677a53814878 100644 --- a/sound/soc/davinci/Kconfig +++ b/sound/soc/davinci/Kconfig | |||
@@ -41,3 +41,14 @@ config SND_DAVINCI_SOC_SFFSDR | |||
41 | help | 41 | help |
42 | Say Y if you want to add support for SoC audio on | 42 | Say Y if you want to add support for SoC audio on |
43 | Lyrtech SFFSDR board. | 43 | Lyrtech SFFSDR board. |
44 | |||
45 | config SND_DA830_SOC_EVM | ||
46 | tristate "SoC Audio support for DA830/OMAPL137 EVM" | ||
47 | depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM | ||
48 | select SND_DAVINCI_SOC_MCASP | ||
49 | select SND_SOC_TLV320AIC3X | ||
50 | |||
51 | help | ||
52 | Say Y if you want to add support for SoC audio on TI | ||
53 | DA830/OMAPL137 EVM | ||
54 | |||
diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile index 67be54f3a3a5..5e2195f80cf1 100644 --- a/sound/soc/davinci/Makefile +++ b/sound/soc/davinci/Makefile | |||
@@ -13,4 +13,5 @@ snd-soc-sffsdr-objs := davinci-sffsdr.o | |||
13 | 13 | ||
14 | obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o | 14 | obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o |
15 | obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o | 15 | obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o |
16 | obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o | ||
16 | obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o | 17 | obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o |
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 | }; |
168 | static 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 */ |
167 | static struct snd_soc_card snd_soc_card_evm = { | 178 | static 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 | ||
193 | static 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 */ |
183 | static struct aic3x_setup_data evm_aic3x_setup = { | 201 | static 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 | ||
212 | static 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 */ |
195 | static struct snd_soc_device evm_snd_devdata = { | 218 | static 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 */ | ||
232 | static 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 | |||
208 | static struct platform_device *evm_snd_device; | 238 | static struct platform_device *evm_snd_device; |
209 | 239 | ||
210 | static int __init evm_init(void) | 240 | static 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 | ||