aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMiguel Aguilar <miguel.aguilar@ridgerun.com>2010-03-11 10:33:40 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-12 06:12:24 -0500
commitaa9b88ee80d3985ebae9567a8f4e0d07ce15b5a7 (patch)
treee7f21d75bfeabafebe2ef6a8ab0447559939fec2 /sound
parentb56e972b75a945e97818437720551859c7ef2d53 (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')
-rw-r--r--sound/soc/davinci/Kconfig24
-rw-r--r--sound/soc/davinci/davinci-evm.c45
2 files changed, 65 insertions, 4 deletions
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
index 47e7ccecc57..6bbf001f659 100644
--- a/sound/soc/davinci/Kconfig
+++ b/sound/soc/davinci/Kconfig
@@ -18,12 +18,32 @@ config SND_DAVINCI_SOC_VCIF
18config SND_DAVINCI_SOC_EVM 18config SND_DAVINCI_SOC_EVM
19 tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM" 19 tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
20 depends on SND_DAVINCI_SOC 20 depends on SND_DAVINCI_SOC
21 depends on MACH_DAVINCI_EVM || MACH_DAVINCI_DM355_EVM || MACH_DAVINCI_DM365_EVM 21 depends on MACH_DAVINCI_EVM || MACH_DAVINCI_DM355_EVM || MACH_DAVINCI_DM365_EVM
22 select SND_DAVINCI_SOC_I2S 22 select SND_DAVINCI_SOC_I2S
23 select SND_SOC_TLV320AIC3X 23 select SND_SOC_TLV320AIC3X
24 help 24 help
25 Say Y if you want to add support for SoC audio on TI 25 Say Y if you want to add support for SoC audio on TI
26 DaVinci DM6446 or DM355 EVM platforms. 26 DaVinci DM6446, DM355 or DM365 EVM platforms.
27
28choice
29 prompt "DM365 codec select"
30 depends on SND_DAVINCI_SOC_EVM
31 depends on MACH_DAVINCI_DM365_EVM
32 default SND_DM365_EXTERNAL_CODEC
33
34config SND_DM365_AIC3X_CODEC
35 bool "Audio Codec - AIC3101"
36 help
37 Say Y if you want to add support for AIC3101 audio codec
38
39config SND_DM365_VOICE_CODEC
40 bool "Voice Codec - CQ93VC"
41 select MFD_DAVINCI_VOICECODEC
42 select SND_DAVINCI_SOC_VCIF
43 select SND_SOC_CQ0093VC
44 help
45 Say Y if you want to add support for SoC On-chip voice codec
46endchoice
27 47
28config SND_DM6467_SOC_EVM 48config SND_DM6467_SOC_EVM
29 tristate "SoC Audio support for DaVinci DM6467 EVM" 49 tristate "SoC Audio support for DaVinci DM6467 EVM"
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index dba6651547c..97f74d6a33e 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
170static 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
168static struct snd_soc_dai_link dm6467_evm_dai[] = { 186static 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 */
195static struct snd_soc_card snd_soc_card_evm = { 213static 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 */
221static 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 */
203static struct snd_soc_card dm6467_snd_soc_card_evm = { 230static 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 */
261static 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 */
234static struct snd_soc_device dm6467_evm_snd_devdata = { 272static 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;