Re: [PATCH 1/1] ASoC: fsl_asrc_m2m: use dma_chan directly for dma_async_issue_pending()

From: Shengjiu Wang

Date: Thu Nov 05 2026 - 22:05:33 EST


On Tue, Nov 3, 2026 at 3:52 AM <Frank.Li@xxxxxxxxxxx> wrote:
>
> From: Frank Li <Frank.Li@xxxxxxx>
>
> Use pair->dma_chan[] directly instead of pair->desc[]->chan when calling
> dma_async_issue_pending(), which is more straightforward and avoids
> dereferencing the descriptor to get the channel.
>
> Prepare to make struct dma_async_tx_descriptor private.
>
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>

Reviewed-by: Shengjiu Wang <shengjiu.wang@xxxxxxxxx>

Best regards
Shengjiu Wang
> ---
> sound/soc/fsl/fsl_asrc_m2m.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
> index c6970a7e88f3f..796a78124765f 100644
> --- a/sound/soc/fsl/fsl_asrc_m2m.c
> +++ b/sound/soc/fsl/fsl_asrc_m2m.c
> @@ -257,12 +257,12 @@ static int asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task
>
> /* Submit DMA request */
> dmaengine_submit(pair->desc[IN]);
> - dma_async_issue_pending(pair->desc[IN]->chan);
> + dma_async_issue_pending(pair->dma_chan[IN]);
> if (out_dma_len > 0) {
> if (asrc->start_before_dma && asrc->m2m_output_ready)
> asrc->m2m_output_ready(pair);
> dmaengine_submit(pair->desc[OUT]);
> - dma_async_issue_pending(pair->desc[OUT]->chan);
> + dma_async_issue_pending(pair->dma_chan[OUT]);
> }
>
> if (!asrc->start_before_dma)
> --
> 2.43.0
>