Skip to content

Commit 7bd0049

Browse files
tiwaigregkh
authored andcommitted
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
[ Upstream commit be0c40d ] 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 e3bf273 commit 7bd0049

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
@@ -6758,6 +6758,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
67586758
}
67596759
}
67606760

6761+
/* GPIO1 = amplifier on/off */
6762+
static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
6763+
const struct hda_fixup *fix,
6764+
int action)
6765+
{
6766+
struct alc_spec *spec = codec->spec;
6767+
static const hda_nid_t conn[] = { 0x02 };
6768+
static const struct hda_pintbl pincfgs[] = {
6769+
{ 0x14, 0x90170110 }, /* front/high speakers */
6770+
{ 0x17, 0x90170130 }, /* back/bass speakers */
6771+
{ }
6772+
};
6773+
6774+
// enable mute led
6775+
alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
6776+
6777+
switch (action) {
6778+
case HDA_FIXUP_ACT_PRE_PROBE:
6779+
/* needed for amp of back speakers */
6780+
spec->gpio_mask |= 0x01;
6781+
spec->gpio_dir |= 0x01;
6782+
snd_hda_apply_pincfgs(codec, pincfgs);
6783+
/* share DAC to have unified volume control */
6784+
snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6785+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6786+
break;
6787+
case HDA_FIXUP_ACT_INIT:
6788+
/* need to toggle GPIO to enable the amp of back speakers */
6789+
alc_update_gpio_data(codec, 0x01, true);
6790+
msleep(100);
6791+
alc_update_gpio_data(codec, 0x01, false);
6792+
break;
6793+
}
6794+
}
6795+
67616796
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
67626797
const struct hda_fixup *fix, int action)
67636798
{
@@ -7040,6 +7075,7 @@ enum {
70407075
ALC280_FIXUP_HP_9480M,
70417076
ALC245_FIXUP_HP_X360_AMP,
70427077
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
7078+
ALC285_FIXUP_HP_SPECTRE_X360_DF1,
70437079
ALC285_FIXUP_HP_ENVY_X360,
70447080
ALC288_FIXUP_DELL_HEADSET_MODE,
70457081
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -8881,6 +8917,10 @@ static const struct hda_fixup alc269_fixups[] = {
88818917
.type = HDA_FIXUP_FUNC,
88828918
.v.func = alc285_fixup_hp_spectre_x360_eb1
88838919
},
8920+
[ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
8921+
.type = HDA_FIXUP_FUNC,
8922+
.v.func = alc285_fixup_hp_spectre_x360_df1
8923+
},
88848924
[ALC285_FIXUP_HP_ENVY_X360] = {
88858925
.type = HDA_FIXUP_FUNC,
88868926
.v.func = alc285_fixup_hp_envy_x360,
@@ -9286,6 +9326,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92869326
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
92879327
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
92889328
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9329+
SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
92899330
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
92909331
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
92919332
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -9832,6 +9873,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
98329873
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
98339874
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
98349875
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9876+
{.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
98359877
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
98369878
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
98379879
{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},

0 commit comments

Comments
 (0)