ASoC: soc-dai: add snd_soc_dai_get_symmetric_xxx()

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 <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
Link: https://patch.msgid.link/87h5jnjpug.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-09-18 01:44:07 +00:00 committed by Mark Brown
parent f54b3dd4aa
commit ee4f730ac8
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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)
{