diff options
| author | Harendra Gautam <harendra.gautam@oss.qualcomm.com> | 2026-10-13 11:21:28 +0530 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-15 16:44:10 +0100 |
| commit | 02298cc296e640c2ebc49407a76bb02c0df488f4 (patch) | |
| tree | 37e5e3aad98efe25d255c5e95c8205ca027ca3bc /include | |
| parent | dd77abdd3496557240c06a29240666d1e33a0831 (diff) | |
| download | linux-02298cc296e640c2ebc49407a76bb02c0df488f4.tar.gz linux-02298cc296e640c2ebc49407a76bb02c0df488f4.zip | |
ASoC: soc-core: Add snd_soc_of_xlate_dai_name() generic helper
Some ASoC CPU DAI drivers need to resolve a sound-dai phandle argument
to a DAI name by matching the argument against the component's DAI IDs.
lpass-cpu carries a local implementation of this lookup.
Add snd_soc_of_xlate_dai_name() to soc-core.c as a generic helper
that can be assigned directly to the .of_xlate_dai_name component
driver callback. It iterates the component's DAI list using
for_each_component_dais() and matches by DAI ID.
Signed-off-by: Harendra Gautam <harendra.gautam@oss.qualcomm.com>
Link: https://patch.msgid.link/20261013-b4-qaif-shikra-audio-v9-5-f3022e28f2fd@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/soc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 08fdee15dba7..19d780bb5c0b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1323,6 +1323,9 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); +int snd_soc_of_xlate_dai_name(struct snd_soc_component *component, + const struct of_phandle_args *args, + const char **dai_name); void snd_soc_of_parse_node_prefix(struct device_node *np, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, |
