From 8f501c7b4414d46a3ea6650f962b0fe9a69d9787 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 11 Jul 2014 15:45:07 +0200 Subject: ASoC: samsung: s3c24xx dmaengine follow-up 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 Signed-off-by: Mark Brown --- sound/soc/samsung/ac97.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'sound/soc/samsung/ac97.c') diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 68d9303..2aa24d0 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -19,7 +19,6 @@ #include -#include #include "regs-ac97.h" #include @@ -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; } -- cgit v1.1 From dd2380e31cca0099aa49846e16103936aa9d818a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 11 Jul 2014 15:45:08 +0200 Subject: ASoC: samsung: remove unused DMA data The s3c_dma_client structures and the 'ch' and 'ops' members in s3c_dma_params were only used by the legacy DMA driver and serve no function any more. This removes any reference to them. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- sound/soc/samsung/ac97.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sound/soc/samsung/ac97.c') diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 2aa24d0..e161511 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -38,30 +38,15 @@ struct s3c_ac97_info { }; static struct s3c_ac97_info s3c_ac97; -static struct s3c_dma_client s3c_dma_client_out = { - .name = "AC97 PCMOut" -}; - -static struct s3c_dma_client s3c_dma_client_in = { - .name = "AC97 PCMIn" -}; - -static struct s3c_dma_client s3c_dma_client_micin = { - .name = "AC97 MicIn" -}; - static struct s3c_dma_params s3c_ac97_pcm_out = { - .client = &s3c_dma_client_out, .dma_size = 4, }; static struct s3c_dma_params s3c_ac97_pcm_in = { - .client = &s3c_dma_client_in, .dma_size = 4, }; static struct s3c_dma_params s3c_ac97_mic_in = { - .client = &s3c_dma_client_micin, .dma_size = 4, }; -- cgit v1.1