Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] fixup realtek/alc288 headphone for MS Surface 2, 3 and
@ 2025-11-16 15:26 René Rebe
  2025-11-17 16:20 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: René Rebe @ 2025-11-16 15:26 UTC (permalink / raw)
  To: linux-sound; +Cc: Takashi Iwai, Kailang Yang

The Surface Pro 2 and 3 have a strage frequency response and miss most
of the bass. I discovered connecting the HP out to the main DAC fixes
this.  Maybe the other is mono or whatever strangely mixed signal for
the built-in speakers?

I later noticed the Lenovo Ideapad 720S (AMD) exhibited the same
problem, so this may be a more wide-spread general bug w/ Realtek
codecs and the hda_auto_parser, ...

Signed-off-by: René Rebe <rene@exactco.de>

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 4aec5067c59d..81ac86b65796 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -2259,6 +2259,17 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
 	}
 }
 
+static void alc288_fixup_headset(struct hda_codec *codec,
+				 const struct hda_fixup *fix, int action)
+{
+	if (action == HDA_FIXUP_ACT_INIT) {
+		/* Surface Pro? */
+		int nid = codec->core.vendor_id == 0x10ec0280 ? 0x15 : 0x21;
+		/* DAC node 0x0c is giving low bass output, reverse default order. */
+		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, 1);
+	}
+}
+
 static void alc290_fixup_mono_speakers(struct hda_codec *codec,
 				       const struct hda_fixup *fix, int action)
 {
@@ -3483,6 +3495,7 @@ enum {
 	ALC283_FIXUP_SENSE_COMBO_JACK,
 	ALC282_FIXUP_ASUS_TX300,
 	ALC283_FIXUP_INT_MIC,
+	ALC288_FIXUP_HEADSET,
 	ALC290_FIXUP_MONO_SPEAKERS,
 	ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
 	ALC290_FIXUP_SUBWOOFER,
@@ -4245,6 +4258,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
 	},
+	[ALC288_FIXUP_HEADSET] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc288_fixup_headset,
+	},
 	[ALC290_FIXUP_SUBWOOFER_HSJACK] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -6872,6 +6889,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
 	SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
 	SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1414, 0x9c20, "Microsoft Surface Pro 2/3", ALC288_FIXUP_HEADSET),
 	SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
 	SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
 	SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
@@ -7053,6 +7071,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
 	HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
+	SND_PCI_QUIRK(0x17aa, 0x3812, "Lenovo Ideapad 720S", ALC288_FIXUP_HEADSET),
 	SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
 	SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),

-- 
  René Rebe, ExactCODE GmbH, Berlin, Germany
  https://exactco.de | https://t2linux.com | https://rene.rebe.de

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

end of thread, other threads:[~2025-11-20  6:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-16 15:26 [PATCH] fixup realtek/alc288 headphone for MS Surface 2, 3 and René Rebe
2025-11-17 16:20 ` Takashi Iwai
2025-11-17 20:07   ` René Rebe
2025-11-19 15:13     ` Takashi Iwai
2025-11-19 15:44       ` Takashi Iwai
2025-11-19 17:17         ` René Rebe
2025-11-20  6:52           ` Takashi Iwai

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