ASoC: SDCA: export sdca_asoc_populate_rate_format() helper
Subsystems (3)
PATCH v2 2/3 ASoC: SDCA: export sdca_asoc_populate_rate_format() helper
From: Shuming Fan <[email protected]>
Export populate_rate_format() as sdca_asoc_populate_rate_format() so that it can be used by codec drivers.
The codec driver could get rate and format information for the IT/OT entity.
Signed-off-by Shuming Fan <[email protected]>
--- include/sound/sdca_asoc.h | 7 +++++++ sound/soc/sdca/sdca_asoc.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-)
include/sound/sdca_asoc.h +7 -0
@@ -25,6 +25,8 @@ struct snd_soc_dai_driver;struct snd_soc_dai_ops ;struct snd_soc_dapm_route ;struct snd_soc_dapm_widget ; +struct snd_soc_pcm_stream ; +struct sdca_entity ;/* convenient macro to handle the mono volume in 7.8 fixed format representation */ #define SDCA_SINGLE_Q78_TLV (xname, xreg, xmin, xmax, xstep, tlv_array) \
@@ -82,6 +84,11 @@ int sdca_asoc_populate_component(struct device *dev, struct snd_soc_dai_driver **dai_drv, int *num_dai_drv, const struct snd_soc_dai_ops *ops); +int sdca_asoc_populate_rate_format (struct device *dev, +struct sdca_function_data *function, +struct sdca_entity *entity, +struct snd_soc_pcm_stream *stream); + int sdca_asoc_set_constraints(struct device *dev, struct regmap *regmap, struct sdca_function_data *function, struct snd_pcm_substream *substream,
sound/soc/sdca/sdca_asoc.c +3 -2
@@ -1231,7 +1231,7 @@ static u64 width_find_mask(unsigned int bits) } } -static int populate_rate_format (struct device *dev, +int sdca_asoc_populate_rate_format (struct device *dev,struct sdca_function_data *function,struct sdca_entity *entity,struct snd_soc_pcm_stream *stream)
@@ -1292,6 +1292,7 @@ static int populate_rate_format(struct device *dev,return 0 ; } +EXPORT_SYMBOL_NS (sdca_asoc_populate_rate_format,"SND_SOC_SDCA" );/** * sdca_asoc_populate_dais - fill in an array of DAI drivers for a Function
@@ -1344,7 +1345,7 @@ int sdca_asoc_populate_dais(struct device *dev, struct sdca_function_data *funct stream->channels_min =1 ; stream->channels_max =SDCA_MAX_CHANNEL_COUNT ; - ret =populate_rate_format (dev, function, entity, stream); + ret =sdca_asoc_populate_rate_format (dev, function, entity, stream);if (ret)return ret;
Signature · 1 line
2.54.0
Quoted 8 lines · On Wed, Jul 29, 2026 at 11:22:37AM +0800, [email protected] wrote:
From: Shuming Fan <[email protected]>
Export
populate_rate_format()assdca_asoc_populate_rate_format()so that it can be used by codec drivers.
The codec driver could get rate and format information for the IT/OT entity.Signed-off-by Shuming Fan <[email protected]>---
Reviewed-by Charles Keepax <[email protected]>
Thanks,
Charles