* [PATCH] ALSA: hda/realtek: Restore headset mic after suspend for Acer Nitro 5
@ 2026-05-08 21:57 Breno Baptista
2026-05-15 6:37 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Breno Baptista @ 2026-05-08 21:57 UTC (permalink / raw)
To: linux-sound; +Cc: tiwai, perex, linux-kernel, Breno Baptista
The headset mic on the AN515-57 was shown as unplugged after resuming
from S3/S4, requiring a reboot to recover.
Signed-off-by: Breno Baptista <brenomb07@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 11d0ea8ed859..449a5ab3b0d0 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3578,6 +3578,16 @@ static void alc2xx_fixup_headset_mic(struct hda_codec *codec,
alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
break;
+ case HDA_FIXUP_ACT_INIT:
+ /*
+ * COEF 0x45 (CTIA combo jack mode) is not preserved across suspend.
+ * Restore it before restarting HP JD so the headset is re-detected.
+ */
+ if (is_s3_resume(codec) || is_s4_resume(codec)) {
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
+ alc_combo_jack_hp_jd_restart(codec);
+ }
+ break;
}
}
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Restore headset mic after suspend for Acer Nitro 5
2026-05-08 21:57 [PATCH] ALSA: hda/realtek: Restore headset mic after suspend for Acer Nitro 5 Breno Baptista
@ 2026-05-15 6:37 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-05-15 6:37 UTC (permalink / raw)
To: Kailang Yang; +Cc: Breno Baptista, linux-sound, tiwai, perex, linux-kernel
On Fri, 08 May 2026 23:57:46 +0200,
Breno Baptista wrote:
>
> The headset mic on the AN515-57 was shown as unplugged after resuming
> from S3/S4, requiring a reboot to recover.
>
> Signed-off-by: Breno Baptista <brenomb07@gmail.com>
> ---
> sound/hda/codecs/realtek/alc269.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index 11d0ea8ed859..449a5ab3b0d0 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -3578,6 +3578,16 @@ static void alc2xx_fixup_headset_mic(struct hda_codec *codec,
> alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
> spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
> break;
> + case HDA_FIXUP_ACT_INIT:
> + /*
> + * COEF 0x45 (CTIA combo jack mode) is not preserved across suspend.
> + * Restore it before restarting HP JD so the headset is re-detected.
> + */
> + if (is_s3_resume(codec) || is_s4_resume(codec)) {
> + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
> + alc_combo_jack_hp_jd_restart(codec);
> + }
> + break;
> }
> }
The code change itself looks OK, but I'd like to confirm that it's the
expected behavior.
Kailang, could you verify this please?
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 21:57 [PATCH] ALSA: hda/realtek: Restore headset mic after suspend for Acer Nitro 5 Breno Baptista
2026-05-15 6:37 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox