Skip to contentSkip to conversation

ALSA: hda/realtek: Fix internal mic on Minisforum V3 and V3 SE

PATCH Superseded Jared Wuerzburger 2 participants 2 messages Sep 27 – Sep 28

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/realtek: Fix internal mic on Minisforum V3 and V3 SE

On the Minisforum V3 and V3 SE (ALC245, PCI SSID 1f4c:e001) the internal digital microphone array never produces any audio. The DMIC pin 0x12 is parsed correctly ("Internal Mic=0x12"), but the headset mic jack pin 0x19 (BIOS pin config 0x04a19050, jack detect enabled) has no presence detect wired on these boards: reading GET_PIN_SENSE on 0x19 always returns "present" (as it does on the unused, unconnected pin 0x18), while the headphone jack 0x21 reports correctly.

The generic parser therefore sets up auto-mic switching and, believing an external mic is always plugged in, permanently routes the ADC to the empty jack (mixer 0x23 input 0x19 unmuted, input 0x12 muted). The "Mic Jack" kcontrol reports "on" with nothing plugged in.

Mark pin 0x19 as having no presence detect. The parser then stops auto-switching and exposes a normal "Capture Source" (Internal Mic / Mic) control, which desktop audio stacks drive from their Internal Microphone / Microphone ports. The existing bass speaker DAC routing is kept by chaining to ALC245_FIXUP_BASS_HP_DAC.

Tested on both models with the same pin config applied through a snd-hda-intel patch firmware ([pincfg] 0x19 0x04a19150):
- V3 SE (Ryzen 7 7735U, BIOS 1.03), kernel 7.2.6
- V3 (Ryzen 7 8840U, BIOS 1.06), kernel 7.2.7
Both boards report the same codec SSID and the same 0x19 default. On both, the internal mic records at a normal level, headphone jack detection on 0x21 still switches output, and the bass routing is retained (DAC1/DAC2 Playback Volume controls present). A headset mic on the combo jack was not tested (none available); with this change it has to be selected manually. V3 users already report that the jack mic gets no input [1], which is the other symptom of the same broken presence detect.

The patched alc269.c was build-tested with W=1 on tiwai/sound.git for-linus (7.3-rc3) without new warnings.

The diagnosis, the fixup and this changelog were written with the help of an AI coding assistant; I reviewed them and tested the change on the hardware listed above.

---
 sound/hda/codecs/realtek/alc269.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
sound/hda/codecs/realtek/alc269.c +13 -1
index 5127a111c..2de91431f 100644
@@ -4384,6 +4384,7 @@ enum {
 	ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN_HEADSET,
 	ALC285_LENOVO_DAC_RENAME,
 	ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1,
+	ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE,
 };
 
 /* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7136,6 +7137,15 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC287_FIXUP_TXNW2781_I2C,
 	},
+	[ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x04a19150 }, /* headset mic jack, no presence detect */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC245_FIXUP_BASS_HP_DAC
+	},
 };
 
 static const struct hda_quirk alc269_fixup_tbl[] = {
@@ -8349,7 +8359,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1ee7, 0x2081, "HONOR MRB-XXX M1020", ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO),
 	SND_PCI_QUIRK(0x1f4c, 0xb020, "Minisforum AI X1 Pro",
 		      ALC245_FIXUP_MINISFORUM_JACK_DETECT),
-	SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)", ALC245_FIXUP_BASS_HP_DAC),
+	SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)",
+		      ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x2039, 0x0001, "Inspur S14-G1", ALC295_FIXUP_CHROME_BOOK),
@@ -8579,6 +8590,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
 	{.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
 	{.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
 	{.id = ALC245_FIXUP_BASS_HP_DAC, .name = "alc245-fixup-bass-hp-dac"},
+	{.id = ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE, .name = "alc245-minisforum-v3-mic"},
 	{.id = ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO, .name = "alc256-honor-mrb-xxx-m1020-audio"},
 	{.id = ALC287_FIXUP_LENOVO_LEGION_AW88399, .name = "alc287-lenovo-legion-aw88399"},
 	{}
Signature · 1 line
2.55.0
#1 lore raw
Quoted 87 lines · Jared Wuerzburger

On the Minisforum V3 and V3 SE (ALC245, PCI SSID 1f4c:e001) the internal digital microphone array never produces any audio. The DMIC pin 0x12 is parsed correctly ("Internal Mic=0x12"), but the headset mic jack pin 0x19 (BIOS pin config 0x04a19050, jack detect enabled) has no presence detect wired on these boards: reading GET_PIN_SENSE on 0x19 always returns "present" (as it does on the unused, unconnected pin 0x18), while the headphone jack 0x21 reports correctly.

The generic parser therefore sets up auto-mic switching and, believing an external mic is always plugged in, permanently routes the ADC to the empty jack (mixer 0x23 input 0x19 unmuted, input 0x12 muted). The "Mic Jack" kcontrol reports "on" with nothing plugged in.

Mark pin 0x19 as having no presence detect. The parser then stops auto-switching and exposes a normal "Capture Source" (Internal Mic / Mic) control, which desktop audio stacks drive from their Internal Microphone / Microphone ports. The existing bass speaker DAC routing is kept by chaining to ALC245_FIXUP_BASS_HP_DAC.

Tested on both models with the same pin config applied through a snd-hda-intel patch firmware ([pincfg] 0x19 0x04a19150):
- V3 SE (Ryzen 7 7735U, BIOS 1.03), kernel 7.2.6
- V3 (Ryzen 7 8840U, BIOS 1.06), kernel 7.2.7
Both boards report the same codec SSID and the same 0x19 default. On both, the internal mic records at a normal level, headphone jack detection on 0x21 still switches output, and the bass routing is retained (DAC1/DAC2 Playback Volume controls present). A headset mic on the combo jack was not tested (none available); with this change it has to be selected manually. V3 users already report that the jack mic gets no input [1], which is the other symptom of the same broken presence detect.

The patched alc269.c was build-tested with W=1 on tiwai/sound.git for-linus (7.3-rc3) without new warnings.

The diagnosis, the fixup and this changelog were written with the help of an AI coding assistant; I reviewed them and tested the change on the hardware listed above.

---
 sound/hda/codecs/realtek/alc269.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
sound/hda/codecs/realtek/alc269.c +12 -1
index 5127a111c..2de91431f 100644
@@ -4384,6 +4384,7 @@ enum {
 	ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN_HEADSET,
 	ALC285_LENOVO_DAC_RENAME,
 	ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1,
+	ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE,
 };
 
 /* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7136,6 +7137,15 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC287_FIXUP_TXNW2781_I2C,
 	},
+	[ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x04a19150 }, /* headset mic jack, no presence detect */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC245_FIXUP_BASS_HP_DAC
+	},
 };
 
 static const struct hda_quirk alc269_fixup_tbl[] = {
@@ -8349,7 +8359,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1ee7, 0x2081, "HONOR MRB-XXX M1020", ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO),
 	SND_PCI_QUIRK(0x1f4c, 0xb020, "Minisforum AI X1 Pro",
 		      ALC245_FIXUP_MINISFORUM_JACK_DETECT),
-	SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)", ALC245_FIXUP_BASS_HP_DAC),
+	SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)",
+		      ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x2039, 0x0001, "Inspur S14-G1", ALC295_FIXUP_CHROME_BOOK),

sound/hda/codecs/realtek/alc269.c static const struct hda_model_fixup alc269_fixup_models[] = { · line 8596

Quoted 7 lines
sound/hda/codecs/realtek/alc269.c +1 -0
@@ -8579,6 +8590,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
 	{.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
 	{.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
 	{.id = ALC245_FIXUP_BASS_HP_DAC, .name = "alc245-fixup-bass-hp-dac"},
+	{.id = ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE, .name = "alc245-minisforum-v3-mic"},
 	{.id = ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO, .name = "alc256-honor-mrb-xxx-m1020-audio"},
 	{.id = ALC287_FIXUP_LENOVO_LEGION_AW88399, .name = "alc287-lenovo-legion-aw88399"},
 	{}

The addition to alc269_fixup_models[] is nowadays superfluous. Unless you need the addition inevitably, try to avoid it.

The Assisted-by tag doesn't need to be specific, just telling "Assisted-by: LLM" is the preferred.

Last but not least, as this is correcting the existing quirk, please point out the commit via Fixes tag, too.

Could you resubmit with those corrections?

thanks,

Takashi