[PATCH] ASoC: dapm: Revert "use component prefix when checking widget names"
Richard Fitzgerald
rf at opensource.cirrus.com
Sat Jul 3 14:50:34 CEST 2021
This reverts
commit ae4fc532244b ("ASoC: dapm: use component prefix when checking widget names")
That commit breaks all users of the snd_soc_component_*_pin() functions
because it results in the prefix being added twice. It also breaks code
that correctly uses the snd_soc_dapm_*_pin() functions.
Use the snd_soc_component_*_pin() functions if you want the component
prefix to be prepended automatically.
Use the raw snd_soc_dapm_*_pin() functions if the caller has the full
name that should be matched exactly.
Fixes: commit ae4fc532244b ("ASoC: dapm: use component prefix when checking widget names")
Signed-off-by: Richard Fitzgerald <rf at opensource.cirrus.com>
---
sound/soc/soc-dapm.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 91bf939d5233..1369a3fea911 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2528,20 +2528,9 @@ static struct snd_soc_dapm_widget *dapm_find_widget(
{
struct snd_soc_dapm_widget *w;
struct snd_soc_dapm_widget *fallback = NULL;
- char prefixed_pin[80];
- const char *pin_name;
- const char *prefix = soc_dapm_prefix(dapm);
-
- if (prefix) {
- snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s",
- prefix, pin);
- pin_name = prefixed_pin;
- } else {
- pin_name = pin;
- }
for_each_card_widgets(dapm->card, w) {
- if (!strcmp(w->name, pin_name)) {
+ if (!strcmp(w->name, pin)) {
if (w->dapm == dapm)
return w;
else
--
2.11.0
More information about the Alsa-devel
mailing list