From ee4f730ac8f76d89ca529f04794921872f0beb4f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 18 Sep 2026 01:44:07 +0000 Subject: [PATCH] ASoC: soc-dai: add snd_soc_dai_get_symmetric_xxx() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DAI parameter will be capsuled soon, will be not enable to access from each drivers. Add snd_soc_dai_get_symmetric_xxx() to get symmetric param from DAI. Signed-off-by: Kuninori Morimoto Reviewed-by: Alvin Šipraga Link: https://patch.msgid.link/87h5jnjpug.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 3 +++ sound/soc/soc-dai.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index bd714c3bbf3d..fc23221766b6 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -563,6 +563,9 @@ struct snd_soc_dai *snd_soc_dai_register(struct snd_soc_component *component, void snd_soc_dai_unregister(struct snd_soc_dai *dai); struct snd_soc_dai *snd_soc_dai_from_list(struct list_head *list); struct list_head *snd_soc_dai_to_list(struct snd_soc_dai *dai); +unsigned int snd_soc_dai_get_symmetric_rate(struct snd_soc_dai *dai); +unsigned int snd_soc_dai_get_symmetric_channels(struct snd_soc_dai *dai); +unsigned int snd_soc_dai_get_symmetric_sample_bits(struct snd_soc_dai *dai); /* REMOVE ME */ #define snd_soc_dai_get_pcm_stream snd_soc_dai_pcm_stream_get diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 69a3df3c56a8..9787d7913c30 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -1263,6 +1263,24 @@ struct snd_soc_dai *snd_soc_dai_register(struct snd_soc_component *component, } EXPORT_SYMBOL_GPL(snd_soc_dai_register); +unsigned int snd_soc_dai_get_symmetric_rate(struct snd_soc_dai *dai) +{ + return dai->symmetric_rate; +} +EXPORT_SYMBOL_GPL(snd_soc_dai_get_symmetric_rate); + +unsigned int snd_soc_dai_get_symmetric_channels(struct snd_soc_dai *dai) +{ + return dai->symmetric_channels; +} +EXPORT_SYMBOL_GPL(snd_soc_dai_get_symmetric_channels); + +unsigned int snd_soc_dai_get_symmetric_sample_bits(struct snd_soc_dai *dai) +{ + return dai->symmetric_sample_bits; +} +EXPORT_SYMBOL_GPL(snd_soc_dai_get_symmetric_sample_bits); + void snd_soc_dai_symmetric_set_params(struct snd_soc_dai *dai, struct snd_pcm_hw_params *params) {