ASoC: dmaengine_pcm: Setup device_fc in snd_hwparams_to_dma_slave_config
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 3 Apr 2013 09:02:56 +0000 (11:02 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Apr 2013 17:12:27 +0000 (18:12 +0100)
Usually device_fc should be set to false for audio DMAs. Initialize it in a
common place so drivers don't have to do this manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/atmel/atmel-pcm-dma.c
sound/soc/fsl/imx-pcm-dma.c
sound/soc/soc-dmaengine-pcm.c

index b8570e3e1b574ba880be4787212a8a04b32d8246..bb07989762d5be6ac5be6bb8cb75c2a630090173 100644 (file)
@@ -129,8 +129,6 @@ static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream,
                slave_config.src_maxburst = 1;
        }
 
-       slave_config.device_fc = false;
-
        dma_chan = snd_dmaengine_pcm_get_chan(substream);
        if (dmaengine_slave_config(dma_chan, &slave_config)) {
                pr_err("atmel-pcm: failed to configure dma channel\n");
index 6832c498457a0cd76d1d62661cea7c31b8fcce09..64af57336dbbcd6bcb5fa25306fc31268664b6b7 100644 (file)
@@ -57,8 +57,6 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
        if (ret)
                return ret;
 
-       slave_config.device_fc = false;
-
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
                slave_config.dst_addr = dma_params->dma_addr;
                slave_config.dst_maxburst = dma_params->burstsize;
index e8b1215b8c1b1f798d10aa6e4eff34313ab5a065..7c24dedff971f2e20604fa100ef82a2e50003e03 100644 (file)
@@ -89,6 +89,8 @@ int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
                slave_config->src_addr_width = buswidth;
        }
 
+       slave_config->device_fc = false;
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(snd_hwparams_to_dma_slave_config);