Commit aaf4fce0 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 56f2906a
...@@ -87,12 +87,13 @@ static void rsnd_dmaen_start(struct rsnd_dma *dma) ...@@ -87,12 +87,13 @@ static void rsnd_dmaen_start(struct rsnd_dma *dma)
struct snd_pcm_substream *substream = io->substream; struct snd_pcm_substream *substream = io->substream;
struct device *dev = rsnd_priv_to_dev(priv); struct device *dev = rsnd_priv_to_dev(priv);
struct dma_async_tx_descriptor *desc; struct dma_async_tx_descriptor *desc;
int is_play = rsnd_io_is_play(io);
desc = dmaengine_prep_dma_cyclic(dma->chan, desc = dmaengine_prep_dma_cyclic(dma->chan,
substream->runtime->dma_addr, substream->runtime->dma_addr,
snd_pcm_lib_buffer_bytes(substream), snd_pcm_lib_buffer_bytes(substream),
snd_pcm_lib_period_bytes(substream), snd_pcm_lib_period_bytes(substream),
dma->dir, is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK); DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc) { if (!desc) {
...@@ -156,8 +157,6 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id, ...@@ -156,8 +157,6 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
if (ret < 0) if (ret < 0)
goto rsnd_dma_init_err; goto rsnd_dma_init_err;
dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
return 0; return 0;
rsnd_dma_init_err: rsnd_dma_init_err:
......
...@@ -182,7 +182,6 @@ struct rsnd_dma_ops { ...@@ -182,7 +182,6 @@ struct rsnd_dma_ops {
struct rsnd_dma { struct rsnd_dma {
struct dma_chan *chan; struct dma_chan *chan;
struct rsnd_dma_ops *ops; struct rsnd_dma_ops *ops;
enum dma_transfer_direction dir;
int dmapp_id; int dmapp_id;
u32 chcr; u32 chcr;
dma_addr_t src_addr; dma_addr_t src_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment