]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: samsung: s3c24xx dmaengine follow-up
authorArnd Bergmann <arnd@arndb.de>
Fri, 11 Jul 2014 13:45:07 +0000 (15:45 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 14 Jul 2014 18:53:10 +0000 (19:53 +0100)
Commit ae602456e83c92 ("ASoC: samsung: drop support for legacy
S3C24XX DMA API") removed the old code for the samsung specific
DMA interfaces, now that everybody can use dmaengine.

This picks up the few remaining pieces left over by that patch:

The most important one is the removal of the dma_data->ops->started()
calls in ac97. My understanding is that these are only required
for drivers that do not support cyclic transfers, which the new dma
engine driver now does, so we can simply remove them. This would also
fix at least one bug in the ac97 driver on newer machines, which
currently gives us a NULL pointer dereference from trying to call
dma_data->ops->started().

Further, we must no longer 'select' S3C2410_DMA, which conflicts
with the dmaengine driver. The SND_S3C_DMA symbol is now
useless, because it is always selected, so we can remove it
and build the dmaengine support unconditionally.

Finally, we should not 'select' S3C24XX_DMAC or S3C64XX_PL080,
which may have additional dependencies. This replaces it with
'depends on', to be more conservative.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/Kconfig
sound/soc/samsung/Makefile
sound/soc/samsung/ac97.c

index 91ee5023668b7f83cbd9ba5f11e1c04aed2a8abe..55a38697443de16947133f739c6aeb9bc8632ba8 100644 (file)
@@ -1,18 +1,14 @@
 config SND_SOC_SAMSUNG
        tristate "ASoC support for Samsung"
        depends on PLAT_SAMSUNG
-       select S3C24XX_DMAC if ARCH_S3C24XX
-       select S3C64XX_PL080 if ARCH_S3C64XX
-       select SND_S3C_DMA
+       depends on S3C64XX_PL080 || !ARCH_S3C64XX
+       depends on S3C24XX_DMAC || !ARCH_S3C24XX
        select SND_SOC_GENERIC_DMAENGINE_PCM
        help
          Say Y or M if you want to add support for codecs attached to
          the Samsung SoCs' Audio interfaces. You will also need to
          select the audio interfaces to support below.
 
-config SND_S3C_DMA
-       tristate
-
 config SND_S3C24XX_I2S
        tristate
 
@@ -77,7 +73,6 @@ config SND_SOC_SAMSUNG_SMDK_WM8994
 config SND_SOC_SAMSUNG_SMDK2443_WM9710
        tristate "SoC AC97 Audio support for SMDK2443 - WM9710"
        depends on SND_SOC_SAMSUNG && MACH_SMDK2443
-       select S3C2410_DMA
        select AC97_BUS
        select SND_SOC_AC97_CODEC
        select SND_SAMSUNG_AC97
@@ -88,7 +83,6 @@ config SND_SOC_SAMSUNG_SMDK2443_WM9710
 config SND_SOC_SAMSUNG_LN2440SBC_ALC650
        tristate "SoC AC97 Audio support for LN2440SBC - ALC650"
        depends on SND_SOC_SAMSUNG && ARCH_S3C24XX
-       select S3C2410_DMA
        select AC97_BUS
        select SND_SOC_AC97_CODEC
        select SND_SAMSUNG_AC97
index e8d9ccdc41fd8dda5de463055ee39197b6387df8..91505ddaaf9593b4a748179ae6f6debf7a0359ff 100644 (file)
@@ -9,7 +9,7 @@ snd-soc-samsung-spdif-objs := spdif.o
 snd-soc-pcm-objs := pcm.o
 snd-soc-i2s-objs := i2s.o
 
-obj-$(CONFIG_SND_S3C_DMA) += snd-soc-s3c-dma.o
+obj-$(CONFIG_SND_SOC_SAMSUNG) += snd-soc-s3c-dma.o
 obj-$(CONFIG_SND_S3C24XX_I2S) += snd-soc-s3c24xx-i2s.o
 obj-$(CONFIG_SND_SAMSUNG_AC97) += snd-soc-ac97.o
 obj-$(CONFIG_SND_S3C2412_SOC_I2S) += snd-soc-s3c2412-i2s.o
index 68d9303047e85eea9dbd393a6c56aafda7a5bebc..2aa24d052a4a21e83bcaea8e61d3ba8053b69793 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <sound/soc.h>
 
-#include <mach/dma.h>
 #include "regs-ac97.h"
 #include <linux/platform_data/asoc-s3c.h>
 
@@ -225,9 +224,6 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
                                struct snd_soc_dai *dai)
 {
        u32 ac_glbctrl;
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct s3c_dma_params *dma_data =
-               snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
 
        ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
        if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
@@ -253,11 +249,6 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 
        writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-       if (!dma_data->ops)
-               dma_data->ops = samsung_dma_get_ops();
-
-       dma_data->ops->started(dma_data->channel);
-
        return 0;
 }
 
@@ -265,9 +256,6 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
                                    int cmd, struct snd_soc_dai *dai)
 {
        u32 ac_glbctrl;
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct s3c_dma_params *dma_data =
-               snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
 
        ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
        ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK;
@@ -287,11 +275,6 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 
        writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-       if (!dma_data->ops)
-               dma_data->ops = samsung_dma_get_ops();
-
-       dma_data->ops->started(dma_data->channel);
-
        return 0;
 }