aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomi Valkeinen <[email protected]>2024-03-19 10:22:36 +0200
committerMark Brown <[email protected]>2024-03-25 00:49:47 +0000
commitcee28113db17f0de58df0eaea4e2756c404ee01f (patch)
treee5441b1e375b41a09731190a67e1be544177f8f0 /include
parent4cece764965020c22cff7665b18a012006359095 (diff)
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 <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sound/dmaengine_pcm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index d70c55f17df7..c11aaf8079fb 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -118,6 +118,7 @@ int snd_dmaengine_pcm_refine_runtime_hwparams(
* which do not use devicetree.
* @process: Callback used to apply processing on samples transferred from/to
* user space.
+ * @name: Component name. If null, dev_name will be used.
* @compat_filter_fn: Will be used as the filter function when requesting a
* channel for platforms which do not use devicetree. The filter parameter
* will be the DAI's DMA data.
@@ -143,6 +144,7 @@ struct snd_dmaengine_pcm_config {
int (*process)(struct snd_pcm_substream *substream,
int channel, unsigned long hwoff,
unsigned long bytes);
+ const char *name;
dma_filter_fn compat_filter_fn;
struct device *dma_dev;
const char *chan_names[SNDRV_PCM_STREAM_LAST + 1];