diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-06-22 20:59:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-02 07:35:56 -0400 |
commit | 340371005d399b595f4044fc5e336f4a66ead101 (patch) | |
tree | bd1f4d5068722073e5f6f7f03a7962c19c5ecfa8 | |
parent | 37523034851d6a4b1dc951e24bf2f11bc28fe58d (diff) |
ASoC: rsnd: DMA start address is properly used for each DMAC
R-Car sound uses Audio DMAC and Audio DMAC peri peri.
Audio DMAC peri peri transfers data inside circuit.
DMA transfer needs source / destination address,
and destination address can be set via dmaengine_slave_config().
The source address can be set when starting DMAEngine.
Because Audio DMAC peri peri always ignores its value,
current driver always used same source address for
Audio DMAC / Audio DMAC peri peri
(Audio DMAC peri peri source / destination address
is always fixed value)
But, This is not good match for DT booting.
This patch properly uses DMA start address
for Audio DMAC / Audio DMAC peri peri.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/sh/rcar/core.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 4435a31ecdad..49d9b31b185c 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -200,6 +200,7 @@ void rsnd_dma_start(struct rsnd_dma *dma) | |||
200 | struct dma_async_tx_descriptor *desc; | 200 | struct dma_async_tx_descriptor *desc; |
201 | 201 | ||
202 | desc = dmaengine_prep_dma_cyclic(dma->chan, | 202 | desc = dmaengine_prep_dma_cyclic(dma->chan, |
203 | (dma->addr) ? dma->addr : | ||
203 | substream->runtime->dma_addr, | 204 | substream->runtime->dma_addr, |
204 | snd_pcm_lib_buffer_bytes(substream), | 205 | snd_pcm_lib_buffer_bytes(substream), |
205 | snd_pcm_lib_period_bytes(substream), | 206 | snd_pcm_lib_period_bytes(substream), |
@@ -347,6 +348,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, | |||
347 | if (ret < 0) | 348 | if (ret < 0) |
348 | goto rsnd_dma_init_err; | 349 | goto rsnd_dma_init_err; |
349 | 350 | ||
351 | dma->addr = is_play ? cfg.src_addr : cfg.dst_addr; | ||
350 | dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; | 352 | dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; |
351 | 353 | ||
352 | return 0; | 354 | return 0; |
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 425b22ee6fb9..631b149df08f 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h | |||
@@ -158,6 +158,7 @@ struct rsnd_dma { | |||
158 | struct sh_dmae_slave slave; | 158 | struct sh_dmae_slave slave; |
159 | struct dma_chan *chan; | 159 | struct dma_chan *chan; |
160 | enum dma_transfer_direction dir; | 160 | enum dma_transfer_direction dir; |
161 | dma_addr_t addr; | ||
161 | }; | 162 | }; |
162 | 163 | ||
163 | void rsnd_dma_start(struct rsnd_dma *dma); | 164 | void rsnd_dma_start(struct rsnd_dma *dma); |