@@ -307,6 +307,7 @@ enum {
307
307
CXT_FIXUP_HP_MIC_NO_PRESENCE ,
308
308
CXT_PINCFG_SWS_JS201D ,
309
309
CXT_PINCFG_TOP_SPEAKER ,
310
+ CXT_FIXUP_HP_A_U ,
310
311
};
311
312
312
313
/* for hda_fixup_thinkpad_acpi() */
@@ -774,6 +775,18 @@ static void cxt_setup_mute_led(struct hda_codec *codec,
774
775
}
775
776
}
776
777
778
+ static void cxt_setup_gpio_unmute (struct hda_codec * codec ,
779
+ unsigned int gpio_mute_mask )
780
+ {
781
+ if (gpio_mute_mask ) {
782
+ // set gpio data to 0.
783
+ snd_hda_codec_write (codec , 0x01 , 0 , AC_VERB_SET_GPIO_DATA , 0 );
784
+ snd_hda_codec_write (codec , 0x01 , 0 , AC_VERB_SET_GPIO_MASK , gpio_mute_mask );
785
+ snd_hda_codec_write (codec , 0x01 , 0 , AC_VERB_SET_GPIO_DIRECTION , gpio_mute_mask );
786
+ snd_hda_codec_write (codec , 0x01 , 0 , AC_VERB_SET_GPIO_STICKY_MASK , 0 );
787
+ }
788
+ }
789
+
777
790
static void cxt_fixup_mute_led_gpio (struct hda_codec * codec ,
778
791
const struct hda_fixup * fix , int action )
779
792
{
@@ -788,6 +801,15 @@ static void cxt_fixup_hp_zbook_mute_led(struct hda_codec *codec,
788
801
cxt_setup_mute_led (codec , 0x10 , 0x20 );
789
802
}
790
803
804
+ static void cxt_fixup_hp_a_u (struct hda_codec * codec ,
805
+ const struct hda_fixup * fix , int action )
806
+ {
807
+ // Init vers in BIOS mute the spk/hp by set gpio high to avoid pop noise,
808
+ // so need to unmute once by clearing the gpio data when runs into the system.
809
+ if (action == HDA_FIXUP_ACT_INIT )
810
+ cxt_setup_gpio_unmute (codec , 0x2 );
811
+ }
812
+
791
813
/* ThinkPad X200 & co with cxt5051 */
792
814
static const struct hda_pintbl cxt_pincfg_lenovo_x200 [] = {
793
815
{ 0x16 , 0x042140ff }, /* HP (seq# overridden) */
@@ -998,6 +1020,10 @@ static const struct hda_fixup cxt_fixups[] = {
998
1020
{ }
999
1021
},
1000
1022
},
1023
+ [CXT_FIXUP_HP_A_U ] = {
1024
+ .type = HDA_FIXUP_FUNC ,
1025
+ .v .func = cxt_fixup_hp_a_u ,
1026
+ },
1001
1027
};
1002
1028
1003
1029
static const struct hda_quirk cxt5045_fixups [] = {
@@ -1072,6 +1098,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
1072
1098
SND_PCI_QUIRK (0x103c , 0x8457 , "HP Z2 G4 mini" , CXT_FIXUP_HP_MIC_NO_PRESENCE ),
1073
1099
SND_PCI_QUIRK (0x103c , 0x8458 , "HP Z2 G4 mini premium" , CXT_FIXUP_HP_MIC_NO_PRESENCE ),
1074
1100
SND_PCI_QUIRK (0x1043 , 0x138d , "Asus" , CXT_FIXUP_HEADPHONE_MIC_PIN ),
1101
+ SND_PCI_QUIRK (0x14f1 , 0x0252 , "MBX-Z60MR100" , CXT_FIXUP_HP_A_U ),
1075
1102
SND_PCI_QUIRK (0x14f1 , 0x0265 , "SWS JS201D" , CXT_PINCFG_SWS_JS201D ),
1076
1103
SND_PCI_QUIRK (0x152d , 0x0833 , "OLPC XO-1.5" , CXT_FIXUP_OLPC_XO ),
1077
1104
SND_PCI_QUIRK (0x17aa , 0x20f2 , "Lenovo T400" , CXT_PINCFG_LENOVO_TP410 ),
@@ -1117,6 +1144,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = {
1117
1144
{ .id = CXT_PINCFG_LENOVO_NOTEBOOK , .name = "lenovo-20149" },
1118
1145
{ .id = CXT_PINCFG_SWS_JS201D , .name = "sws-js201d" },
1119
1146
{ .id = CXT_PINCFG_TOP_SPEAKER , .name = "sirius-top-speaker" },
1147
+ { .id = CXT_FIXUP_HP_A_U , .name = "HP-U-support" },
1120
1148
{}
1121
1149
};
1122
1150
0 commit comments