diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-08-11 16:59:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-13 17:19:36 -0400 |
commit | 30230f4cd7c002a40c13758d12c1c6d96100461d (patch) | |
tree | 6097df1fa3a001271413a6e6455783a38576a5c7 /sound/soc/davinci | |
parent | 517ee6cf699967b421bcf8967e7bbeb3c45ded1a (diff) |
ASoC: DaVinci: Add audio support fot DA850/OMAP-L138 EVM
There is one instance of McASP on DA850/OMAP-L138 SoC. This is
connected to TLV320AIC3106 codec for audio playback and capture.
This patch adds audio support on this platform. Some of the
structure prefix names which are common for DA830/OMAP-L137 EVM and
DA850/OMAP-L138 EVM have been renamed to da8xx from da830.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci')
-rw-r--r-- | sound/soc/davinci/Kconfig | 13 | ||||
-rw-r--r-- | sound/soc/davinci/Makefile | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 29 |
3 files changed, 35 insertions, 8 deletions
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig index 677a53814878..4dfd4ad9d90e 100644 --- a/sound/soc/davinci/Kconfig +++ b/sound/soc/davinci/Kconfig | |||
@@ -43,12 +43,21 @@ config SND_DAVINCI_SOC_SFFSDR | |||
43 | Lyrtech SFFSDR board. | 43 | Lyrtech SFFSDR board. |
44 | 44 | ||
45 | config SND_DA830_SOC_EVM | 45 | config SND_DA830_SOC_EVM |
46 | tristate "SoC Audio support for DA830/OMAPL137 EVM" | 46 | tristate "SoC Audio support for DA830/OMAP-L137 EVM" |
47 | depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM | 47 | depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM |
48 | select SND_DAVINCI_SOC_MCASP | 48 | select SND_DAVINCI_SOC_MCASP |
49 | select SND_SOC_TLV320AIC3X | 49 | select SND_SOC_TLV320AIC3X |
50 | 50 | ||
51 | help | 51 | help |
52 | Say Y if you want to add support for SoC audio on TI | 52 | Say Y if you want to add support for SoC audio on TI |
53 | DA830/OMAPL137 EVM | 53 | DA830/OMAP-L137 EVM |
54 | |||
55 | config SND_DA850_SOC_EVM | ||
56 | tristate "SoC Audio support for DA850/OMAP-L138 EVM" | ||
57 | depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA850_EVM | ||
58 | select SND_DAVINCI_SOC_MCASP | ||
59 | select SND_SOC_TLV320AIC3X | ||
60 | help | ||
61 | Say Y if you want to add support for SoC audio on TI | ||
62 | DA850/OMAP-L138 EVM | ||
54 | 63 | ||
diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile index 5e2195f80cf1..a6939d71b988 100644 --- a/sound/soc/davinci/Makefile +++ b/sound/soc/davinci/Makefile | |||
@@ -14,4 +14,5 @@ snd-soc-sffsdr-objs := davinci-sffsdr.o | |||
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_DA830_SOC_EVM) += snd-soc-evm.o |
17 | obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o | ||
17 | obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o | 18 | 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 a5a92124b6d5..46c1b0cb1d1b 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -54,7 +54,8 @@ 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()) | 57 | else if (machine_is_davinci_da830_evm() || |
58 | machine_is_davinci_da850_evm()) | ||
58 | sysclk = 24576000; | 59 | sysclk = 24576000; |
59 | 60 | ||
60 | else | 61 | else |
@@ -165,7 +166,7 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = { | |||
165 | .ops = &evm_ops, | 166 | .ops = &evm_ops, |
166 | }, | 167 | }, |
167 | }; | 168 | }; |
168 | static struct snd_soc_dai_link da830_evm_dai = { | 169 | static struct snd_soc_dai_link da8xx_evm_dai = { |
169 | .name = "TLV320AIC3X", | 170 | .name = "TLV320AIC3X", |
170 | .stream_name = "AIC3X", | 171 | .stream_name = "AIC3X", |
171 | .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_I2S_DAI], | 172 | .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_I2S_DAI], |
@@ -191,8 +192,15 @@ static struct snd_soc_card dm6467_snd_soc_card_evm = { | |||
191 | }; | 192 | }; |
192 | 193 | ||
193 | static struct snd_soc_card da830_snd_soc_card = { | 194 | static struct snd_soc_card da830_snd_soc_card = { |
194 | .name = "DA830 EVM", | 195 | .name = "DA830/OMAP-L137 EVM", |
195 | .dai_link = &da830_evm_dai, | 196 | .dai_link = &da8xx_evm_dai, |
197 | .platform = &davinci_soc_platform, | ||
198 | .num_links = 1, | ||
199 | }; | ||
200 | |||
201 | static struct snd_soc_card da850_snd_soc_card = { | ||
202 | .name = "DA850/OMAP-L138 EVM", | ||
203 | .dai_link = &da8xx_evm_dai, | ||
196 | .platform = &davinci_soc_platform, | 204 | .platform = &davinci_soc_platform, |
197 | .num_links = 1, | 205 | .num_links = 1, |
198 | }; | 206 | }; |
@@ -209,7 +217,7 @@ static struct aic3x_setup_data dm6467_evm_aic3x_setup = { | |||
209 | .i2c_address = 0x18, | 217 | .i2c_address = 0x18, |
210 | }; | 218 | }; |
211 | 219 | ||
212 | static struct aic3x_setup_data da830_evm_aic3x_setup = { | 220 | static struct aic3x_setup_data da8xx_evm_aic3x_setup = { |
213 | .i2c_bus = 1, | 221 | .i2c_bus = 1, |
214 | .i2c_address = 0x18, | 222 | .i2c_address = 0x18, |
215 | }; | 223 | }; |
@@ -232,7 +240,13 @@ static struct snd_soc_device dm6467_evm_snd_devdata = { | |||
232 | static struct snd_soc_device da830_evm_snd_devdata = { | 240 | static struct snd_soc_device da830_evm_snd_devdata = { |
233 | .card = &da830_snd_soc_card, | 241 | .card = &da830_snd_soc_card, |
234 | .codec_dev = &soc_codec_dev_aic3x, | 242 | .codec_dev = &soc_codec_dev_aic3x, |
235 | .codec_data = &da830_evm_aic3x_setup, | 243 | .codec_data = &da8xx_evm_aic3x_setup, |
244 | }; | ||
245 | |||
246 | static struct snd_soc_device da850_evm_snd_devdata = { | ||
247 | .card = &da850_snd_soc_card, | ||
248 | .codec_dev = &soc_codec_dev_aic3x, | ||
249 | .codec_data = &da8xx_evm_aic3x_setup, | ||
236 | }; | 250 | }; |
237 | 251 | ||
238 | static struct platform_device *evm_snd_device; | 252 | static struct platform_device *evm_snd_device; |
@@ -255,6 +269,9 @@ static int __init evm_init(void) | |||
255 | } else if (machine_is_davinci_da830_evm()) { | 269 | } else if (machine_is_davinci_da830_evm()) { |
256 | evm_snd_dev_data = &da830_evm_snd_devdata; | 270 | evm_snd_dev_data = &da830_evm_snd_devdata; |
257 | index = 1; | 271 | index = 1; |
272 | } else if (machine_is_davinci_da850_evm()) { | ||
273 | evm_snd_dev_data = &da850_evm_snd_devdata; | ||
274 | index = 0; | ||
258 | } else | 275 | } else |
259 | return -EINVAL; | 276 | return -EINVAL; |
260 | 277 | ||