The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptops
@ 2026-08-04 18:53 Aaron Ma
  2026-08-04 18:53 ` [PATCH v2 2/2] ALSA: hda/realtek: Limit Legion AW88399 playback to stereo Aaron Ma
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aaron Ma @ 2026-08-04 18:53 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel,
	marco_giunta
  Cc: Zhang Heng, Kailang Yang, Damien Dagorn, Bob Song, Lei Huang,
	Sean Rhodes

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 <mapengyu@gmail.com>
---
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-05  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 18:53 [PATCH v2 1/2] ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptops Aaron Ma
2026-08-04 18:53 ` [PATCH v2 2/2] ALSA: hda/realtek: Limit Legion AW88399 playback to stereo Aaron Ma
2026-08-05  7:45 ` [PATCH v2 1/2] ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptops Marco Giunta
2026-08-05  8:11 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox