* [PATCH v2 2/3] ASoC: SDCA: export sdca_asoc_populate_rate_format() helper
@ 2026-07-29 3:22 shumingf
2026-07-30 16:05 ` Charles Keepax
0 siblings, 1 reply; 2+ messages in thread
From: shumingf @ 2026-07-29 3:22 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
Shuming Fan
From: Shuming Fan <shumingf@realtek.com>
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 <shumingf@realtek.com>
---
include/sound/sdca_asoc.h | 7 +++++++
sound/soc/sdca/sdca_asoc.c | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/sound/sdca_asoc.h b/include/sound/sdca_asoc.h
index ca35d5a44370..d3024c3b38b9 100644
--- a/include/sound/sdca_asoc.h
+++ b/include/sound/sdca_asoc.h
@@ -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,
diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c
index b4dedba719dc..9a6c0036b7be 100644
--- a/sound/soc/sdca/sdca_asoc.c
+++ b/sound/soc/sdca/sdca_asoc.c
@@ -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;
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/3] ASoC: SDCA: export sdca_asoc_populate_rate_format() helper
2026-07-29 3:22 [PATCH v2 2/3] ASoC: SDCA: export sdca_asoc_populate_rate_format() helper shumingf
@ 2026-07-30 16:05 ` Charles Keepax
0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2026-07-30 16:05 UTC (permalink / raw)
To: shumingf
Cc: broonie, lgirdwood, linux-sound, lars, flove, oder_chiou, jack.yu,
derek.fang
On Wed, Jul 29, 2026 at 11:22:37AM +0800, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> 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 <shumingf@realtek.com>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-30 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 3:22 [PATCH v2 2/3] ASoC: SDCA: export sdca_asoc_populate_rate_format() helper shumingf
2026-07-30 16:05 ` Charles Keepax
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox