Re: [PATCH] ASoC: codecs: wsa884x: Add mute control knob
From: Mark Brown
Date: Thu Oct 15 2026 - 14:11:21 EST
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.
Attachment:
signature.asc
Description: PGP signature