aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-03 05:02:56 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-03 13:12:27 -0400
commit5fa70f71dbf33603b0d29b33d8da128b266eb733 (patch)
tree24eb98f534e02e6c3fe2e409d1e589c9ade962a9
parentb1bd7f62cf2b854316a9a8b2442a8014dbe29a47 (diff)
ASoC: dmaengine_pcm: Setup device_fc in snd_hwparams_to_dma_slave_config
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>
-rw-r--r--sound/soc/atmel/atmel-pcm-dma.c2
-rw-r--r--sound/soc/fsl/imx-pcm-dma.c2
-rw-r--r--sound/soc/soc-dmaengine-pcm.c2
3 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index b8570e3e1b57..bb07989762d5 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -129,8 +129,6 @@ static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream,
129 slave_config.src_maxburst = 1; 129 slave_config.src_maxburst = 1;
130 } 130 }
131 131
132 slave_config.device_fc = false;
133
134 dma_chan = snd_dmaengine_pcm_get_chan(substream); 132 dma_chan = snd_dmaengine_pcm_get_chan(substream);
135 if (dmaengine_slave_config(dma_chan, &slave_config)) { 133 if (dmaengine_slave_config(dma_chan, &slave_config)) {
136 pr_err("atmel-pcm: failed to configure dma channel\n"); 134 pr_err("atmel-pcm: failed to configure dma channel\n");
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index 6832c498457a..64af57336dbb 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -57,8 +57,6 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
57 if (ret) 57 if (ret)
58 return ret; 58 return ret;
59 59
60 slave_config.device_fc = false;
61
62 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 60 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
63 slave_config.dst_addr = dma_params->dma_addr; 61 slave_config.dst_addr = dma_params->dma_addr;
64 slave_config.dst_maxburst = dma_params->burstsize; 62 slave_config.dst_maxburst = dma_params->burstsize;
diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c
index e8b1215b8c1b..7c24dedff971 100644
--- a/sound/soc/soc-dmaengine-pcm.c
+++ b/sound/soc/soc-dmaengine-pcm.c
@@ -89,6 +89,8 @@ int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
89 slave_config->src_addr_width = buswidth; 89 slave_config->src_addr_width = buswidth;
90 } 90 }
91 91
92 slave_config->device_fc = false;
93
92 return 0; 94 return 0;
93} 95}
94EXPORT_SYMBOL_GPL(snd_hwparams_to_dma_slave_config); 96EXPORT_SYMBOL_GPL(snd_hwparams_to_dma_slave_config);