@@ -4338,6 +4338,35 @@ static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
4338
4338
}
4339
4339
}
4340
4340
4341
+ /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4342
+ static void alc274_hp_envy_pcm_hook (struct hda_pcm_stream * hinfo ,
4343
+ struct hda_codec * codec ,
4344
+ struct snd_pcm_substream * substream ,
4345
+ int action )
4346
+ {
4347
+ switch (action ) {
4348
+ case HDA_GEN_PCM_ACT_PREPARE :
4349
+ alc_update_gpio_data (codec , 0x04 , true);
4350
+ break ;
4351
+ case HDA_GEN_PCM_ACT_CLEANUP :
4352
+ alc_update_gpio_data (codec , 0x04 , false);
4353
+ break ;
4354
+ }
4355
+ }
4356
+
4357
+ static void alc274_fixup_hp_envy_gpio (struct hda_codec * codec ,
4358
+ const struct hda_fixup * fix ,
4359
+ int action )
4360
+ {
4361
+ struct alc_spec * spec = codec -> spec ;
4362
+
4363
+ if (action == HDA_FIXUP_ACT_PROBE ) {
4364
+ spec -> gpio_mask |= 0x04 ;
4365
+ spec -> gpio_dir |= 0x04 ;
4366
+ spec -> gen .pcm_playback_hook = alc274_hp_envy_pcm_hook ;
4367
+ }
4368
+ }
4369
+
4341
4370
static void alc_update_coef_led (struct hda_codec * codec ,
4342
4371
struct alc_coef_led * led ,
4343
4372
bool polarity , bool on )
@@ -5695,6 +5724,18 @@ static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
5695
5724
spec -> gen .preferred_dacs = preferred_pairs ;
5696
5725
}
5697
5726
5727
+ static void alc295_fixup_asus_dacs (struct hda_codec * codec ,
5728
+ const struct hda_fixup * fix , int action )
5729
+ {
5730
+ static const hda_nid_t preferred_pairs [] = {
5731
+ 0x17 , 0x02 , 0x21 , 0x03 , 0
5732
+ };
5733
+ struct alc_spec * spec = codec -> spec ;
5734
+
5735
+ if (action == HDA_FIXUP_ACT_PRE_PROBE )
5736
+ spec -> gen .preferred_dacs = preferred_pairs ;
5737
+ }
5738
+
5698
5739
static void alc_shutup_dell_xps13 (struct hda_codec * codec )
5699
5740
{
5700
5741
struct alc_spec * spec = codec -> spec ;
@@ -6453,6 +6494,7 @@ enum {
6453
6494
ALC255_FIXUP_XIAOMI_HEADSET_MIC ,
6454
6495
ALC274_FIXUP_HP_MIC ,
6455
6496
ALC274_FIXUP_HP_HEADSET_MIC ,
6497
+ ALC274_FIXUP_HP_ENVY_GPIO ,
6456
6498
ALC256_FIXUP_ASUS_HPE ,
6457
6499
ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ,
6458
6500
ALC287_FIXUP_HP_GPIO_LED ,
@@ -6463,6 +6505,8 @@ enum {
6463
6505
ALC256_FIXUP_ACER_HEADSET_MIC ,
6464
6506
ALC285_FIXUP_IDEAPAD_S740_COEF ,
6465
6507
ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST ,
6508
+ ALC295_FIXUP_ASUS_DACS ,
6509
+ ALC295_FIXUP_HP_OMEN ,
6466
6510
};
6467
6511
6468
6512
static const struct hda_fixup alc269_fixups [] = {
@@ -7894,6 +7938,10 @@ static const struct hda_fixup alc269_fixups[] = {
7894
7938
.chained = true,
7895
7939
.chain_id = ALC274_FIXUP_HP_MIC
7896
7940
},
7941
+ [ALC274_FIXUP_HP_ENVY_GPIO ] = {
7942
+ .type = HDA_FIXUP_FUNC ,
7943
+ .v .func = alc274_fixup_hp_envy_gpio ,
7944
+ },
7897
7945
[ALC256_FIXUP_ASUS_HPE ] = {
7898
7946
.type = HDA_FIXUP_VERBS ,
7899
7947
.v .verbs = (const struct hda_verb []) {
@@ -7963,6 +8011,30 @@ static const struct hda_fixup alc269_fixups[] = {
7963
8011
.chained = true,
7964
8012
.chain_id = ALC285_FIXUP_HP_MUTE_LED ,
7965
8013
},
8014
+ [ALC295_FIXUP_ASUS_DACS ] = {
8015
+ .type = HDA_FIXUP_FUNC ,
8016
+ .v .func = alc295_fixup_asus_dacs ,
8017
+ },
8018
+ [ALC295_FIXUP_HP_OMEN ] = {
8019
+ .type = HDA_FIXUP_PINS ,
8020
+ .v .pins = (const struct hda_pintbl []) {
8021
+ { 0x12 , 0xb7a60130 },
8022
+ { 0x13 , 0x40000000 },
8023
+ { 0x14 , 0x411111f0 },
8024
+ { 0x16 , 0x411111f0 },
8025
+ { 0x17 , 0x90170110 },
8026
+ { 0x18 , 0x411111f0 },
8027
+ { 0x19 , 0x02a11030 },
8028
+ { 0x1a , 0x411111f0 },
8029
+ { 0x1b , 0x04a19030 },
8030
+ { 0x1d , 0x40600001 },
8031
+ { 0x1e , 0x411111f0 },
8032
+ { 0x21 , 0x03211020 },
8033
+ {}
8034
+ },
8035
+ .chained = true,
8036
+ .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED ,
8037
+ },
7966
8038
};
7967
8039
7968
8040
static const struct snd_pci_quirk alc269_fixup_tbl [] = {
@@ -8121,8 +8193,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
8121
8193
SND_PCI_QUIRK (0x103c , 0x82c0 , "HP G3 mini premium" , ALC221_FIXUP_HP_MIC_NO_PRESENCE ),
8122
8194
SND_PCI_QUIRK (0x103c , 0x83b9 , "HP Spectre x360" , ALC269_FIXUP_HP_MUTE_LED_MIC3 ),
8123
8195
SND_PCI_QUIRK (0x103c , 0x8497 , "HP Envy x360" , ALC269_FIXUP_HP_MUTE_LED_MIC3 ),
8196
+ SND_PCI_QUIRK (0x103c , 0x84da , "HP OMEN dc0019-ur" , ALC295_FIXUP_HP_OMEN ),
8124
8197
SND_PCI_QUIRK (0x103c , 0x84e7 , "HP Pavilion 15" , ALC269_FIXUP_HP_MUTE_LED_MIC3 ),
8125
8198
SND_PCI_QUIRK (0x103c , 0x869d , "HP" , ALC236_FIXUP_HP_MUTE_LED ),
8199
+ SND_PCI_QUIRK (0x103c , 0x86c7 , "HP Envy AiO 32" , ALC274_FIXUP_HP_ENVY_GPIO ),
8126
8200
SND_PCI_QUIRK (0x103c , 0x8724 , "HP EliteBook 850 G7" , ALC285_FIXUP_HP_GPIO_LED ),
8127
8201
SND_PCI_QUIRK (0x103c , 0x8729 , "HP" , ALC285_FIXUP_HP_GPIO_LED ),
8128
8202
SND_PCI_QUIRK (0x103c , 0x8730 , "HP ProBook 445 G7" , ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ),
@@ -8161,6 +8235,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
8161
8235
SND_PCI_QUIRK (0x1043 , 0x1427 , "Asus Zenbook UX31E" , ALC269VB_FIXUP_ASUS_ZENBOOK ),
8162
8236
SND_PCI_QUIRK (0x1043 , 0x1517 , "Asus Zenbook UX31A" , ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A ),
8163
8237
SND_PCI_QUIRK (0x1043 , 0x16e3 , "ASUS UX50" , ALC269_FIXUP_STEREO_DMIC ),
8238
+ SND_PCI_QUIRK (0x1043 , 0x1740 , "ASUS UX430UA" , ALC295_FIXUP_ASUS_DACS ),
8164
8239
SND_PCI_QUIRK (0x1043 , 0x17d1 , "ASUS UX431FL" , ALC294_FIXUP_ASUS_DUAL_SPK ),
8165
8240
SND_PCI_QUIRK (0x1043 , 0x1881 , "ASUS Zephyrus S/M" , ALC294_FIXUP_ASUS_GX502_PINS ),
8166
8241
SND_PCI_QUIRK (0x1043 , 0x18b1 , "Asus MJ401TA" , ALC256_FIXUP_ASUS_HEADSET_MIC ),
@@ -8524,6 +8599,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
8524
8599
{.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC , .name = "alc255-xiaomi-headset" },
8525
8600
{.id = ALC274_FIXUP_HP_MIC , .name = "alc274-hp-mic-detect" },
8526
8601
{.id = ALC245_FIXUP_HP_X360_AMP , .name = "alc245-hp-x360-amp" },
8602
+ {.id = ALC295_FIXUP_HP_OMEN , .name = "alc295-hp-omen" },
8527
8603
{}
8528
8604
};
8529
8605
#define ALC225_STANDARD_PINS \
@@ -8801,6 +8877,16 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
8801
8877
{0x19 , 0x03a11020 },
8802
8878
{0x21 , 0x0321101f }),
8803
8879
SND_HDA_PIN_QUIRK (0x10ec0285 , 0x17aa , "Lenovo" , ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE ,
8880
+ {0x12 , 0x90a60130 },
8881
+ {0x14 , 0x90170110 },
8882
+ {0x19 , 0x04a11040 },
8883
+ {0x21 , 0x04211020 }),
8884
+ SND_HDA_PIN_QUIRK (0x10ec0285 , 0x17aa , "Lenovo" , ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE ,
8885
+ {0x14 , 0x90170110 },
8886
+ {0x19 , 0x04a11040 },
8887
+ {0x1d , 0x40600001 },
8888
+ {0x21 , 0x04211020 }),
8889
+ SND_HDA_PIN_QUIRK (0x10ec0285 , 0x17aa , "Lenovo" , ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ,
8804
8890
{0x14 , 0x90170110 },
8805
8891
{0x19 , 0x04a11040 },
8806
8892
{0x21 , 0x04211020 }),
@@ -8971,10 +9057,6 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
8971
9057
SND_HDA_PIN_QUIRK (0x10ec0274 , 0x1028 , "Dell" , ALC274_FIXUP_DELL_AIO_LINEOUT_VERB ,
8972
9058
{0x19 , 0x40000000 },
8973
9059
{0x1a , 0x40000000 }),
8974
- SND_HDA_PIN_QUIRK (0x10ec0285 , 0x17aa , "Lenovo" , ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ,
8975
- {0x14 , 0x90170110 },
8976
- {0x19 , 0x04a11040 },
8977
- {0x21 , 0x04211020 }),
8978
9060
{}
8979
9061
};
8980
9062
0 commit comments