summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2026-09-18 01:41:53 +0000
committerMark Brown <broonie@kernel.org>2026-09-28 13:33:35 +0100
commitd4c557f621dbfffa121dedfa421d79667ff396ad (patch)
tree2aad4475da1bf0b9585bb142250cb2eb9ec242b8
parent37e117c23563d6428a97395c23aa9af196cdbda4 (diff)
downloadlinux-next-d4c557f621dbfffa121dedfa421d79667ff396ad.tar.gz
linux-next-d4c557f621dbfffa121dedfa421d79667ff396ad.zip
ASoC: soc-dai: add snd_soc_dai_id()
DAI parameter will be capsuled soon, will be not enable to access from each drivers. Add snd_soc_dai_id() to get ID from DAI. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com> Link: https://patch.msgid.link/87mrtfjpy6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/soc-dai.h1
-rw-r--r--sound/soc/soc-dai.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 7e64e049d71d..02b52fed97c9 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -283,6 +283,7 @@ int snd_soc_dai_matches_args(const struct snd_soc_dai *dai,
int snd_soc_dai_matches_dlc(struct snd_soc_dai *dai,
const struct snd_soc_dai_link_component *dlc);
const char *snd_soc_dai_name(const struct snd_soc_dai *dai);
+int snd_soc_dai_id(const struct snd_soc_dai *dai);
struct snd_soc_dai_ops {
/* DAI driver callbacks */
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 0cf70f0903dc..71de29bfbbd0 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -1073,6 +1073,12 @@ const char *snd_soc_dai_name(const struct snd_soc_dai *dai)
}
EXPORT_SYMBOL_GPL(snd_soc_dai_name);
+int snd_soc_dai_id(const struct snd_soc_dai *dai)
+{
+ return dai->id;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dai_id);
+
const struct snd_soc_pcm_stream *
snd_soc_dai_pcm_stream_get_i(const struct snd_soc_dai *dai, int stream)
{