]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: davinci-mcasp: Use dmaengine based platform driver for AM335x/447x
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 16 Jul 2014 12:12:04 +0000 (15:12 +0300)
committerMark Brown <broonie@linaro.org>
Wed, 16 Jul 2014 21:09:13 +0000 (22:09 +0100)
Use the edma-pcm with AM335x and AM437x SoCs.
Keep using the davinci-pcm for daVinci devices, they can be switched to use
the dmaengine based driver later when they are verified to work correctly.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/davinci/Kconfig
sound/soc/davinci/Makefile
sound/soc/davinci/davinci-mcasp.c

index fdbb16fffd303b23c7ff11fefd796b2c92968d11..b310dd3489ac76344beed08793bf4102bdf07860 100644 (file)
@@ -1,12 +1,22 @@
 config SND_DAVINCI_SOC
-       tristate "SoC Audio for TI DAVINCI or AM33XX/AM43XX chips"
-       depends on ARCH_DAVINCI || SOC_AM33XX || SOC_AM43XX
+       tristate "SoC Audio for TI DAVINCI"
+       depends on ARCH_DAVINCI
+
+config SND_EDMA_SOC
+       tristate "SoC Audio for Texas Instruments chips using eDMA (AM33XX/43XX)"
+       depends on SOC_AM33XX || SOC_AM43XX
+       select SND_SOC_GENERIC_DMAENGINE_PCM
+       help
+         Say Y or M here if you want audio support for TI SoC which uses eDMA.
+         The following line of SoCs are supported by this platform driver:
+         - AM335x
+         - AM437x/AM438x
 
 config SND_DAVINCI_SOC_I2S
        tristate
 
 config SND_DAVINCI_SOC_MCASP
-       depends on SND_DAVINCI_SOC || SND_OMAP_SOC
+       depends on SND_DAVINCI_SOC || SND_OMAP_SOC || SND_EDMA_SOC
        tristate
 
 config SND_DAVINCI_SOC_VCIF
@@ -19,7 +29,7 @@ config SND_DAVINCI_SOC_GENERIC_EVM
 
 config SND_AM33XX_SOC_EVM
        tristate "SoC Audio for the AM33XX chip based boards"
-       depends on SND_DAVINCI_SOC && SOC_AM33XX && I2C
+       depends on SND_EDMA_SOC && SOC_AM33XX && I2C
        select SND_DAVINCI_SOC_GENERIC_EVM
        help
          Say Y or M if you want to add support for SoC audio on AM33XX
index 744d4d9a018466c77709a0d18e40afdb26aac063..09bf2ba92d38e3783c8a2b4655c308a54968cc90 100644 (file)
@@ -1,10 +1,12 @@
 # DAVINCI Platform Support
 snd-soc-davinci-objs := davinci-pcm.o
+snd-soc-edma-objs := edma-pcm.o
 snd-soc-davinci-i2s-objs := davinci-i2s.o
 snd-soc-davinci-mcasp-objs:= davinci-mcasp.o
 snd-soc-davinci-vcif-objs:= davinci-vcif.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC) += snd-soc-davinci.o
+obj-$(CONFIG_SND_EDMA_SOC) += snd-soc-edma.o
 obj-$(CONFIG_SND_DAVINCI_SOC_I2S) += snd-soc-davinci-i2s.o
 obj-$(CONFIG_SND_DAVINCI_SOC_MCASP) += snd-soc-davinci-mcasp.o
 obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
index f7dc538679b1d357dc4570df2aeb098cc9696360..02421d4275f51a484d23f77016bc0c146b831abe 100644 (file)
@@ -37,6 +37,7 @@
 #include <sound/omap-pcm.h>
 
 #include "davinci-pcm.h"
+#include "edma-pcm.h"
 #include "davinci-mcasp.h"
 
 #define MCASP_MAX_AFIFO_DEPTH  64
@@ -831,7 +832,7 @@ static int davinci_mcasp_dai_probe(struct snd_soc_dai *dai)
 {
        struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
 
-       if (mcasp->version == MCASP_VERSION_4) {
+       if (mcasp->version >= MCASP_VERSION_3) {
                /* Using dmaengine PCM */
                dai->playback_dma_data =
                                &mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK];
@@ -1281,10 +1282,16 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
         IS_MODULE(CONFIG_SND_DAVINCI_SOC))
        case MCASP_VERSION_1:
        case MCASP_VERSION_2:
-       case MCASP_VERSION_3:
                ret = davinci_soc_platform_register(&pdev->dev);
                break;
 #endif
+#if IS_BUILTIN(CONFIG_SND_EDMA_SOC) || \
+       (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
+        IS_MODULE(CONFIG_SND_EDMA_SOC))
+       case MCASP_VERSION_3:
+               ret = edma_pcm_platform_register(&pdev->dev);
+               break;
+#endif
 #if IS_BUILTIN(CONFIG_SND_OMAP_SOC) || \
        (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
         IS_MODULE(CONFIG_SND_OMAP_SOC))