Skip to content

Commit 2912cdd

Browse files
pjungkamptiwai
authored andcommitted
ALSA: patch_realtek: Fix Dell Inspiron Plus 16
The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top speakers connected on NID 0x17, which the codec reports as unconnected. These speakers should be connected to the DAC on NID 0x03. Signed-off-by: Philipp Jungkamp <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9fb9fa1 commit 2912cdd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6903,6 +6903,34 @@ static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
69036903
}
69046904
}
69056905

6906+
static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
6907+
const struct hda_fixup *fix, int action)
6908+
{
6909+
static const struct hda_pintbl pincfgs[] = {
6910+
{ 0x14, 0x90170151 },
6911+
{ 0x17, 0x90170150 },
6912+
{ }
6913+
};
6914+
static const hda_nid_t conn[] = { 0x02, 0x03 };
6915+
static const hda_nid_t preferred_pairs[] = {
6916+
0x14, 0x02,
6917+
0x17, 0x03,
6918+
0x21, 0x02,
6919+
0
6920+
};
6921+
struct alc_spec *spec = codec->spec;
6922+
6923+
alc_fixup_no_shutup(codec, fix, action);
6924+
6925+
switch (action) {
6926+
case HDA_FIXUP_ACT_PRE_PROBE:
6927+
snd_hda_apply_pincfgs(codec, pincfgs);
6928+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6929+
spec->gen.preferred_dacs = preferred_pairs;
6930+
break;
6931+
}
6932+
}
6933+
69066934
enum {
69076935
ALC269_FIXUP_GPIO2,
69086936
ALC269_FIXUP_SONY_VAIO,
@@ -7146,6 +7174,7 @@ enum {
71467174
ALC287_FIXUP_LEGION_16ITHG6,
71477175
ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
71487176
ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
7177+
ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
71497178
};
71507179

71517180
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9095,6 +9124,12 @@ static const struct hda_fixup alc269_fixups[] = {
90959124
.chained = true,
90969125
.chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
90979126
},
9127+
[ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
9128+
.type = HDA_FIXUP_FUNC,
9129+
.v.func = alc295_fixup_dell_inspiron_top_speakers,
9130+
.chained = true,
9131+
.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9132+
},
90989133
};
90999134

91009135
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -9195,6 +9230,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
91959230
SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
91969231
SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
91979232
SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
9233+
SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9234+
SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
91989235
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
91999236
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
92009237
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),

0 commit comments

Comments
 (0)