Re: [PATCH] ALSA: hda/realtek: Restore headset mic COEF and restart HP JD on init
From: Takashi Iwai
Date: Tue Dec 01 2026 - 02:52:00 EST
On Sun, 29 Nov 2026 17:21:19 +0100,
Nguyen Thanh Nhat wrote:
>
> alc2xx_fixup_headset_mic() configures vendor COEF 0x45 for CTIA
> combo-jack headset mic routing only during HDA_FIXUP_ACT_PRE_PROBE.
> Because COEF 0x45 is not preserved across S3 suspend/resume, the
> headset microphone stops working after waking from sleep.
>
> Commit 655a830a248d ("ALSA: hda/realtek: Fix distorted headphone audio
> on Acer Predator PHN16-71") pulses Reset HP JD (COEF 0x4a BIT(15)) on
> HDA_FIXUP_ACT_INIT for Acer Predator PHN16-71 (Realtek ALC245,
> 1025:170f). However, restoring COEF 0x45 alone (0xc689 -> 0x5289) or
> pulsing COEF 0x4a BIT(15) before restoring COEF 0x45 still leaves
> headphone audio distorted and the headset mic non-working until the
> headset is unplugged and replugged. Restoring COEF 0x45 first and then
> pulsing COEF 0x4a BIT(15) restores both cleanly.
>
> Add 0x10ec0245 to alc_combo_jack_hp_jd_restart() and invoke both the
> COEF 0x45 update and alc_combo_jack_hp_jd_restart() during
> HDA_FIXUP_ACT_INIT in alc2xx_fixup_headset_mic(). This makes the
> PHN16-71-specific ALC245_FIXUP_ACER_HP_JD_RESET wrapper redundant, so
> remove it and point 1025:170f back to ALC245_FIXUP_ACER_MICMUTE_LED
> (which chains to ALC2XX_FIXUP_HEADSET_MIC).
>
> Verified on Acer Predator PHN16-71 with a custom build of this tree
> across cold boot, S3 suspend/resume, and unplug/replug.
>
> An AI coding assistant was used to analyze the codec driver behavior
> and interpret COEF register values.
>
> Fixes: c8c0a03ec1be ("ALSA: hda/realtek - Fixed ASUS platform headset Mic issue")
> Signed-off-by: Nguyen Thanh Nhat <nguyenthanhnhat397@xxxxxxxxx>
Applied now. Thanks.
Takashi