Skip to content

Commit

Permalink
ASoC: dmaengine_pcm: Setup device_fc in snd_hwparams_to_dma_slave_config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Apr 3, 2013
1 parent b1bd7f6 commit 5fa70f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions sound/soc/atmel/atmel-pcm-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 0 additions & 2 deletions sound/soc/fsl/imx-pcm-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/soc-dmaengine-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5fa70f7

Please sign in to comment.