diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-04-03 11:06:03 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-03 18:13:34 +0100 |
commit | 3489d5067a2cd8c51a2649b2f39bfb5b11852b8d (patch) | |
tree | f8dc9541af71beb7c9ed0f2eec97bc90152489f2 /sound/soc/tegra/tegra_pcm.c | |
parent | 09ae3aaf3cd28422d76b7b78d9491b17330b276a (diff) | |
download | talos-obmc-linux-3489d5067a2cd8c51a2649b2f39bfb5b11852b8d.tar.gz talos-obmc-linux-3489d5067a2cd8c51a2649b2f39bfb5b11852b8d.zip |
ASoC: tegra: Use common DAI DMA data struct
Use the common DAI DMA data struct for tegra, this allows us to use the common
helper function to configure the DMA slave config based on the DAI DMA data.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra_pcm.c')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index e67af0b5d35d..f91d08bc1753 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -81,12 +81,9 @@ static int tegra_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = substream->private_data; struct device *dev = rtd->platform->dev; struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); - struct tegra_pcm_dma_params *dmap; struct dma_slave_config slave_config; int ret; - dmap = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); - ret = snd_hwparams_to_dma_slave_config(substream, params, &slave_config); if (ret) { @@ -94,16 +91,9 @@ static int tegra_pcm_hw_params(struct snd_pcm_substream *substream, return ret; } - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - slave_config.dst_addr = dmap->addr; - slave_config.dst_maxburst = 4; - } else { - slave_config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - slave_config.src_addr = dmap->addr; - slave_config.src_maxburst = 4; - } - slave_config.slave_id = dmap->req_sel; + snd_dmaengine_pcm_set_config_from_dai_data(substream, + snd_soc_dai_get_dma_data(rtd->cpu_dai, substream), + &slave_config); ret = dmaengine_slave_config(chan, &slave_config); if (ret < 0) { |