@@ -482,7 +482,11 @@ static __init void dm365_evm_init(void)
/* maybe setup mmc1/etc ... _after_ mmc0 */
evm_init_cpld();
+#if defined(CONFIG_SND_DM365_EXTERNAL_CODEC)
dm365_init_asp(&dm365_evm_snd_data);
+#elif defined(CONFIG_SND_DM365_INTERNAL_CODEC)
+ dm365_init_vcif(&dm365_evm_snd_data);
+#endif
}
static __init void dm365_evm_irq_init(void)
@@ -28,9 +28,11 @@
#include <mach/mux.h>
#include "../codecs/tlv320aic3x.h"
+#include "../codecs/cq93vc.h"
#include "../codecs/spdif_transciever.h"
#include "davinci-pcm.h"
#include "davinci-i2s.h"
+#include "davinci-vcif.h"
#include "davinci-mcasp.h"
#define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
@@ -151,6 +153,15 @@ static struct snd_soc_dai_link evm_dai = {
.ops = &evm_ops,
};
+#ifdef CONFIG_SND_DM365_INTERNAL_CODEC
+static struct snd_soc_dai_link cq93vc_evm_dai = {
+ .name = "CQ93VC",
+ .stream_name = "CQ93",
+ .cpu_dai = &davinci_vcif_dai,
+ .codec_dai = &cq93vc_dai,
+};
+#endif
+
static struct snd_soc_dai_link dm6467_evm_dai[] = {
{
.name = "TLV320AIC3X",
@@ -177,7 +188,7 @@ static struct snd_soc_dai_link da8xx_evm_dai = {
.ops = &evm_ops,
};
-/* davinci dm6446, dm355 or dm365 evm audio machine driver */
+/* davinci dm6446, dm355 evm audio machine driver */
static struct snd_soc_card snd_soc_card_evm = {
.name = "DaVinci EVM",
.platform = &davinci_soc_platform,
@@ -185,6 +196,19 @@ static struct snd_soc_card snd_soc_card_evm = {
.num_links = 1,
};
+/* davinci dm365 evm audio machine driver external or internal */
+static struct snd_soc_card dm365_snd_soc_card_evm = {
+#if defined(CONFIG_SND_DM365_EXTERNAL_CODEC)
+ .name = "DaVinci DM365 EVM",
+ .dai_link = &evm_dai,
+#elif defined(CONFIG_SND_DM365_INTERNAL_CODEC)
+ .name = "On-chip Voice Codec",
+ .dai_link = &cq93vc_evm_dai,
+#endif
+ .platform = &davinci_soc_platform,
+ .num_links = 1,
+};
+
/* davinci dm6467 evm audio machine driver */
static struct snd_soc_card dm6467_snd_soc_card_evm = {
.name = "DaVinci DM6467 EVM",
@@ -217,6 +241,17 @@ static struct snd_soc_device evm_snd_devdata = {
};
/* evm audio subsystem */
+static struct snd_soc_device dm365_evm_snd_devdata = {
+ .card = &dm365_snd_soc_card_evm,
+#if defined(CONFIG_SND_DM365_EXTERNAL_CODEC)
+ .codec_dev = &soc_codec_dev_aic3x,
+ .codec_data = &aic3x_setup,
+#elif defined(CONFIG_SND_DM365_INTERNAL_CODEC)
+ .codec_dev = &soc_codec_dev_cq93vc,
+#endif
+};
+
+/* evm audio subsystem */
static struct snd_soc_device dm6467_evm_snd_devdata = {
.card = &dm6467_snd_soc_card_evm,
.codec_dev = &soc_codec_dev_aic3x,
@@ -244,12 +279,15 @@ static int __init evm_init(void)
int index;
int ret;
- if (machine_is_davinci_evm() || machine_is_davinci_dm365_evm()) {
+ if (machine_is_davinci_evm()) {
evm_snd_dev_data = &evm_snd_devdata;
index = 0;
} else if (machine_is_davinci_dm355_evm()) {
evm_snd_dev_data = &evm_snd_devdata;
index = 1;
+ } else if (machine_is_davinci_dm365_evm()) {
+ evm_snd_dev_data = &dm365_evm_snd_devdata;
+ index = 0;
} else if (machine_is_davinci_dm6467_evm()) {
evm_snd_dev_data = &dm6467_evm_snd_devdata;
index = 0;