Commit ee427ea4 authored by Robin Gong's avatar Robin Gong Committed by Mark Brown

ASoC: fsl_asrc_dma: 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: default avatarRobin Gong <yibin.gong@nxp.com>
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1614935977-21638-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 464b489a
...@@ -141,6 +141,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, ...@@ -141,6 +141,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
struct dma_slave_config config_fe, config_be; struct dma_slave_config config_fe, config_be;
enum asrc_pair_index index = pair->index; enum asrc_pair_index index = pair->index;
struct device *dev = component->dev; struct device *dev = component->dev;
struct device_node *of_dma_node;
int stream = substream->stream; int stream = substream->stream;
struct imx_dma_data *tmp_data; struct imx_dma_data *tmp_data;
struct snd_soc_dpcm *dpcm; struct snd_soc_dpcm *dpcm;
...@@ -231,8 +232,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, ...@@ -231,8 +232,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
pair->dma_data.priority = tmp_data->priority; pair->dma_data.priority = tmp_data->priority;
dma_release_channel(tmp_chan); dma_release_channel(tmp_chan);
of_dma_node = pair->dma_chan[!dir]->device->dev->of_node;
pair->dma_chan[dir] = pair->dma_chan[dir] =
dma_request_channel(mask, filter, &pair->dma_data); __dma_request_channel(&mask, filter, &pair->dma_data,
of_dma_node);
pair->req_dma_chan = true; pair->req_dma_chan = true;
} else { } else {
pair->dma_chan[dir] = tmp_chan; pair->dma_chan[dir] = tmp_chan;
......
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