From: Aaron Ma <mapengyu@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
marco_giunta@outlook.it
Cc: Zhang Heng <zhangheng@kylinos.cn>,
Kailang Yang <kailang@realtek.com>,
Damien Dagorn <damien.dagorn29@gmail.com>,
Bob Song <songxiebing@kylinos.cn>,
Lei Huang <huanglei@kylinos.cn>,
Sean Rhodes <sean@starlabs.systems>
Subject: [PATCH v2 1/2] ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptops
Date: Wed, 5 Aug 2026 02:53:24 +0800 [thread overview]
Message-ID: <20260804185325.22861-1-mapengyu@gmail.com> (raw)
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
next reply other threads:[~2026-08-04 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 18:53 Aaron Ma [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804185325.22861-1-mapengyu@gmail.com \
--to=mapengyu@gmail.com \
--cc=damien.dagorn29@gmail.com \
--cc=huanglei@kylinos.cn \
--cc=kailang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=marco_giunta@outlook.it \
--cc=perex@perex.cz \
--cc=sean@starlabs.systems \
--cc=songxiebing@kylinos.cn \
--cc=tiwai@suse.com \
--cc=zhangheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox