summaryrefslogtreecommitdiff
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-10-10 17:07:17 +0100
committerMark Brown <broonie@kernel.org>2023-10-10 17:07:17 +0100
commit3c716e7f8acd039864b17f63d8506862b8c63f82 (patch)
tree3671be90ff9cd8f5cd6c547e7af5d35b0d6745a1 /sound/soc/soc-dapm.c
parent4a221b2e3340f4a3c2b414c46c846a26c6caf820 (diff)
parent99d426c6dd2d6f9734617ec12def856ee35b9218 (diff)
downloadlwn-3c716e7f8acd039864b17f63d8506862b8c63f82.tar.gz
lwn-3c716e7f8acd039864b17f63d8506862b8c63f82.zip
ASoC: Merge fixes for consistent cs42l43 schema
We have adjacent changes for the cs42l43 DT schema, merge the fixes branch up so that there's a single thing for people to base future changes on.
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2e3df47c9cf3..4e2beda6f9bf 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2728,6 +2728,18 @@ int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_update_dai);
+int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s)
+{
+ struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
+ const char *wname = widget->name;
+
+ if (component->name_prefix)
+ wname += strlen(component->name_prefix) + 1; /* plus space */
+
+ return strcmp(wname, s);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_widget_name_cmp);
+
/*
* dapm_update_widget_flags() - Re-compute widget sink and source flags
* @w: The widget for which to update the flags