From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: <pierre-louis.bossart@linux.intel.com>,
<rander.wang@linux.intel.com>, <shumingf@realtek.com>,
<patches@opensource.cirrus.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH] ASoC: dapm: Revert "use component prefix when checking widget names"
Date: Sat, 3 Jul 2021 13:50:34 +0100 [thread overview]
Message-ID: <20210703125034.24655-1-rf@opensource.cirrus.com> (raw)
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@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
next reply other threads:[~2021-07-03 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-03 12:50 Richard Fitzgerald [this message]
2021-07-05 16:50 ` [PATCH] ASoC: dapm: Revert "use component prefix when checking widget names" Mark Brown
2021-07-22 9:55 ` Richard Fitzgerald
2021-07-23 15:17 ` Richard Fitzgerald
2021-07-23 15:24 ` Mark Brown
2021-07-28 16:09 ` Mark Brown
2021-07-28 18:29 ` Richard Fitzgerald
2021-07-28 23:40 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210703125034.24655-1-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rander.wang@linux.intel.com \
--cc=shumingf@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).