From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Aaron Ma <aaron.ma@canonical.com>
Cc: oder_chiou@realtek.com, lgirdwood@gmail.com, broonie@kernel.org,
perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
"shumingf@realtek.com" <shumingf@realtek.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: Re: [PATCH] ASoC: rt722-sdca: add FU06 Playback Switch for speaker mute control
Date: Fri, 24 Apr 2026 15:09:10 +0200 [thread overview]
Message-ID: <5ef5113c-b66f-468f-a906-72a8dcb67920@linux.dev> (raw)
In-Reply-To: <CAJ6xRxVy5+PnoNDK0z=15PrsUXewAgZb6y=a4pdUQ5JTqphk8A@mail.gmail.com>
On 4/24/26 05:52, Aaron Ma wrote:
> On Thu, Apr 23, 2026 at 9:01 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.dev> wrote:
>>
>> On 4/23/26 12:13, Aaron Ma wrote:
>>> The rt722-sdca codec driver exposes FU06 Playback Volume but no
>>> corresponding mute switch. Without a user-facing ALSA switch, UCM
>>> cannot attach the speaker mute LED via snd_ctl_led, and PipeWire
>>> cannot drive hardware mute.
>>>
>>> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
>>> ---
>>> sound/soc/codecs/rt722-sdca.c | 77 ++++++++++++++++++++++++++++-------
>>> sound/soc/codecs/rt722-sdca.h | 4 ++
>>> 2 files changed, 67 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c
>>> index 79b8b7e70a334..23d2f63d68ef3 100644
>>> --- a/sound/soc/codecs/rt722-sdca.c
>>> +++ b/sound/soc/codecs/rt722-sdca.c
>>> @@ -517,6 +517,61 @@ static int rt722_sdca_fu1e_capture_put(struct snd_kcontrol *kcontrol,
>>> return changed;
>>> }
>>>
>>> +static int rt722_sdca_set_fu06_playback_ctl(struct rt722_sdca_priv *rt722)
>>> +{
>>> + int err;
>>> + unsigned int ch_l, ch_r;
>>> +
>>> + ch_l = (rt722->fu06_dapm_mute || rt722->fu06_mixer_l_mute) ? 0x01 : 0x00;
>>> + ch_r = (rt722->fu06_dapm_mute || rt722->fu06_mixer_r_mute) ? 0x01 : 0x00;
>>> +
>>> + err = regmap_write(rt722->regmap,
>>> + SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_USER_FU06,
>>> + RT722_SDCA_CTL_FU_MUTE, CH_L), ch_l);
>>> + if (err < 0)
>>> + return err;
>>> +
>>> + err = regmap_write(rt722->regmap,
>>> + SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_USER_FU06,
>>> + RT722_SDCA_CTL_FU_MUTE, CH_R), ch_r);
>>
>> IIRC you can mute all channels at once in a FU (Feature Unit) using Control Number 0.
>>
>> If both channels need to be muted/unmuted it's better to do so in a single command.
>>
>
> Thanks for the review.
>
> The per-channel mute writes are unchanged from the existing DAPM
> handler, just moved into a helper.
> All rt711/rt712/rt722 drivers use per-channel writes for FU_MUTE — no
> CN0 precedent exists.
Fair enough, something to do in the future...
While I am at it, in theory those registers are Dual-Ranked, with a 'commit' mechanism to deal with all volume changes at the same time. We'll need to add support for Dual-Ranked registers at some point, not sure how this can be bolted in regmap support... Cc: Charles for future SDCA improvements...
For now, here's a
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
next prev parent reply other threads:[~2026-04-24 13:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 10:13 [PATCH] ASoC: rt722-sdca: add FU06 Playback Switch for speaker mute control Aaron Ma
2026-04-23 13:01 ` Pierre-Louis Bossart
2026-04-24 3:52 ` Aaron Ma
2026-04-24 13:09 ` Pierre-Louis Bossart [this message]
2026-04-24 15:53 ` Charles Keepax
2026-04-27 14:53 ` Pierre-Louis Bossart
2026-04-29 9:23 ` Charles Keepax
2026-04-26 23:23 ` 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=5ef5113c-b66f-468f-a906-72a8dcb67920@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=aaron.ma@canonical.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=shumingf@realtek.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.