From: Takashi Iwai <tiwai@suse.de>
To: Zhang Heng <zhangheng@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/realtek: Add quirk for CSL Unity BF24B
Date: Thu, 09 Apr 2026 07:09:12 +0200 [thread overview]
Message-ID: <873414lnyf.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260409024028.1297587-1-zhangheng@kylinos.cn>
On Thu, 09 Apr 2026 04:40:28 +0200,
Zhang Heng wrote:
>
> The CSL Unity BF24B all-in-one PC uses a Realtek ALC662 rev3 audio
> codec and requires the correct GPIO configuration to enable sound
> output from both the speakers and the headphone.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=221258
> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
> ---
> sound/hda/codecs/realtek/alc662.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/sound/hda/codecs/realtek/alc662.c b/sound/hda/codecs/realtek/alc662.c
> index 5073165d1f3c..3abe41c7315c 100644
> --- a/sound/hda/codecs/realtek/alc662.c
> +++ b/sound/hda/codecs/realtek/alc662.c
> @@ -255,6 +255,25 @@ static void alc_fixup_headset_mode_alc668(struct hda_codec *codec,
> alc_fixup_headset_mode(codec, fix, action);
> }
>
> +static void alc662_fixup_csl_amp(struct hda_codec *codec,
> + const struct hda_fixup *fix, int action)
> +{
> + struct alc_spec *spec = codec->spec;
> +
> + switch (action) {
> + case HDA_FIXUP_ACT_PRE_PROBE:
> + spec->gpio_mask |= 0x03;
> + spec->gpio_dir |= 0x03;
> + break;
Do we need to set gpio_mask and gpio_dir explicitly for this bit?
Looking at the rest of the patch...
> + case HDA_FIXUP_ACT_INIT:
> + /* need to toggle GPIO to enable the amp */
> + alc_update_gpio_data(codec, 0x03, true);
> + msleep(100);
> + alc_update_gpio_data(codec, 0x03, false);
> + break;
... here is the only place to fiddle with this GPIO bit, and it's used
for gating. OTOH, spec->gpio_mask, gpio_dir and gpio_data are used at
alc_write_gpio() that is called from alc_init(), and IIUC, this bit
doesn't have to be initialized there.
thanks,
Takashi
next prev parent reply other threads:[~2026-04-09 5:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 2:40 [PATCH] ALSA: hda/realtek: Add quirk for CSL Unity BF24B Zhang Heng
2026-04-09 5:09 ` Takashi Iwai [this message]
2026-04-09 5:58 ` Zhang Heng
2026-04-09 6:28 ` Takashi Iwai
2026-04-09 6:30 ` Takashi Iwai
2026-04-09 6:33 ` Zhang Heng
2026-04-09 6:47 ` Takashi Iwai
2026-04-09 7:00 ` Zhang Heng
2026-04-09 7:24 ` Takashi Iwai
2026-04-09 7:51 ` Zhang Heng
2026-04-09 7:59 ` Takashi Iwai
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=873414lnyf.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=zhangheng@kylinos.cn \
/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