* [PATCH v2 0/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C
@ 2026-12-05 21:38 Hsinyi Chien
2026-12-05 21:38 ` [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() Hsinyi Chien
2026-12-05 21:38 ` [PATCH v2 2/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien
0 siblings, 2 replies; 5+ messages in thread
From: Hsinyi Chien @ 2026-12-05 21:38 UTC (permalink / raw)
To: tiwai, perex; +Cc: linux-sound, Hsinyi Chien
v1 put the GU605CX on the power-save deny-list:
[RFC PATCH] ALSA: hda/intel: Disable power saving on ASUS GU605CX
Takashi pointed out that the deny-list is a last resort and that a
codec quirk is usually the better fix. That is the case here. The
pop comes from the headphone pin control write in alc225_shutup(),
not from D3.
Changes since v1:
- Drop the deny-list entry and its DMI match.
- Patch 1 makes alc225_shutup() honor no_shutup_pins, as the other
shutup functions do.
- Patch 2 sets the flag for SSID 1043:1034.
- Use my real name in From and Signed-off-by.
Patch 1 also changes other machines that already set no_shutup_pins.
Its changelog has the details. If that is not acceptable, I can keep
the change local to this model.
Tests on the GU605CX. Unless noted, iLoud Micro Monitor powered
speakers are on the 3.5 mm jack. Each run plays a 1 s tone with
power_save=10, waits for the codec to runtime-suspend, and records
whether I heard a pop:
7.2.15 distro kernel, default pop 2/2
7.2.15, hint "shutup = no" no pop 2/2
7.2.15, power_save_controller=N pop 2/2
7.3.4 Arch kernel, stock alc269 module pop 2/2
7.3.4, alc269 module with both patches no pop 2/2
same, with headphones on the jack no pop 2/2
The hda trace events were recorded for every run. The stock module
writes SET_PIN_WIDGET_CONTROL 0 to pin 0x21 twice at suspend. The
patched module still sends the coef 0x4a toggle, the HP amp mute,
EAPD off and D3, and no pin control write.
Replaying the alc225_shutup() verbs through hwdep on 7.2.15, with the
codec kept in D0:
full sequence pop 2/2
without the pin control write on 0x21 no pop 2/2
without the coef 0x4a toggle pop 2/2
without the HP amp mute pop 1/2
Shutdown and reboot pop with the stock module. One shutdown with the
patched module did not pop. The shutdown checks were not traced.
Limits of the testing:
- The patched module was built from the v7.3.4-arch1 source plus
the same change as these two patches. On this base the series is
only compile tested.
- Headphones were only tested with the patched module. I do not
know whether they pop without the patches.
- Not tested: internal speakers, switching between the internal
speakers and the jack, system suspend and resume, and every
other machine that patch 1 affects.
Tool use: v1 was prepared with OpenAI Codex. For v2 an LLM coding
assistant (Anthropic Claude) wrote the two test scripts, read the
traces, and drafted the patches, the changelogs and this letter,
starting from my request to try a codec-side fix. I ran every
listening test myself and reviewed the result.
Hsinyi Chien (2):
ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup()
ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C
sound/hda/codecs/realtek/alc269.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
base-commit: 4ce2a02a314739cafb6c44433324c13f92060a7d
--
2.56.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() 2026-12-05 21:38 [PATCH v2 0/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien @ 2026-12-05 21:38 ` Hsinyi Chien 2026-12-05 21:53 ` sashiko-bot 2026-12-05 21:38 ` [PATCH v2 2/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien 1 sibling, 1 reply; 5+ messages in thread From: Hsinyi Chien @ 2026-12-05 21:38 UTC (permalink / raw) To: tiwai, perex; +Cc: linux-sound, Hsinyi Chien alc282_shutup(), alc283_shutup(), alc256_shutup() and alc_default_shutup() do not clear the headphone pin control when spec->no_shutup_pins is set. alc225_shutup() clears it unconditionally, so on the codecs that use alc225_shutup() the flag only skips the later alc_shutup_pins() call. Skip the pin control write in alc225_shutup() too when the flag is set. The 3k pull-low toggle, the headphone amp mute and the EAPD change stay as they are. This changes runtime suspend and shutdown on every machine that already sets no_shutup_pins and has a codec that uses alc225_shutup(), for example through alc_fixup_thinkpad_acpi(). The headphone pin control is no longer cleared there. Only the ASUS GU605CX was tested, with the fixup from the next patch. This patch and its changelog were drafted with an LLM coding assistant (Anthropic Claude). Signed-off-by: Hsinyi Chien <suzu1dev@gmail.com> --- sound/hda/codecs/realtek/alc269.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index d4646f025..1bf5c78ac 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -687,12 +687,14 @@ static void alc225_shutup(struct hda_codec *codec) msleep(75); - if (hp1_pin_sense) - snd_hda_codec_write(codec, hp_pin, 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); - if (hp2_pin_sense) - snd_hda_codec_write(codec, 0x16, 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); + if (!spec->no_shutup_pins) { + if (hp1_pin_sense) + snd_hda_codec_write(codec, hp_pin, 0, + AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); + if (hp2_pin_sense) + snd_hda_codec_write(codec, 0x16, 0, + AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); + } msleep(75); alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); -- 2.56.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() 2026-12-05 21:38 ` [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() Hsinyi Chien @ 2026-12-05 21:53 ` sashiko-bot 2026-12-05 22:01 ` Hsinyi Chien 0 siblings, 1 reply; 5+ messages in thread From: sashiko-bot @ 2026-12-05 21:53 UTC (permalink / raw) To: Hsinyi Chien; +Cc: linux-sound Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] ALSA: hda/realtek: missing Fixes trailer for alc225_shutup() no_shutup_pins -- commit 0a0853f2c09e04f93a99b33ccf24a99357c64345 Author: Hsinyi Chien <suzu1dev@gmail.com> > ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() > > alc282_shutup(), alc283_shutup(), alc256_shutup() and > alc_default_shutup() do not clear the headphone pin control when > spec->no_shutup_pins is set. alc225_shutup() clears it > unconditionally, so on the codecs that use alc225_shutup() the flag > only skips the later alc_shutup_pins() call. > > Skip the pin control write in alc225_shutup() too when the flag is > set. The 3k pull-low toggle, the headphone amp mute and the EAPD > change stay as they are. > > This changes runtime suspend and shutdown on every machine that > already sets no_shutup_pins and has a codec that uses > alc225_shutup(), for example through alc_fixup_thinkpad_acpi(). The > headphone pin control is no longer cleared there. Only the ASUS > GU605CX was tested, with the fixup from the next patch. > > This patch and its changelog were drafted with an LLM coding > assistant (Anthropic Claude). > > Signed-off-by: Hsinyi Chien <suzu1dev@gmail.com> [Severity: Low] This fixes an omission from the commit that introduced spec->no_shutup_pins and guarded the other shutup callbacks, leaving the headphone pin control writes in alc225_shutup() unguarded. Should this include: Fixes: c0ca5eced222 ("ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone") -- Sashiko AI review · https://sashiko.dev/#/patchset/20261205213840.62481-1-suzu1dev@gmail.com?part=1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() 2026-12-05 21:53 ` sashiko-bot @ 2026-12-05 22:01 ` Hsinyi Chien 0 siblings, 0 replies; 5+ messages in thread From: Hsinyi Chien @ 2026-12-05 22:01 UTC (permalink / raw) To: sashiko-reviews; +Cc: linux-sound, tiwai > This fixes an omission from the commit that introduced spec->no_shutup_pins > and guarded the other shutup callbacks, leaving the headphone pin control > writes in alc225_shutup() unguarded. Should this include: > > Fixes: c0ca5eced222 ("ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone") I checked, and the history is as described. c0ca5eced222 added no_shutup_pins and guarded the write in alc282_shutup(), alc283_shutup(), alc256_shutup() and alc_default_shutup(). alc225_shutup() already had both headphone pin control writes at that point, and that commit only changed its final call to alc_shutup_pins(). Before that commit, alc_fixup_no_shutup() replaced the whole shutup callback with an empty one. Machines with this fixup and a codec that uses alc225_shutup() did not clear the headphone pin control at all then. Patch 1 brings that part back. I left the tag out of v2 because I had not checked the history. Takashi, do you want the Fixes tag on patch 1? It would send the change to stable for machines I could not test. I can add it in a v3, or you can add it when applying, whichever you prefer. Hsinyi Chien ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C 2026-12-05 21:38 [PATCH v2 0/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien 2026-12-05 21:38 ` [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() Hsinyi Chien @ 2026-12-05 21:38 ` Hsinyi Chien 1 sibling, 0 replies; 5+ messages in thread From: Hsinyi Chien @ 2026-12-05 21:38 UTC (permalink / raw) To: tiwai, perex; +Cc: linux-sound, Hsinyi Chien On the ASUS ROG Zephyrus G16 GU605CX (ALC285, SSID 1043:1034), powered speakers on the 3.5 mm jack pop loudly when the codec runtime-suspends after playback stops. The same pop occurs at shutdown. The pop comes from the pin control write in alc225_shutup(): - With the "shutup = no" hint, the codec still enters D3 and the controller still runtime-suspends, and there is no pop. - With power_save_controller=N and the default shutup, the pop remains. - Replaying the alc225_shutup() verbs through hwdep with the codec kept in D0 pops, unless SET_PIN_WIDGET_CONTROL 0 on the headphone pin 0x21 is left out. Set no_shutup_pins for this SSID with a new fixup that chains to the existing one. The existing fixup is shared with the GU605M, H7606W and GA605W entries. Those models were not tested, so it stays unchanged. With both patches in a 7.3.4 build of snd-hda-codec-alc269, the speakers no longer pop on runtime suspend (0 of 2 runs, against 2 of 2 without the patches), and the hda trace shows no pin control write at suspend. Headphones on the same jack did not pop either (0 of 2 runs, patched module only). One shutdown with the patched module did not pop. The GU605CW has the same SSID and was not tested. An LLM coding assistant (Anthropic Claude) wrote the test scripts that narrowed this down, read the hda traces, and drafted this patch and changelog. All listening tests were done by me on the hardware. Link: https://github.com/omacom/omarchy/pull/10498 Signed-off-by: Hsinyi Chien <suzu1dev@gmail.com> --- sound/hda/codecs/realtek/alc269.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 1bf5c78ac..5a9896677 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -4537,6 +4537,7 @@ enum { ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1, ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1, + ALC285_FIXUP_ASUS_GU605C_NO_SHUTUP, ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318, ALC256_FIXUP_CHROME_BOOK, ALC245_FIXUP_CLEVO_NOISY_MIC, @@ -7265,6 +7266,12 @@ static const struct hda_fixup alc269_fixups[] = { { } }, }, + [ALC285_FIXUP_ASUS_GU605C_NO_SHUTUP] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_no_shutup, + .chained = true, + .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1, + }, [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = { .type = HDA_FIXUP_FUNC, .v.func = alc285_fixup_speaker2_to_dac1, @@ -8180,7 +8187,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8f95, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED_INVERTED), SND_PCI_QUIRK(0x1043, 0x1024, "ASUS Zephyrus G14 2025", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), - SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), + SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605C_NO_SHUTUP), SND_PCI_QUIRK(0x103c, 0x900c, "HP ZBook Ultra G1a 14", ALC285_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), -- 2.56.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-05 22:02 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-12-05 21:38 [PATCH v2 0/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien 2026-12-05 21:38 ` [PATCH v2 1/2] ALSA: hda/realtek: Honor no_shutup_pins in alc225_shutup() Hsinyi Chien 2026-12-05 21:53 ` sashiko-bot 2026-12-05 22:01 ` Hsinyi Chien 2026-12-05 21:38 ` [PATCH v2 2/2] ALSA: hda/realtek: Fix headphone jack pop on ASUS GU605C Hsinyi Chien
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.