diff options
author | Miguel Aguilar <miguel.aguilar@ridgerun.com> | 2010-03-11 10:33:40 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-12 06:12:24 -0500 |
commit | aa9b88ee80d3985ebae9567a8f4e0d07ce15b5a7 (patch) | |
tree | e7f21d75bfeabafebe2ef6a8ab0447559939fec2 /sound/soc/davinci/davinci-evm.c | |
parent | b56e972b75a945e97818437720551859c7ef2d53 (diff) |
DaVinci: DM365: Voice Codec support for the DM365 EVM
The DM365 EVM has two codecs: the Audio Codec (AIC3x) and the Voice Codec,
the idea is to have both enabled in the same kernel simultaneously. However,
the current soc-core doesn't support simultaneous codecs, once that
support will have added, a patch will be posted to enable both codecs in
the DM365 EVM.
Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-evm.c')
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index dba6651547c1..97f74d6a33e6 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -28,10 +28,12 @@ | |||
28 | #include <mach/mux.h> | 28 | #include <mach/mux.h> |
29 | 29 | ||
30 | #include "../codecs/tlv320aic3x.h" | 30 | #include "../codecs/tlv320aic3x.h" |
31 | #include "../codecs/cq93vc.h" | ||
31 | #include "../codecs/spdif_transciever.h" | 32 | #include "../codecs/spdif_transciever.h" |
32 | #include "davinci-pcm.h" | 33 | #include "davinci-pcm.h" |
33 | #include "davinci-i2s.h" | 34 | #include "davinci-i2s.h" |
34 | #include "davinci-mcasp.h" | 35 | #include "davinci-mcasp.h" |
36 | #include "davinci-vcif.h" | ||
35 | 37 | ||
36 | #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \ | 38 | #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \ |
37 | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF) | 39 | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF) |
@@ -165,6 +167,22 @@ static struct snd_soc_dai_link evm_dai = { | |||
165 | .ops = &evm_ops, | 167 | .ops = &evm_ops, |
166 | }; | 168 | }; |
167 | 169 | ||
170 | static struct snd_soc_dai_link dm365_evm_dai = { | ||
171 | #ifdef CONFIG_SND_DM365_AIC3X_CODEC | ||
172 | .name = "TLV320AIC3X", | ||
173 | .stream_name = "AIC3X", | ||
174 | .cpu_dai = &davinci_i2s_dai, | ||
175 | .codec_dai = &aic3x_dai, | ||
176 | .init = evm_aic3x_init, | ||
177 | .ops = &evm_ops, | ||
178 | #elif defined(CONFIG_SND_DM365_VOICE_CODEC) | ||
179 | .name = "Voice Codec - CQ93VC", | ||
180 | .stream_name = "CQ93", | ||
181 | .cpu_dai = &davinci_vcif_dai, | ||
182 | .codec_dai = &cq93vc_dai, | ||
183 | #endif | ||
184 | }; | ||
185 | |||
168 | static struct snd_soc_dai_link dm6467_evm_dai[] = { | 186 | static struct snd_soc_dai_link dm6467_evm_dai[] = { |
169 | { | 187 | { |
170 | .name = "TLV320AIC3X", | 188 | .name = "TLV320AIC3X", |
@@ -191,7 +209,7 @@ static struct snd_soc_dai_link da8xx_evm_dai = { | |||
191 | .ops = &evm_ops, | 209 | .ops = &evm_ops, |
192 | }; | 210 | }; |
193 | 211 | ||
194 | /* davinci dm6446, dm355 or dm365 evm audio machine driver */ | 212 | /* davinci dm6446, dm355 evm audio machine driver */ |
195 | static struct snd_soc_card snd_soc_card_evm = { | 213 | static struct snd_soc_card snd_soc_card_evm = { |
196 | .name = "DaVinci EVM", | 214 | .name = "DaVinci EVM", |
197 | .platform = &davinci_soc_platform, | 215 | .platform = &davinci_soc_platform, |
@@ -199,6 +217,15 @@ static struct snd_soc_card snd_soc_card_evm = { | |||
199 | .num_links = 1, | 217 | .num_links = 1, |
200 | }; | 218 | }; |
201 | 219 | ||
220 | /* davinci dm365 evm audio machine driver */ | ||
221 | static struct snd_soc_card dm365_snd_soc_card_evm = { | ||
222 | .name = "DaVinci DM365 EVM", | ||
223 | .platform = &davinci_soc_platform, | ||
224 | .dai_link = &dm365_evm_dai, | ||
225 | .num_links = 1, | ||
226 | }; | ||
227 | |||
228 | |||
202 | /* davinci dm6467 evm audio machine driver */ | 229 | /* davinci dm6467 evm audio machine driver */ |
203 | static struct snd_soc_card dm6467_snd_soc_card_evm = { | 230 | static struct snd_soc_card dm6467_snd_soc_card_evm = { |
204 | .name = "DaVinci DM6467 EVM", | 231 | .name = "DaVinci DM6467 EVM", |
@@ -231,6 +258,17 @@ static struct snd_soc_device evm_snd_devdata = { | |||
231 | }; | 258 | }; |
232 | 259 | ||
233 | /* evm audio subsystem */ | 260 | /* evm audio subsystem */ |
261 | static struct snd_soc_device dm365_evm_snd_devdata = { | ||
262 | .card = &dm365_snd_soc_card_evm, | ||
263 | #ifdef CONFIG_SND_DM365_AIC3X_CODEC | ||
264 | .codec_dev = &soc_codec_dev_aic3x, | ||
265 | .codec_data = &aic3x_setup, | ||
266 | #elif defined(CONFIG_SND_DM365_VOICE_CODEC) | ||
267 | .codec_dev = &soc_codec_dev_cq93vc, | ||
268 | #endif | ||
269 | }; | ||
270 | |||
271 | /* evm audio subsystem */ | ||
234 | static struct snd_soc_device dm6467_evm_snd_devdata = { | 272 | static struct snd_soc_device dm6467_evm_snd_devdata = { |
235 | .card = &dm6467_snd_soc_card_evm, | 273 | .card = &dm6467_snd_soc_card_evm, |
236 | .codec_dev = &soc_codec_dev_aic3x, | 274 | .codec_dev = &soc_codec_dev_aic3x, |
@@ -258,12 +296,15 @@ static int __init evm_init(void) | |||
258 | int index; | 296 | int index; |
259 | int ret; | 297 | int ret; |
260 | 298 | ||
261 | if (machine_is_davinci_evm() || machine_is_davinci_dm365_evm()) { | 299 | if (machine_is_davinci_evm()) { |
262 | evm_snd_dev_data = &evm_snd_devdata; | 300 | evm_snd_dev_data = &evm_snd_devdata; |
263 | index = 0; | 301 | index = 0; |
264 | } else if (machine_is_davinci_dm355_evm()) { | 302 | } else if (machine_is_davinci_dm355_evm()) { |
265 | evm_snd_dev_data = &evm_snd_devdata; | 303 | evm_snd_dev_data = &evm_snd_devdata; |
266 | index = 1; | 304 | index = 1; |
305 | } else if (machine_is_davinci_dm365_evm()) { | ||
306 | evm_snd_dev_data = &dm365_evm_snd_devdata; | ||
307 | index = 0; | ||
267 | } else if (machine_is_davinci_dm6467_evm()) { | 308 | } else if (machine_is_davinci_dm6467_evm()) { |
268 | evm_snd_dev_data = &dm6467_evm_snd_devdata; | 309 | evm_snd_dev_data = &dm6467_evm_snd_devdata; |
269 | index = 0; | 310 | index = 0; |