From: Frank.Li@oss.nxp.com
To: "Martin Povišer" <povik+lin@cutebit.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Shengjiu Wang" <shengjiu.wang@gmail.com>,
"Xiubo Li" <Xiubo.Lee@gmail.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Nicolin Chen" <nicoleotsuka@gmail.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>, "Sen Wang" <sen@ti.com>
Cc: asahi@lists.linux.dev, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-renesas-soc@vger.kernel.org, imx@lists.linux.dev,
vkoul@kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 2/4] ASoC: fsl: asrc: Use dmaengine API instead of chan->device->dev
Date: Fri, 06 Nov 2026 15:13:46 -0500 [thread overview]
Message-ID: <20261106-dma_sound_cleanup-v1-2-5eb8a7b81e87@nxp.com> (raw)
In-Reply-To: <20261106-dma_sound_cleanup-v1-0-5eb8a7b81e87@nxp.com>
From: Frank Li <Frank.Li@nxp.com>
Replace open-coded chan->device->dev with dmaengine_get_dma_device()
and chan->device->dev->of_node with
dmaengine_get_provider_device()->of_node to avoid direct access to
DMA engine internals.
dmaengine_get_dma_device(): for dma map device, may return pre chan device
if dmaengine support per chan iommu mapping.
dmaengine_get_provider_device(): for dmaengine device filter, which have
of_node.
Prepare to make struct dma_device private.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
sound/soc/fsl/fsl_asrc_dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index cd3bf6340b650..71f84359df3af 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -261,7 +261,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
pair->dma_data.priority = tmp_data->priority;
dma_release_channel(tmp_chan);
- of_dma_node = pair->dma_chan[!dir]->device->dev->of_node;
+ of_dma_node = dmaengine_get_provider_device(pair->dma_chan[!dir])->of_node;
pair->dma_chan[dir] =
__dma_request_channel(&mask, filter, &pair->dma_data,
of_dma_node);
@@ -526,7 +526,7 @@ static int fsl_asrc_dma_pcm_new(struct snd_soc_component *component,
ret = snd_pcm_set_fixed_buffer_all(pcm,
SNDRV_DMA_TYPE_DEV,
- chan->device->dev,
+ dmaengine_get_dma_device(chan),
FSL_ASRC_DMABUF_SIZE);
dma_release_channel(chan);
--
2.43.0
next prev parent reply other threads:[~2026-11-06 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:13 [PATCH 0/4] ASoC: " Frank.Li
2026-11-06 20:13 ` [PATCH 1/4] ASoC: apple: mca: Use dmaengine_get_dma_device() " Frank.Li
2026-11-06 20:13 ` Frank.Li [this message]
2026-11-06 20:13 ` [PATCH 3/4] ASoC: renesas: rcar: " Frank.Li
2026-11-06 20:13 ` [PATCH 4/4] ASoC: ti: davinci-mcasp: Use dmaengine_get_provider_device() API Frank.Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261106-dma_sound_cleanup-v1-2-5eb8a7b81e87@nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=Xiubo.Lee@gmail.com \
--cc=asahi@lists.linux.dev \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=geert+renesas@glider.be \
--cc=imx@lists.linux.dev \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=magnus.damm@gmail.com \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=povik+lin@cutebit.org \
--cc=sen@ti.com \
--cc=shengjiu.wang@gmail.com \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®