ASoC: DaVinci: Support Audio on DA830 EVM
authorChaithrika U S <chaithrika@ti.com>
Fri, 7 Aug 2009 14:07:51 +0000 (10:07 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 8 Aug 2009 08:12:54 +0000 (09:12 +0100)
Add support for audio on DA830 EVM- here McASP1 is interfaced to
TLV320AIC3106 codec.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/Kconfig
sound/soc/davinci/Makefile
sound/soc/davinci/davinci-evm.c

index 6802dd5e4731edd9d87d47833bba8996393e9623..677a538148784c05ddc540c9c1c671d7732bbdb5 100644 (file)
@@ -41,3 +41,14 @@ config SND_DAVINCI_SOC_SFFSDR
        help
          Say Y if you want to add support for SoC audio on
          Lyrtech SFFSDR board.
+
+config  SND_DA830_SOC_EVM
+       tristate "SoC Audio support for DA830/OMAPL137 EVM"
+       depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM
+       select SND_DAVINCI_SOC_MCASP
+       select SND_SOC_TLV320AIC3X
+
+       help
+         Say Y if you want to add support for SoC audio on TI
+         DA830/OMAPL137 EVM
+
index 67be54f3a3a5d8c09196a6c922fa9d5cda217fb0..5e2195f80cf153fc6f35f79fb9fd346d64bde767 100644 (file)
@@ -13,4 +13,5 @@ snd-soc-sffsdr-objs := davinci-sffsdr.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
+obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o
index f3bb6f60f205cf97c0af28d1d84d5bf61ad5d34a..a5a92124b6d53b9f3193604c742238c2172f1c32 100644 (file)
@@ -54,6 +54,9 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
        else if (machine_is_davinci_evm())
                sysclk = 12288000;
 
+       else if (machine_is_davinci_da830_evm())
+               sysclk = 24576000;
+
        else
                return -EINVAL;
 
@@ -162,6 +165,14 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = {
                .ops = &evm_ops,
        },
 };
+static struct snd_soc_dai_link da830_evm_dai = {
+       .name = "TLV320AIC3X",
+       .stream_name = "AIC3X",
+       .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_I2S_DAI],
+       .codec_dai = &aic3x_dai,
+       .init = evm_aic3x_init,
+       .ops = &evm_ops,
+};
 
 /* davinci-evm audio machine driver */
 static struct snd_soc_card snd_soc_card_evm = {
@@ -179,6 +190,13 @@ static struct snd_soc_card dm6467_snd_soc_card_evm = {
        .num_links = ARRAY_SIZE(dm6467_evm_dai),
 };
 
+static struct snd_soc_card da830_snd_soc_card = {
+       .name = "DA830 EVM",
+       .dai_link = &da830_evm_dai,
+       .platform = &davinci_soc_platform,
+       .num_links = 1,
+};
+
 /* evm audio private data */
 static struct aic3x_setup_data evm_aic3x_setup = {
        .i2c_bus = 1,
@@ -191,6 +209,11 @@ static struct aic3x_setup_data dm6467_evm_aic3x_setup = {
        .i2c_address = 0x18,
 };
 
+static struct aic3x_setup_data da830_evm_aic3x_setup = {
+       .i2c_bus = 1,
+       .i2c_address = 0x18,
+};
+
 /* evm audio subsystem */
 static struct snd_soc_device evm_snd_devdata = {
        .card = &snd_soc_card_evm,
@@ -205,6 +228,13 @@ static struct snd_soc_device dm6467_evm_snd_devdata = {
        .codec_data = &dm6467_evm_aic3x_setup,
 };
 
+/* evm audio subsystem */
+static struct snd_soc_device da830_evm_snd_devdata = {
+       .card = &da830_snd_soc_card,
+       .codec_dev = &soc_codec_dev_aic3x,
+       .codec_data = &da830_evm_aic3x_setup,
+};
+
 static struct platform_device *evm_snd_device;
 
 static int __init evm_init(void)
@@ -222,6 +252,9 @@ static int __init evm_init(void)
        } else if (machine_is_davinci_dm6467_evm()) {
                evm_snd_dev_data = &dm6467_evm_snd_devdata;
                index = 0;
+       } else if (machine_is_davinci_da830_evm()) {
+               evm_snd_dev_data = &da830_evm_snd_devdata;
+               index = 1;
        } else
                return -EINVAL;