From: ChiYuan Huang <cy_huang@richtek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Allen Lin <allen_lin@richtek.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] ASoC: codecs: rtq9128: Fix string compare in DAPM event callback
Date: Tue, 31 Oct 2023 17:45:35 +0800 [thread overview]
Message-ID: <20231031094535.GA15465@linuxcarl2.richtek.com> (raw)
In-Reply-To: <1697795435-5858-2-git-send-email-cy_huang@richtek.com>
On Fri, Oct 20, 2023 at 05:50:33PM +0800, cy_huang@richtek.com wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
>
> Since widget name may concatenate the component prefix. To compare the
> the name with 'strcmp' function in shared DAPM event callback will
> cause the wrong RG field control. Use 'strstr' function, instead.
>
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> ---
> 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..8c1c3c65475e 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 (strstr(w->name, "DAC1"))
> shift = 6;
> - else if (strcmp(w->name, "DAC2") == 0)
> + else if (strstr(w->name, "DAC2"))
> shift = 4;
> - else if (strcmp(w->name, "DAC3") == 0)
> + else if (strstr(w->name, "DAC3"))
> shift = 2;
> else
> shift = 0;
https://lore.kernel.org/lkml/20231023095428.166563-8-krzysztof.kozlowski@linaro.org/
Since the better change is applied. Please ignore this one.
Still wait the other patch(2&3)'s feedback.
Thanks.
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-10-31 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 9:50 [PATCH 0/3] ASoC: codecs: rtq9128: Several application fixes cy_huang
2023-10-20 9:50 ` [PATCH 1/3] ASoC: codecs: rtq9128: Fix string compare in DAPM event callback cy_huang
2023-10-31 9:45 ` ChiYuan Huang [this message]
2023-10-20 9:50 ` [PATCH 2/3] ASoC: codecs: rtq9128: Fix TDM enable and DAI format control flow cy_huang
2023-10-20 9:50 ` [PATCH 3/3] ASoC: codecs: rtq9128: Fix TKA470B E1 version amp on sequence cy_huang
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=20231031094535.GA15465@linuxcarl2.richtek.com \
--to=cy_huang@richtek.com \
--cc=allen_lin@richtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox