Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Fix distorted headphone audio on Acer Predator PHN16-71
@ 2026-11-25  8:16 SungHwan Jung
  2026-11-25  9:36 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: SungHwan Jung @ 2026-11-25  8:16 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound

On the Acer Predator PHN16-71, booting with headphones already
plugged into the 3.5mm jack results in distorted headphone audio
until the headphones are unplugged and replugged.

Vendor COEF 0x4a reads 0x2010 when the distortion occurs, meaning
that the Reset HP JD bit (BIT(15)) is already clear. Clearing the
bit alone doesn't fix the issue.

Add a dedicated fixup (ALC245_FIXUP_ACER_HP_JD_RESET) that sets
and then clears COEF 0x4a BIT(15) during HDA_FIXUP_ACT_INIT while
preserving the remaining coefficient bits.

Chain ALC245_FIXUP_ACER_MICMUTE_LED to retain mic mute LED and
headset microphone support.

Testing confirmed that pulsing COEF 0x4a BIT(15) restores clean
headphone audio.

LLMs were used to assist in analyzing the cause of the headphone
audio distortion and refining the commit message.

Signed-off-by: SungHwan Jung <onenowy@gmail.com>
---
 sound/hda/codecs/realtek/alc269.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 0c2442d98a3e..45371686da62 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1462,6 +1462,17 @@ static void alc245_fixup_minisforum_jack_detect(struct hda_codec *codec,
 		alc_update_coef_idx(codec, 0x4a, BIT(15), 0);
 }
 
+static void alc245_fixup_acer_hp_jd_reset(struct hda_codec *codec,
+					  const struct hda_fixup *fix,
+					  int action)
+{
+	if (action == HDA_FIXUP_ACT_INIT) {
+		/* Pulse Reset HP JD */
+		alc_update_coef_idx(codec, 0x4a, BIT(15), BIT(15));
+		alc_update_coef_idx(codec, 0x4a, BIT(15), 0);
+	}
+}
+
 /* turn on/off mic-mute LED per capture hook via VREF change */
 static int vref_micmute_led_set(struct led_classdev *led_cdev,
 				enum led_brightness brightness)
@@ -4554,6 +4565,7 @@ enum {
 	ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY,
 	ALC245_FIXUP_BASS_HP_DAC,
 	ALC245_FIXUP_ACER_MICMUTE_LED,
+	ALC245_FIXUP_ACER_HP_JD_RESET,
 	ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
 	ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED,
 	ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
@@ -7392,6 +7404,12 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC2XX_FIXUP_HEADSET_MIC,
 	},
+	[ALC245_FIXUP_ACER_HP_JD_RESET] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc245_fixup_acer_hp_jd_reset,
+		.chained = true,
+		.chain_id = ALC245_FIXUP_ACER_MICMUTE_LED,
+	},
 	[ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc245_fixup_hp_mute_led_coefbit,
@@ -7576,7 +7594,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1025, 0x166c, "Acer Predator PH16-71", ALC2XX_FIXUP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1025, 0x1679, "Acer Nitro 16 AN16-41", ALC2XX_FIXUP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
-	SND_PCI_QUIRK(0x1025, 0x170f, "Acer Predator PHN16-71", ALC245_FIXUP_ACER_MICMUTE_LED),
+	SND_PCI_QUIRK(0x1025, 0x170f, "Acer Predator PHN16-71", ALC245_FIXUP_ACER_HP_JD_RESET),
 	SND_PCI_QUIRK(0x1025, 0x171e, "Acer Nitro ANV15-51", ALC245_FIXUP_ACER_MICMUTE_LED),
 	SND_PCI_QUIRK(0x1025, 0x172c, "Acer Nitro ANV16-41", ALC2XX_FIXUP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1025, 0x1731, "Acer Predator PHN16-72", ALC245_FIXUP_ACER_MICMUTE_LED),

base-commit: aa10c1b25efa97f58680298f609c14cc686dcf1e
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-25  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  8:16 [PATCH] ALSA: hda/realtek: Fix distorted headphone audio on Acer Predator PHN16-71 SungHwan Jung
2026-11-25  9:36 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox