Skip to content

Commit daf62a6

Browse files
tiwaigregkh
authored andcommitted
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
[ Upstream commit be0c40da888840fe91b45474cb70779e6cbaf7ca ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0c55dc9 commit daf62a6

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
@@ -6702,6 +6702,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
67026702
}
67036703
}
67046704

6705+
/* GPIO1 = amplifier on/off */
6706+
static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
6707+
const struct hda_fixup *fix,
6708+
int action)
6709+
{
6710+
struct alc_spec *spec = codec->spec;
6711+
static const hda_nid_t conn[] = { 0x02 };
6712+
static const struct hda_pintbl pincfgs[] = {
6713+
{ 0x14, 0x90170110 }, /* front/high speakers */
6714+
{ 0x17, 0x90170130 }, /* back/bass speakers */
6715+
{ }
6716+
};
6717+
6718+
// enable mute led
6719+
alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
6720+
6721+
switch (action) {
6722+
case HDA_FIXUP_ACT_PRE_PROBE:
6723+
/* needed for amp of back speakers */
6724+
spec->gpio_mask |= 0x01;
6725+
spec->gpio_dir |= 0x01;
6726+
snd_hda_apply_pincfgs(codec, pincfgs);
6727+
/* share DAC to have unified volume control */
6728+
snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6729+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6730+
break;
6731+
case HDA_FIXUP_ACT_INIT:
6732+
/* need to toggle GPIO to enable the amp of back speakers */
6733+
alc_update_gpio_data(codec, 0x01, true);
6734+
msleep(100);
6735+
alc_update_gpio_data(codec, 0x01, false);
6736+
break;
6737+
}
6738+
}
6739+
67056740
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
67066741
const struct hda_fixup *fix, int action)
67076742
{
@@ -6984,6 +7019,7 @@ enum {
69847019
ALC280_FIXUP_HP_9480M,
69857020
ALC245_FIXUP_HP_X360_AMP,
69867021
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
7022+
ALC285_FIXUP_HP_SPECTRE_X360_DF1,
69877023
ALC285_FIXUP_HP_ENVY_X360,
69887024
ALC288_FIXUP_DELL_HEADSET_MODE,
69897025
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -8818,6 +8854,10 @@ static const struct hda_fixup alc269_fixups[] = {
88188854
.type = HDA_FIXUP_FUNC,
88198855
.v.func = alc285_fixup_hp_spectre_x360_eb1
88208856
},
8857+
[ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
8858+
.type = HDA_FIXUP_FUNC,
8859+
.v.func = alc285_fixup_hp_spectre_x360_df1
8860+
},
88218861
[ALC285_FIXUP_HP_ENVY_X360] = {
88228862
.type = HDA_FIXUP_FUNC,
88238863
.v.func = alc285_fixup_hp_envy_x360,
@@ -9223,6 +9263,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92239263
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
92249264
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
92259265
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9266+
SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
92269267
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
92279268
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
92289269
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -9750,6 +9791,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
97509791
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
97519792
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
97529793
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9794+
{.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
97539795
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
97549796
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
97559797
{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},

0 commit comments

Comments
 (0)