@@ -6008,6 +6008,27 @@ static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
60086008 snd_hda_override_wcaps (codec , 0x03 , 0 );
60096009}
60106010
6011+ static void alc_combo_jack_hp_jd_restart (struct hda_codec * codec )
6012+ {
6013+ switch (codec -> core .vendor_id ) {
6014+ case 0x10ec0274 :
6015+ case 0x10ec0294 :
6016+ case 0x10ec0225 :
6017+ case 0x10ec0295 :
6018+ case 0x10ec0299 :
6019+ alc_update_coef_idx (codec , 0x4a , 0x8000 , 1 << 15 ); /* Reset HP JD */
6020+ alc_update_coef_idx (codec , 0x4a , 0x8000 , 0 << 15 );
6021+ break ;
6022+ case 0x10ec0235 :
6023+ case 0x10ec0236 :
6024+ case 0x10ec0255 :
6025+ case 0x10ec0256 :
6026+ alc_update_coef_idx (codec , 0x1b , 0x8000 , 1 << 15 ); /* Reset HP JD */
6027+ alc_update_coef_idx (codec , 0x1b , 0x8000 , 0 << 15 );
6028+ break ;
6029+ }
6030+ }
6031+
60116032static void alc295_fixup_chromebook (struct hda_codec * codec ,
60126033 const struct hda_fixup * fix , int action )
60136034{
@@ -6018,16 +6039,7 @@ static void alc295_fixup_chromebook(struct hda_codec *codec,
60186039 spec -> ultra_low_power = true;
60196040 break ;
60206041 case HDA_FIXUP_ACT_INIT :
6021- switch (codec -> core .vendor_id ) {
6022- case 0x10ec0295 :
6023- alc_update_coef_idx (codec , 0x4a , 0x8000 , 1 << 15 ); /* Reset HP JD */
6024- alc_update_coef_idx (codec , 0x4a , 0x8000 , 0 << 15 );
6025- break ;
6026- case 0x10ec0236 :
6027- alc_update_coef_idx (codec , 0x1b , 0x8000 , 1 << 15 ); /* Reset HP JD */
6028- alc_update_coef_idx (codec , 0x1b , 0x8000 , 0 << 15 );
6029- break ;
6030- }
6042+ alc_combo_jack_hp_jd_restart (codec );
60316043 break ;
60326044 }
60336045}
@@ -6083,6 +6095,16 @@ static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
60836095 alc_write_coef_idx (codec , 0x65 , 0x0 );
60846096}
60856097
6098+ static void alc274_fixup_hp_headset_mic (struct hda_codec * codec ,
6099+ const struct hda_fixup * fix , int action )
6100+ {
6101+ switch (action ) {
6102+ case HDA_FIXUP_ACT_INIT :
6103+ alc_combo_jack_hp_jd_restart (codec );
6104+ break ;
6105+ }
6106+ }
6107+
60866108/* for hda_fixup_thinkpad_acpi() */
60876109#include "thinkpad_helper.c"
60886110
@@ -6277,6 +6299,7 @@ enum {
62776299 ALC256_FIXUP_INTEL_NUC8_RUGGED ,
62786300 ALC255_FIXUP_XIAOMI_HEADSET_MIC ,
62796301 ALC274_FIXUP_HP_MIC ,
6302+ ALC274_FIXUP_HP_HEADSET_MIC ,
62806303};
62816304
62826305static const struct hda_fixup alc269_fixups [] = {
@@ -7664,6 +7687,12 @@ static const struct hda_fixup alc269_fixups[] = {
76647687 { }
76657688 },
76667689 },
7690+ [ALC274_FIXUP_HP_HEADSET_MIC ] = {
7691+ .type = HDA_FIXUP_FUNC ,
7692+ .v .func = alc274_fixup_hp_headset_mic ,
7693+ .chained = true,
7694+ .chain_id = ALC274_FIXUP_HP_MIC
7695+ },
76677696};
76687697
76697698static const struct snd_pci_quirk alc269_fixup_tbl [] = {
@@ -7815,7 +7844,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
78157844 SND_PCI_QUIRK (0x103c , 0x869d , "HP" , ALC236_FIXUP_HP_MUTE_LED ),
78167845 SND_PCI_QUIRK (0x103c , 0x8729 , "HP" , ALC285_FIXUP_HP_GPIO_LED ),
78177846 SND_PCI_QUIRK (0x103c , 0x8736 , "HP" , ALC285_FIXUP_HP_GPIO_AMP_INIT ),
7818- SND_PCI_QUIRK (0x103c , 0x874e , "HP" , ALC274_FIXUP_HP_MIC ),
78197847 SND_PCI_QUIRK (0x103c , 0x8760 , "HP" , ALC285_FIXUP_HP_MUTE_LED ),
78207848 SND_PCI_QUIRK (0x103c , 0x877a , "HP" , ALC285_FIXUP_HP_MUTE_LED ),
78217849 SND_PCI_QUIRK (0x103c , 0x877d , "HP" , ALC236_FIXUP_HP_MUTE_LED ),
@@ -8339,6 +8367,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
83398367 {0x1a , 0x90a70130 },
83408368 {0x1b , 0x90170110 },
83418369 {0x21 , 0x03211020 }),
8370+ SND_HDA_PIN_QUIRK (0x10ec0274 , 0x103c , "HP" , ALC274_FIXUP_HP_HEADSET_MIC ,
8371+ {0x17 , 0x90170110 },
8372+ {0x19 , 0x03a11030 },
8373+ {0x21 , 0x03211020 }),
83428374 SND_HDA_PIN_QUIRK (0x10ec0280 , 0x103c , "HP" , ALC280_FIXUP_HP_GPIO4 ,
83438375 {0x12 , 0x90a60130 },
83448376 {0x14 , 0x90170110 },
0 commit comments