summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Rebe <rene@exactco.de>2025-11-20 12:42:40 +0100
committerTakashi Iwai <tiwai@suse.de>2025-11-20 15:25:32 +0100
commitc639065e142582b886f294be82130f46bbdc707a (patch)
treea07e313f924243907ca34ce470a0471771084f9a
parent9afbbf4903228cd1ffc9b5e4cfc3f7083fdcabd5 (diff)
ALSA: realtek/alc288 fix headphone for MS Surface 2/3
The Surface Pro 2 and 3 have a strange headphone 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 intentionally filtered signal for the built-in speakers? (At least the Lenovo Ideapad 720S (AMD) (0x17aa, 0x3812) exhibited the same problem, but I don't have it anymore for testing V2 changes.) Signed-off-by: René Rebe <rene@exactco.de> Co-developed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20251120.124240.139462482701146043.rene@exactco.de
-rw-r--r--sound/hda/codecs/realtek/alc269.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 1aa4fef8acf6..6748057e6a14 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3453,6 +3453,21 @@ static void alc283_fixup_dell_hp_resume(struct hda_codec *codec,
alc_write_coef_idx(codec, 0xd, 0x2800);
}
+/* Swap DAC assignments for HP and speaker */
+static void alc288_fixup_surface_swap_dacs(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static hda_nid_t preferred_pairs[] = {
+ 0x21, 0x03, 0x14, 0x02, 0
+ };
+
+ if (action != HDA_FIXUP_ACT_PRE_PROBE)
+ return;
+
+ spec->gen.preferred_dacs = preferred_pairs;
+}
+
enum {
ALC269_FIXUP_GPIO2,
ALC269_FIXUP_SONY_VAIO,
@@ -3774,6 +3789,7 @@ enum {
ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE,
ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
+ ALC288_FIXUP_SURFACE_SWAP_DACS,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -6229,6 +6245,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc245_tas2781_i2c_hp_fixup_muteled,
},
+ [ALC288_FIXUP_SURFACE_SWAP_DACS] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc288_fixup_surface_swap_dacs,
+ },
};
static const struct hda_quirk alc269_fixup_tbl[] = {
@@ -6929,6 +6949,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_SURFACE_SWAP_DACS),
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),