aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-02-20 05:28:32 -0500
committerMark Brown <broonie@kernel.org>2015-03-07 10:04:30 -0500
commitaaf4fce019ecd55a2d93b6111525deeef300f751 (patch)
tree43d84bb4ad196aead1b5b5e04b1535ed815c352e
parent56f2906ae2d0b48b64a67feef99e3be3b40c3617 (diff)
ASoC: rsnd: remove rsnd_dma::dir
DMAEngine direction can be calculated from rsnd_dai_stream, So, rsnd_dma::dir does not make sense now. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/dma.c5
-rw-r--r--sound/soc/sh/rcar/rsnd.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index c407fd250d2a..3f1ea58ee144 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -87,12 +87,13 @@ static void rsnd_dmaen_start(struct rsnd_dma *dma)
87 struct snd_pcm_substream *substream = io->substream; 87 struct snd_pcm_substream *substream = io->substream;
88 struct device *dev = rsnd_priv_to_dev(priv); 88 struct device *dev = rsnd_priv_to_dev(priv);
89 struct dma_async_tx_descriptor *desc; 89 struct dma_async_tx_descriptor *desc;
90 int is_play = rsnd_io_is_play(io);
90 91
91 desc = dmaengine_prep_dma_cyclic(dma->chan, 92 desc = dmaengine_prep_dma_cyclic(dma->chan,
92 substream->runtime->dma_addr, 93 substream->runtime->dma_addr,
93 snd_pcm_lib_buffer_bytes(substream), 94 snd_pcm_lib_buffer_bytes(substream),
94 snd_pcm_lib_period_bytes(substream), 95 snd_pcm_lib_period_bytes(substream),
95 dma->dir, 96 is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM,
96 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 97 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
97 98
98 if (!desc) { 99 if (!desc) {
@@ -156,8 +157,6 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
156 if (ret < 0) 157 if (ret < 0)
157 goto rsnd_dma_init_err; 158 goto rsnd_dma_init_err;
158 159
159 dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
160
161 return 0; 160 return 0;
162 161
163rsnd_dma_init_err: 162rsnd_dma_init_err:
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index a2954917bfcb..5d65a4b96743 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -182,7 +182,6 @@ struct rsnd_dma_ops {
182struct rsnd_dma { 182struct rsnd_dma {
183 struct dma_chan *chan; 183 struct dma_chan *chan;
184 struct rsnd_dma_ops *ops; 184 struct rsnd_dma_ops *ops;
185 enum dma_transfer_direction dir;
186 int dmapp_id; 185 int dmapp_id;
187 u32 chcr; 186 u32 chcr;
188 dma_addr_t src_addr; 187 dma_addr_t src_addr;