linux/sound/hda
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>
2026-09-02 20:08:59 +02:00
..
codecs ALSA: hda/realtek: Fix cold-boot headset misdetection on Acer Aspire A515-57G 2026-09-02 20:08:59 +02:00
common ALSA: hda: Fix connection list comparison in proc output 2026-08-18 11:40:38 +02:00
controllers ALSA: hda: Add Lisuan HDMI controller and codec support 2026-08-17 13:51:02 +02:00
core ALSA: hda: restore MFG widget enumeration after core split 2026-09-01 12:37:33 +02:00
Kconfig ALSA: hda: Move codec drivers into sound/hda/codecs directory 2025-07-11 09:55:37 +02:00
Makefile ALSA: hda: Drop old codec binding method 2025-07-11 09:55:38 +02:00