Skip to contentSkip to conversation

ALSA: hda/realtek: Add quirk for Huawei MateBook X Pro 2020

PATCH In review Cian Ruane 2 participants 2 messages Oct 27 – Oct 31 Sound

lore
Share & tools
lore

Cian Ruane

author
#0 lore raw

PATCH 1/1 ALSA: hda/realtek: Add quirk for Huawei MateBook X Pro 2020

The Huawei MateBook X Pro 2020 (MACHC-WAX9) has a combined headphone and microphone jack, but the BIOS marks pin 0x19 as unconnected (0x411111f0). As a result the headset microphone is missing and only the internal microphone is available.

The mic mute LED on the F7 key does not follow the capture mute state either. The machine uses the PCI subsystem vendor ID 0x1e83 (Huaqin) rather than 0x19e5, so the Huawei vendor-wide quirk that sets up the LED does not match.

Add a fixup that configures pin 0x19 as a headset microphone without its own jack detection and chains to ALC269_FIXUP_HEADSET_MODE, which enables headset mode and the mic mute LED. This is the MACHR-WX9 fixup without its other pin overrides. The remaining BIOS pin defaults work, and pin 0x14, which the MACHR-WX9 uses for a second speaker pair, produces no sound on this machine. Configuring pin 0x19 with presence detection (0x04a11040) does not work either: the jack state drops to unplugged while the headset is still connected.

Tested on: HUAWEI MACHC-WAX9 (MateBook X Pro 2020), BIOS 1.26, Ubuntu 26.04 (kernel 7.0.0-38-generic, with this patch backported).

---
 sound/hda/codecs/realtek/alc269.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
sound/hda/codecs/realtek/alc269.c +11 -0
index 23329d588..5a4cb04aa 100644
@@ -4330,6 +4330,7 @@ enum {
 	ALC255_FIXUP_DELL_HEADSET_MIC,
 	ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
 	ALC256_FIXUP_HUAWEI_MACHR_WX9_PINS,
+	ALC256_FIXUP_HUAWEI_MACHC_WAX9_PINS,
 	ALC298_FIXUP_HUAWEI_MBX_STEREO,
 	ALC295_FIXUP_HP_X360,
 	ALC295_FIXUP_HP_PAVILION_X360,
@@ -5063,6 +5064,15 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_HEADSET_MODE
 	},
+	[ALC256_FIXUP_HUAWEI_MACHC_WAX9_PINS] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x04a11140 }, /* use as headset mic, without its own jack detect */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC269_FIXUP_HEADSET_MODE
+	},
 	[ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc298_fixup_huawei_mbx_stereo,
@@ -8727,6 +8737,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1e50, 0x7007, "Positivo DN50E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x1e50, 0x7036, "Acer Gadget E10 ETBook", ALC233_FIXUP_WUJIE_SPEAKERS),
 	SND_PCI_QUIRK(0x1e50, 0x7038, "Positivo DN140", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+	SND_PCI_QUIRK(0x1e83, 0x3e21, "Huawei MACHC-WAX9", ALC256_FIXUP_HUAWEI_MACHC_WAX9_PINS),
 	SND_PCI_QUIRK(0x1ee7, 0x204e, "HONOR DRA-XX M1020", ALC256_FIXUP_HONOR_DRA_XX_SPEAKERS),
 	SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1ee7, 0x2081, "HONOR MRB-XXX M1020", ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO),

base-commit: a4311e9447bbb219044db38897f95be112f46a8a

Signature · 1 line
2.53.0
#1 lore raw
Quoted 20 lines · Cian Ruane

The Huawei MateBook X Pro 2020 (MACHC-WAX9) has a combined headphone and microphone jack, but the BIOS marks pin 0x19 as unconnected (0x411111f0). As a result the headset microphone is missing and only the internal microphone is available.

The mic mute LED on the F7 key does not follow the capture mute state either. The machine uses the PCI subsystem vendor ID 0x1e83 (Huaqin) rather than 0x19e5, so the Huawei vendor-wide quirk that sets up the LED does not match.

Add a fixup that configures pin 0x19 as a headset microphone without its own jack detection and chains to ALC269_FIXUP_HEADSET_MODE, which enables headset mode and the mic mute LED. This is the MACHR-WX9 fixup without its other pin overrides. The remaining BIOS pin defaults work, and pin 0x14, which the MACHR-WX9 uses for a second speaker pair, produces no sound on this machine. Configuring pin 0x19 with presence detection (0x04a11040) does not work either: the jack state drops to unplugged while the headset is still connected.

Quoted 4 lines

Tested on: HUAWEI MACHC-WAX9 (MateBook X Pro 2020), BIOS 1.26, Ubuntu 26.04 (kernel 7.0.0-38-generic, with this patch backported).

Applied now. Thanks.

Takashi