Re: [PATCH] ALSA: hda/realtek: Fix cold-boot headset misdetection on Acer Aspire A515-57G

From: Takashi Iwai

Date: Tue Sep 01 2026 - 07:50:06 EST


On Sun, 30 Aug 2026 23:10:38 +0200,
Oleksandr Kovalov wrote:
>
> 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.
>
> 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@xxxxxxxxx>

There is a recent fix-up for the same model to support the mic-mute
LED, and it conflicts with your fix. Could you try to rebase to the
latest sound.git for-linus branch (or at least 7.3-rc1) and resubmit?


thanks,

Takashi