Skip to content

Commit be0c40d

Browse files
committed
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
HP Spectre x360 15-df1xxx with SSID 13c:863e requires similar workarounds that were applied to another HP Spectre x360 models; it has a mute LED only, no micmute LEDs, and needs the speaker GPIO seup. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220054 Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent e8fa236 commit be0c40d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6982,6 +6982,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
69826982
}
69836983
}
69846984

6985+
/* GPIO1 = amplifier on/off */
6986+
static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
6987+
const struct hda_fixup *fix,
6988+
int action)
6989+
{
6990+
struct alc_spec *spec = codec->spec;
6991+
static const hda_nid_t conn[] = { 0x02 };
6992+
static const struct hda_pintbl pincfgs[] = {
6993+
{ 0x14, 0x90170110 }, /* front/high speakers */
6994+
{ 0x17, 0x90170130 }, /* back/bass speakers */
6995+
{ }
6996+
};
6997+
6998+
// enable mute led
6999+
alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
7000+
7001+
switch (action) {
7002+
case HDA_FIXUP_ACT_PRE_PROBE:
7003+
/* needed for amp of back speakers */
7004+
spec->gpio_mask |= 0x01;
7005+
spec->gpio_dir |= 0x01;
7006+
snd_hda_apply_pincfgs(codec, pincfgs);
7007+
/* share DAC to have unified volume control */
7008+
snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
7009+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
7010+
break;
7011+
case HDA_FIXUP_ACT_INIT:
7012+
/* need to toggle GPIO to enable the amp of back speakers */
7013+
alc_update_gpio_data(codec, 0x01, true);
7014+
msleep(100);
7015+
alc_update_gpio_data(codec, 0x01, false);
7016+
break;
7017+
}
7018+
}
7019+
69857020
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
69867021
const struct hda_fixup *fix, int action)
69877022
{
@@ -7780,6 +7815,7 @@ enum {
77807815
ALC280_FIXUP_HP_9480M,
77817816
ALC245_FIXUP_HP_X360_AMP,
77827817
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
7818+
ALC285_FIXUP_HP_SPECTRE_X360_DF1,
77837819
ALC285_FIXUP_HP_ENVY_X360,
77847820
ALC288_FIXUP_DELL_HEADSET_MODE,
77857821
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -9857,6 +9893,10 @@ static const struct hda_fixup alc269_fixups[] = {
98579893
.type = HDA_FIXUP_FUNC,
98589894
.v.func = alc285_fixup_hp_spectre_x360_eb1
98599895
},
9896+
[ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
9897+
.type = HDA_FIXUP_FUNC,
9898+
.v.func = alc285_fixup_hp_spectre_x360_df1
9899+
},
98609900
[ALC285_FIXUP_HP_ENVY_X360] = {
98619901
.type = HDA_FIXUP_FUNC,
98629902
.v.func = alc285_fixup_hp_envy_x360,
@@ -10588,6 +10628,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1058810628
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
1058910629
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
1059010630
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10631+
SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
1059110632
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
1059210633
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
1059310634
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -11520,6 +11561,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
1152011561
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
1152111562
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
1152211563
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
11564+
{.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
1152311565
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
1152411566
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
1152511567
{.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},

0 commit comments

Comments
 (0)