[PATCH v2 1/2] ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptops
Aaron Ma <[email protected]> Wed, 5 Aug 2026 02:53:24 +0800
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The ALC287 codec on Lenovo Legion AW88399 laptops does not mark the combo-jack microphone as a headset mic, so the HDA parser treats it as a plain microphone. The headset microphone route and inline headset buttons are therefore unavailable. Enable Realtek headset mode without treating the jack as a headphone microphone, and enable headset jack button handling. Suppress automatic microphone selection so the internal microphone remains selectable while a headset is connected. The existing 0x1d override is redundant: firmware already marks that pin unused, and the override triggers a "SKU not ready 0x411111f0" warning. Drop it. Signed-off-by: Aaron Ma <[email protected]> --- Changes in v2: - Based on the original 1/3 (df2538d54b3c0 "Use AW88399 I2C fixup chain on Legion machines"): reworked to enable headset-mic mode and inline buttons. sound/hda/codecs/realtek/alc269.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index f7877127e0e49..30d71575bac3b 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -3276,21 +3276,19 @@ static void aw88399_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup static void alc287_fixup_legion_16iax10h_aw88399(struct hda_codec *codec, const struct hda_fixup *fix, int action) { - static const struct hda_pintbl pincfgs[] = { - { 0x1d, 0x411111f0 }, /* unused bogus pin */ - { } - }; - /* * Force DAC 0x02 for the bass speaker 0x17, as the default 0x06 lacks volume controls. */ static const hda_nid_t conn[] = { 0x02 }; + struct alc_spec *spec = codec->spec; alc269_fixup_limit_int_mic_boost(codec, fix, action); + alc_fixup_headset_mode_no_hp_mic(codec, fix, action); + alc_fixup_headset_jack(codec, fix, action); switch (action) { case HDA_FIXUP_ACT_PRE_PROBE: - snd_hda_apply_pincfgs(codec, pincfgs); + spec->gen.suppress_auto_mic = 1; snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); break; } -- 2.53.0