All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Banajit Goswami" <bgoswami@quicinc.com>,
	"Oder Chiou" <oder_chiou@realtek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [RFT PATCH 07/17] ASoC: codecs: rtq9128: Handle component name prefix
Date: Mon, 23 Oct 2023 11:54:18 +0200	[thread overview]
Message-ID: <20231023095428.166563-8-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org>

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 sound/soc/codecs/rtq9128.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c
index 371d622c6214..c22b047115cc 100644
--- a/sound/soc/codecs/rtq9128.c
+++ b/sound/soc/codecs/rtq9128.c
@@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco
 
 	dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event);
 
-	if (strcmp(w->name, "DAC1") == 0)
+	if (snd_soc_dapm_widget_name_cmp(w, "DAC1") == 0)
 		shift = 6;
-	else if (strcmp(w->name, "DAC2") == 0)
+	else if (snd_soc_dapm_widget_name_cmp(w, "DAC2") == 0)
 		shift = 4;
-	else if (strcmp(w->name, "DAC3") == 0)
+	else if (snd_soc_dapm_widget_name_cmp(w, "DAC3") == 0)
 		shift = 2;
 	else
 		shift = 0;
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Banajit Goswami" <bgoswami@quicinc.com>,
	"Oder Chiou" <oder_chiou@realtek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [RFT PATCH 07/17] ASoC: codecs: rtq9128: Handle component name prefix
Date: Mon, 23 Oct 2023 11:54:18 +0200	[thread overview]
Message-ID: <20231023095428.166563-8-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org>

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 sound/soc/codecs/rtq9128.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c
index 371d622c6214..c22b047115cc 100644
--- a/sound/soc/codecs/rtq9128.c
+++ b/sound/soc/codecs/rtq9128.c
@@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco
 
 	dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event);
 
-	if (strcmp(w->name, "DAC1") == 0)
+	if (snd_soc_dapm_widget_name_cmp(w, "DAC1") == 0)
 		shift = 6;
-	else if (strcmp(w->name, "DAC2") == 0)
+	else if (snd_soc_dapm_widget_name_cmp(w, "DAC2") == 0)
 		shift = 4;
-	else if (strcmp(w->name, "DAC3") == 0)
+	else if (snd_soc_dapm_widget_name_cmp(w, "DAC3") == 0)
 		shift = 2;
 	else
 		shift = 0;
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-10-23  9:55 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23  9:54 [RFT PATCH 00/17] ASoC: fix widget name comparisons (consider DAI name prefix) Krzysztof Kozlowski
2023-10-23  9:54 ` Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 01/17] ASoC: codecs: 88pm860x: Handle component name prefix Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 02/17] ASoC: codecs: adau1373: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  5:41   ` Nuno Sá
2023-10-26  5:41     ` Nuno Sá
2023-10-23  9:54 ` [RFT PATCH 03/17] ASoC: codecs: adav80x: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  5:43   ` Nuno Sá
2023-10-26  5:43     ` Nuno Sá
2023-10-23  9:54 ` [PATCH 04/17] ASoC: codecs: lpass-rx-macro: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 05/17] ASoC: codecs: max9867: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  5:42   ` Nuno Sá
2023-10-26  5:42     ` Nuno Sá
2023-10-23  9:54 ` [RFT PATCH 06/17] ASoC: codecs: rt5682s: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-23  9:54 ` Krzysztof Kozlowski [this message]
2023-10-23  9:54   ` [RFT PATCH 07/17] ASoC: codecs: rtq9128: " Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 08/17] ASoC: codecs: wcd9335: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 09/17] ASoC: codecs: wm8962: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  8:52   ` Charles Keepax
2023-10-26  8:52     ` Charles Keepax
2023-10-23  9:54 ` [RFT PATCH 10/17] ASoC: codecs: wm8994: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  8:52   ` Charles Keepax
2023-10-26  8:52     ` Charles Keepax
2023-10-23  9:54 ` [RFT PATCH 11/17] ASoC: codecs: wm8995: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26  8:52   ` Charles Keepax
2023-10-26  8:52     ` Charles Keepax
2023-10-23  9:54 ` [RFT PATCH 12/17] ASoC: mediatek: mt8183: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-24  8:54   ` AngeloGioacchino Del Regno
2023-10-24  8:54     ` AngeloGioacchino Del Regno
2023-10-23  9:54 ` [RFT PATCH 13/17] ASoC: mediatek: mt8186: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-24  8:54   ` AngeloGioacchino Del Regno
2023-10-24  8:54     ` AngeloGioacchino Del Regno
2023-10-23  9:54 ` [RFT PATCH 14/17] ASoC: mediatek: mt8188: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-24  8:54   ` AngeloGioacchino Del Regno
2023-10-24  8:54     ` AngeloGioacchino Del Regno
2023-10-26  9:09   ` Trevor Wu (吳文良)
2023-10-26  9:09     ` Trevor Wu (吳文良)
2023-10-23  9:54 ` [RFT PATCH 15/17] ASoC: mediatek: mt8192: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-24  8:54   ` AngeloGioacchino Del Regno
2023-10-24  8:54     ` AngeloGioacchino Del Regno
2023-10-23  9:54 ` [RFT PATCH 16/17] ASoC: samsung: speyside: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-23  9:54 ` [RFT PATCH 17/17] ASoC: tegra: machine: " Krzysztof Kozlowski
2023-10-23  9:54   ` Krzysztof Kozlowski
2023-10-26 17:10 ` [RFT PATCH 00/17] ASoC: fix widget name comparisons (consider DAI name prefix) Mark Brown
2023-10-26 17:10   ` 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=20231023095428.166563-8-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=oder_chiou@realtek.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=s.nawrocki@samsung.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.