From: Sebastian Reichel <sre@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: codecs: wsa884x: Add mute control knob
Date: Sat, 17 Oct 2026 21:45:33 +0200 [thread overview]
Message-ID: <atPPpADkwx_5BeVf@venus> (raw)
In-Reply-To: <55831eb0-b7b0-43f3-8c03-4d1029ea97a2@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]
Hello Mark,
On Thu, Oct 15, 2026 at 07:10:58PM +0100, Mark Brown wrote:
> On Wed, Oct 14, 2026 at 07:02:54PM +0200, Sebastian Reichel wrote:
>
> > This codec is typically used with ALSA UCM, which right now falls back
> > to handling mute in software. Expose proper hardware mute control
> > considering the driver already handles it internally anyways, which
> > allows UCM to bind speaker mute LED to the new control knob.
>
> > + wsa884x->user_mute = mute;
> > + if (wsa884x->pa_on)
> > + wsa884x_set_mute(component, mute || wsa884x->trigger_mute);
>
> This is checking for pa_on but...
>
> > static int wsa884x_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
> > {
>
> > + guard(mutex)(&wsa884x->sp_lock);
> > + wsa884x->trigger_mute = mute;
> > + wsa884x_set_mute(component, mute || wsa884x->user_mute);
>
> ...I can't see what guarantees that pa_on is set here. It looks like
> these are mono speakers with multiple speakers connected to a stream,
> someone could fiddle with the routing on an active stream and power up a
> speaker. We should probably recheck in the speaker event.
pa_on is set via SND_SOC_DAPM_POST_PMU/SND_SOC_DAPM_PRE_PMD. My
rationale was, that mute update is not needed with the widget
powered down and at startup the .mute_stream handler will update
the mute state automatically.
Greetings,
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-10-17 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 17:02 Sebastian Reichel
2026-10-15 17:54 ` Mark Brown
2026-10-17 19:41 ` Sebastian Reichel
2026-10-15 18:10 ` Mark Brown
2026-10-17 19:45 ` Sebastian Reichel [this message]
2026-10-18 11:57 ` 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=atPPpADkwx_5BeVf@venus \
--to=sre@kernel.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=srini@kernel.org \
--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
all inboxes | Powered by JetHome®