diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-07-16 14:12:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-16 23:09:13 +0200 |
commit | f3f9cfa8a1a78a3bc0dc6b7d5c26baeb07a75499 (patch) | |
tree | ed5508d41af61f9b9dc5e36310fa998fd7296a6c /sound/soc/davinci/davinci-mcasp.c | |
parent | ASoC: edma-pcm: Add empty functions for !CONFIG_SND_EDMA_SOC builds (diff) | |
download | linux-f3f9cfa8a1a78a3bc0dc6b7d5c26baeb07a75499.tar.xz linux-f3f9cfa8a1a78a3bc0dc6b7d5c26baeb07a75499.zip |
ASoC: davinci-mcasp: Use dmaengine based platform driver for AM335x/447x
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>
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index f7dc538679b1..02421d4275f5 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -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)) |