From: Takashi Iwai <tiwai@suse.de>
To: Zhang Heng <zhangheng@kylinos.cn>
Cc: tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
Johan den Hollander <johan.den.hollander@finalist.nl>
Subject: Re: [PATCH] ALSA: hda/realtek: Add GPIO2 low quirk for ASUS E5402WHA
Date: Tue, 13 Oct 2026 09:03:10 +0200 [thread overview]
Message-ID: <87cxteozf5.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261013062532.216712-1-zhangheng@kylinos.cn>
On Tue, 13 Oct 2026 08:25:32 +0200,
Zhang Heng wrote:
>
> The internal speaker amplifier on the ASUS ExpertCenter AIO E5402WHA
> (ALC256, SSID 1043:3500) is enabled via GPIO2 and is active-low.
> Driving GPIO2 high, as ALC256_FIXUP_ASUS_AIO_GPIO2 does on the ZN270IE,
> keeps the speakers muted. Add a dedicated fixup that drives GPIO2 low
> so the internal speakers work.
>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221938
> Tested-by: Johan den Hollander <johan.den.hollander@finalist.nl>
> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
> ---
> sound/hda/codecs/realtek/alc269.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index 9eeb3a66b2b9..7021a573bd49 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -2809,6 +2809,19 @@ static void alc275_fixup_gpio4_off(struct hda_codec *codec,
> }
> }
>
> +static void alc256_fixup_asus_aio_gpio2_low(struct hda_codec *codec,
> + const struct hda_fixup *fix,
> + int action)
> +{
> + struct alc_spec *spec = codec->spec;
> +
> + if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> + spec->gpio_mask |= 0x04;
> + spec->gpio_dir |= 0x04;
> + spec->gpio_data &= ~0x04;
> + }
> +}
> +
> /* Quirk for Thinkpad X1 7th and 8th Gen
> * The following fixed routing needed
> * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
> @@ -4250,6 +4263,7 @@ enum {
> ALC256_FIXUP_ASUS_HEADSET_MODE,
> ALC256_FIXUP_ASUS_MIC,
> ALC256_FIXUP_ASUS_AIO_GPIO2,
> + ALC256_FIXUP_ASUS_AIO_GPIO2_LOW,
> ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
> ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
> ALC233_FIXUP_LENOVO_MULTI_CODECS,
> @@ -5584,6 +5598,10 @@ static const struct hda_fixup alc269_fixups[] = {
> /* Set up GPIO2 for the speaker amp */
> .v.func = alc_fixup_gpio4,
> },
> + [ALC256_FIXUP_ASUS_AIO_GPIO2_LOW] = {
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc256_fixup_asus_aio_gpio2_low,
> + },
> [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = {
> .type = HDA_FIXUP_PINS,
> .v.pins = (const struct hda_pintbl[]) {
> @@ -8124,6 +8142,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x3391, "ASUS PM3606CKA", ALC287_FIXUP_CS35L41_I2C_2),
> + SND_PCI_QUIRK(0x1043, 0x3500, "ASUS E5402WHA", ALC256_FIXUP_ASUS_AIO_GPIO2_LOW),
> SND_PCI_QUIRK(0x1043, 0x3501, "ASUS PM3606CHA", ALC256_FIXUP_ASUS_SPEAKER_COEFS),
> SND_PCI_QUIRK(0x1043, 0x3601, "ASUS PM5406CGA", ALC287_FIXUP_CS35L41_I2C_2),
> SND_PCI_QUIRK(0x1043, 0x3611, "ASUS PM5606CGA", ALC287_FIXUP_CS35L41_I2C_2),
> @@ -8786,6 +8805,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
> {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
> {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
> {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
> + {.id = ALC256_FIXUP_ASUS_AIO_GPIO2_LOW, .name = "alc256-asus-aio-low"},
> {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
> {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
> {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
We don't need to add a fixup model string for usual cases any longer;
you can invoke the quirk with the alias. Could you drop this part and
resubmit?
thanks,
Takashi
prev parent reply other threads:[~2026-10-13 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 6:25 [PATCH] ALSA: hda/realtek: Add GPIO2 low quirk for ASUS E5402WHA Zhang Heng
2026-10-13 7:03 ` Takashi Iwai [this message]
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=87cxteozf5.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=johan.den.hollander@finalist.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--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