linux/sound/hda/codecs
Oleksandr Kovalov 8ba27b9009 ALSA: hda/realtek: Fix cold-boot headset misdetection on Acer Aspire A515-57G
On the Acer Aspire A515-57G (PCI SSID 1025:1616), if headphones are
already inserted into the combo jack before the codec powers up (a cold
boot with the plug already seated), the impedance-based headset-type
sensing races and misclassifies the jack. This drives the wrong output
configuration and is audible as missing center-panned content (e.g.
vocals) while panned content plays normally.

A genuine physical unplug/replug after boot reliably fixes this by
forcing a fresh sense transient, which is a strong hint about the
underlying cause: the sensing hardware appears to need a settled,
freshly-triggered read rather than the one-shot classification done
during the normal HDA_FIXUP_ACT_INIT pass.

Add a machine-specific fixup that, on cold boot only (not S3/S4 resume,
which already gets its own re-check), waits briefly after the normal
init-time decision and then forces a fresh headset-mode classification
by resetting the cached mode and re-invoking the existing
alc_fixup_headset_mode() path -- mirroring what a manual replug already
does. The wait+recheck is skipped whenever the first pass already
determined nothing is plugged in, to avoid adding boot latency on the
common case.

Chain into the existing ALC256_FIXUP_ACER_SFG16_MICMUTE_LED fixup so
this quirk-table entry keeps providing mic-mute LED support alongside
the cold-boot headset fix.

Tested on kernel 7.1.9 by building the affected module standalone and
confirming cold boot with headphones pre-inserted plays correctly from
the very first sample, across multiple boots (including a full restart,
and headphones inserted mid-POST rather than before power-on), with no
crashes or warnings and no behavioral difference from a real
post-replug recovery.

Signed-off-by: Oleksandr Kovalov <oleksandr.kovalov.work@gmail.com>
Link: https://patch.msgid.link/20260902171305.3955-1-oleksandr.kovalov.work@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
History 2026-09-02 20:08:59 +02:00
..
cirrus ALSA: hda/cs420x: Add CS4208 fixup for MacBookAir 7,2 2026-09-02 08:41:02 +02:00
hdmi ALSA: hda: Add Lisuan HDMI controller and codec support 2026-08-17 13:51:02 +02:00
helpers ALSA: hda/realtek: Enable internal speakers on Razer Blade 16 (2025) 2026-06-29 12:28:40 +02:00
realtek ALSA: hda/realtek: Fix cold-boot headset misdetection on Acer Aspire A515-57G 2026-09-02 20:08:59 +02:00
side-codecs ASoC: Updates for v7.3 2026-08-18 08:35:39 +02:00
analog.c ALSA: hda/analog: Fix GPIO verb orders 2026-04-09 12:05:54 +02:00
ca0110.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ca0132.c ALSA: hda/ca0132: replace sprintf() with snprintf() 2026-08-12 07:30:18 +02:00
ca0132_regs.h ALSA: hda/ca0132: Rewrite to new probe method 2025-07-11 09:55:38 +02:00
cm9825.c ALSA: hda/cm9825: Add IBP support for DFI 2026-07-08 12:54:18 +02:00
cmedia.c ALSA: hda/cmedia: Remove duplicate pin configuration parsing 2026-04-01 11:01:33 +02:00
conexant.c ALSA: hda/conexant:Fix abnormal Mic/Speaker functionality on SN6140 after S3 wake-up 2026-08-31 10:04:54 +02:00
generic.c ALSA: hda: Add hda_append_suffix() local helper 2026-07-31 08:39:51 +02:00
generic.h ALSA: hda: Drop old codec binding method 2025-07-11 09:55:38 +02:00
Kconfig ALSA: hda/ca0132: add QUIRK_GENERIC path for Gigabyte GA-Z170X-Gaming G1 2026-05-19 07:34:50 +02:00
Makefile ALSA: hda: Remove duplicate cmedia entries in codecs Makefile 2026-04-27 14:23:02 +02:00
senarytech.c ALSA: hda/senarytech: Clean up with the new GPIO helper 2026-04-09 12:05:55 +02:00
si3054.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sigmatel.c ALSA: hda/sigmatel: Clean up with the new GPIO helper 2026-04-09 12:05:54 +02:00
via.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00