summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-generic-dmaengine-pcm.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2024-03-19 09:22:36 +0100
committerMark Brown <broonie@kernel.org>2024-03-25 01:49:47 +0100
commitcee28113db17f0de58df0eaea4e2756c404ee01f (patch)
treee5441b1e375b41a09731190a67e1be544177f8f0 /sound/soc/soc-generic-dmaengine-pcm.c
parentLinux 6.9-rc1 (diff)
downloadlinux-cee28113db17f0de58df0eaea4e2756c404ee01f.tar.xz
linux-cee28113db17f0de58df0eaea4e2756c404ee01f.zip
ASoC: dmaengine_pcm: Allow passing component name via config
At the moment we cannot instantiate two dmaengine_pcms with the same parent device, as the components will be named the same, leading to conflicts. Add 'name' field to the snd_dmaengine_pcm_config, and use that (if defined) as the component name instead of deriving the component name from the device. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://msgid.link/r/20240319-xilinx-dp-audio-v2-1-92d6d3a7ca7e@ideasonboard.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-generic-dmaengine-pcm.c')
-rw-r--r--sound/soc/soc-generic-dmaengine-pcm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index 092ca09f3631..83db1a83d8ba 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -441,6 +441,9 @@ int snd_dmaengine_pcm_register(struct device *dev,
pcm->config = config;
pcm->flags = flags;
+ if (config->name)
+ pcm->component.name = config->name;
+
ret = dmaengine_pcm_request_chan_of(pcm, dev, config);
if (ret)
goto err_free_dma;