summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_easrc_dma.c
diff options
context:
space:
mode:
authorRobin Gong <yibin.gong@nxp.com>2019-12-26 18:54:16 +0800
committerShengjiu Wang <shengjiu.wang@nxp.com>2020-01-20 17:08:03 +0800
commit93a53a2f8b5c4b76b5ac5c6ce0ddd03d25289b1e (patch)
tree92b42e1c514fc3b5a93a485fd6cfe3875fa3117a /sound/soc/fsl/fsl_easrc_dma.c
parent4d1d9fe07502028f0ed125cc44633cc8c6e4c721 (diff)
MLK-23242-1: ASoC: fsl_easrc: request dma channel from specific controller
Request dma channel from specific dma controller instead of generic dma controller list, otherwise, may get the wrong dma controller if there are multi dma controllers such as i.mx8mp. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_easrc_dma.c')
-rw-r--r--sound/soc/fsl/fsl_easrc_dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_easrc_dma.c b/sound/soc/fsl/fsl_easrc_dma.c
index d1871b48b3c1..eb0ed164ef58 100644
--- a/sound/soc/fsl/fsl_easrc_dma.c
+++ b/sound/soc/fsl/fsl_easrc_dma.c
@@ -142,6 +142,7 @@ static int fsl_easrc_dma_hw_params(struct snd_pcm_substream *substream,
u8 dir = tx ? OUT : IN;
dma_cap_mask_t mask;
enum sdma_peripheral_type be_peripheral_type;
+ struct device_node *of_dma_node;
int ret;
/* Fetch the Back-End dma_data from DPCM */
@@ -189,6 +190,7 @@ static int fsl_easrc_dma_hw_params(struct snd_pcm_substream *substream,
return ret;
}
+ of_dma_node = ctx->dma_chan[!dir]->device->dev->of_node;
/* Request and config DMA channel for Back-End */
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
@@ -228,7 +230,8 @@ static int fsl_easrc_dma_hw_params(struct snd_pcm_substream *substream,
*/
if (ctx->dma_data.dma_request2 != ctx->dma_data.dma_request)
ctx->dma_chan[dir] =
- dma_request_channel(mask, filter, &ctx->dma_data);
+ __dma_request_channel(&mask, filter, &ctx->dma_data,
+ of_dma_node);
else
ctx->dma_chan[dir] =
dma_request_slave_channel(dev_be, tx ? "tx" : "rx");