* [PATCH v2 1/3] ASoC: SDCA: export sdca_find_entity_by_label() helper
@ 2026-07-29 3:22 shumingf
2026-07-30 16:04 ` 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 the sdca_find_entity_by_label() helper so that codec drivers can
locate SDCA entities by their labels.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
include/sound/sdca_function.h | 2 ++
sound/soc/sdca/sdca_functions.c | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h
index b1489178b0ef..fb931ae735a2 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -1469,5 +1469,7 @@ struct sdca_control_range *sdca_selector_find_range(struct device *dev,
struct sdca_cluster *sdca_id_find_cluster(struct device *dev,
struct sdca_function_data *function,
const int id);
+struct sdca_entity *sdca_find_entity_by_label(struct sdca_function_data *function,
+ const char *entity_label);
#endif
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index 7a7a9f1a4938..cdf1e68d60ac 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -1619,7 +1619,7 @@ static int find_sdca_entities(struct device *dev, struct sdw_slave *sdw,
return 0;
}
-static struct sdca_entity *find_sdca_entity_by_label(struct sdca_function_data *function,
+struct sdca_entity *sdca_find_entity_by_label(struct sdca_function_data *function,
const char *entity_label)
{
struct sdca_entity *entity = NULL;
@@ -1648,6 +1648,7 @@ static struct sdca_entity *find_sdca_entity_by_label(struct sdca_function_data *
return NULL;
}
+EXPORT_SYMBOL_NS(sdca_find_entity_by_label, "SND_SOC_SDCA");
static struct sdca_entity *find_sdca_entity_by_id(struct sdca_function_data *function,
const int id)
@@ -1688,7 +1689,7 @@ static int find_sdca_entity_connection_iot(struct device *dev,
return ret;
}
- clock_entity = find_sdca_entity_by_label(function, clock_label);
+ clock_entity = sdca_find_entity_by_label(function, clock_label);
if (!clock_entity) {
dev_err(dev, "%s: failed to find clock with label %s\n",
entity->label, clock_label);
@@ -1873,7 +1874,7 @@ static int find_sdca_entity_connection(struct device *dev,
return ret;
}
- connected_entity = find_sdca_entity_by_label(function, connected_label);
+ connected_entity = sdca_find_entity_by_label(function, connected_label);
if (!connected_entity) {
dev_err(dev, "%s: failed to find entity with label %s\n",
entity->label, connected_label);
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/3] ASoC: SDCA: export sdca_find_entity_by_label() helper
2026-07-29 3:22 [PATCH v2 1/3] ASoC: SDCA: export sdca_find_entity_by_label() helper shumingf
@ 2026-07-30 16:04 ` Charles Keepax
0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2026-07-30 16:04 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:27AM +0800, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> Export the sdca_find_entity_by_label() helper so that codec drivers can
> locate SDCA entities by their labels.
>
> Signed-off-by: Shuming Fan <shumingf@realtek.com>
> ---
Be good to make sure you are CCing at least
patches@opensource.cirrus.com on SDCA patches, safer that I don't
miss them on the list that way.
But the patch looks good:
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 1/3] ASoC: SDCA: export sdca_find_entity_by_label() helper shumingf
2026-07-30 16:04 ` Charles Keepax
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox