[PATCH] ASoC: soc-generic-dmaengine-pcm: use dmaengine_get_dma_device() for DMA device

From: Peng Fan (OSS)

Date: Sat Sep 26 2026 - 21:32:09 EST


From: Peng Fan <peng.fan@xxxxxxx>

Replace chan->device->dev with dmaengine_get_dma_device(chan) in
dmaengine_dma_dev() so that DMA buffer allocation and mapping go
through the correct device when the DMA controller has per-channel
IOMMU domains (chan_dma_dev=true).

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
sound/soc/soc-generic-dmaengine-pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index 6d1dbee8f6c14..f6206ecaf26fe 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -32,7 +32,7 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm,
if (!pcm->chan[substream->stream])
return NULL;

- return pcm->chan[substream->stream]->device->dev;
+ return dmaengine_get_dma_device(pcm->chan[substream->stream]);
}

/**

---
base-commit: f5f84daefcd92d7a630066635ecea1433ed5eac7
change-id: 20260927-sound-dma-eca4f6b9faf7

Best regards,
--
Peng Fan <peng.fan@xxxxxxx>