hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/pci/hda/patch_realtek.c
....@@ -121,6 +121,7 @@
121121 unsigned int ultra_low_power:1;
122122 unsigned int has_hs_key:1;
123123 unsigned int no_internal_mic_pin:1;
124
+ unsigned int en_3kpull_low:1;
124125
125126 /* for PLL fix */
126127 hda_nid_t pll_nid;
....@@ -827,7 +828,7 @@
827828 alc_setup_gpio(codec, 0x02);
828829 break;
829830 case 7:
830
- alc_setup_gpio(codec, 0x03);
831
+ alc_setup_gpio(codec, 0x04);
831832 break;
832833 case 5:
833834 default:
....@@ -2632,6 +2633,7 @@
26322633 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
26332634 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
26342635 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2636
+ SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26352637 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26362638 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26372639 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
....@@ -3561,6 +3563,15 @@
35613563 hda_nid_t hp_pin = alc_get_hp_pin(spec);
35623564 bool hp_pin_sense;
35633565
3566
+ if (spec->ultra_low_power) {
3567
+ alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
3568
+ alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
3569
+ alc_update_coef_idx(codec, 0x08, 7<<4, 0);
3570
+ alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
3571
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3572
+ msleep(30);
3573
+ }
3574
+
35643575 if (!hp_pin)
35653576 hp_pin = 0x21;
35663577
....@@ -3572,14 +3583,6 @@
35723583 msleep(2);
35733584
35743585 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3575
- if (spec->ultra_low_power) {
3576
- alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
3577
- alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
3578
- alc_update_coef_idx(codec, 0x08, 7<<4, 0);
3579
- alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
3580
- alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3581
- msleep(30);
3582
- }
35833586
35843587 snd_hda_codec_write(codec, hp_pin, 0,
35853588 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
....@@ -3615,6 +3618,7 @@
36153618 if (!hp_pin)
36163619 hp_pin = 0x21;
36173620
3621
+ alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
36183622 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
36193623
36203624 if (hp_pin_sense)
....@@ -3631,8 +3635,7 @@
36313635 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
36323636 * when booting with headset plugged. So skip setting it for the codec alc257
36333637 */
3634
- if (codec->core.vendor_id != 0x10ec0236 &&
3635
- codec->core.vendor_id != 0x10ec0257)
3638
+ if (spec->en_3kpull_low)
36363639 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
36373640
36383641 if (!spec->no_shutup_pins)
....@@ -3661,6 +3664,13 @@
36613664 hda_nid_t hp_pin = alc_get_hp_pin(spec);
36623665 bool hp1_pin_sense, hp2_pin_sense;
36633666
3667
+ if (spec->ultra_low_power) {
3668
+ alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
3669
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3670
+ alc_update_coef_idx(codec, 0x33, 1<<11, 0);
3671
+ msleep(30);
3672
+ }
3673
+
36643674 if (!hp_pin)
36653675 hp_pin = 0x21;
36663676 msleep(30);
....@@ -3672,12 +3682,6 @@
36723682 msleep(2);
36733683
36743684 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3675
- if (spec->ultra_low_power) {
3676
- alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
3677
- alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3678
- alc_update_coef_idx(codec, 0x33, 1<<11, 0);
3679
- msleep(30);
3680
- }
36813685
36823686 if (hp1_pin_sense || spec->ultra_low_power)
36833687 snd_hda_codec_write(codec, hp_pin, 0,
....@@ -4555,6 +4559,21 @@
45554559 }
45564560 }
45574561
4562
+static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
4563
+ const struct hda_fixup *fix, int action)
4564
+{
4565
+ struct alc_spec *spec = codec->spec;
4566
+
4567
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4568
+ spec->mute_led_polarity = 0;
4569
+ spec->mute_led_coef.idx = 0x07;
4570
+ spec->mute_led_coef.mask = 1;
4571
+ spec->mute_led_coef.on = 1;
4572
+ spec->mute_led_coef.off = 0;
4573
+ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4574
+ }
4575
+}
4576
+
45584577 /* turn on/off mic-mute LED per capture hook by coef bit */
45594578 static int coef_micmute_led_set(struct led_classdev *led_cdev,
45604579 enum led_brightness brightness)
....@@ -4581,6 +4600,16 @@
45814600 }
45824601 }
45834602
4603
+static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
4604
+ const struct hda_fixup *fix, int action)
4605
+{
4606
+ struct alc_spec *spec = codec->spec;
4607
+
4608
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
4609
+ spec->micmute_led_polarity = 1;
4610
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4611
+}
4612
+
45844613 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
45854614 const struct hda_fixup *fix, int action)
45864615 {
....@@ -4600,6 +4629,13 @@
46004629 {
46014630 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
46024631 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
4632
+}
4633
+
4634
+static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
4635
+ const struct hda_fixup *fix, int action)
4636
+{
4637
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4638
+ alc285_fixup_hp_gpio_micmute_led(codec, fix, action);
46034639 }
46044640
46054641 static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
....@@ -6654,6 +6690,34 @@
66546690 }
66556691 }
66566692
6693
+static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
6694
+ const struct hda_fixup *fix, int action)
6695
+{
6696
+ static const struct hda_pintbl pincfgs[] = {
6697
+ { 0x14, 0x90170151 },
6698
+ { 0x17, 0x90170150 },
6699
+ { }
6700
+ };
6701
+ static const hda_nid_t conn[] = { 0x02, 0x03 };
6702
+ static const hda_nid_t preferred_pairs[] = {
6703
+ 0x14, 0x02,
6704
+ 0x17, 0x03,
6705
+ 0x21, 0x02,
6706
+ 0
6707
+ };
6708
+ struct alc_spec *spec = codec->spec;
6709
+
6710
+ alc_fixup_no_shutup(codec, fix, action);
6711
+
6712
+ switch (action) {
6713
+ case HDA_FIXUP_ACT_PRE_PROBE:
6714
+ snd_hda_apply_pincfgs(codec, pincfgs);
6715
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6716
+ spec->gen.preferred_dacs = preferred_pairs;
6717
+ break;
6718
+ }
6719
+}
6720
+
66576721 enum {
66586722 ALC269_FIXUP_GPIO2,
66596723 ALC269_FIXUP_SONY_VAIO,
....@@ -6828,6 +6892,8 @@
68286892 ALC285_FIXUP_ASUS_G533Z_PINS,
68296893 ALC285_FIXUP_HP_GPIO_LED,
68306894 ALC285_FIXUP_HP_MUTE_LED,
6895
+ ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
6896
+ ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
68316897 ALC236_FIXUP_HP_GPIO_LED,
68326898 ALC236_FIXUP_HP_MUTE_LED,
68336899 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
....@@ -6884,6 +6950,8 @@
68846950 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
68856951 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
68866952 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
6953
+ ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
6954
+ ALC236_FIXUP_DELL_DUAL_CODECS,
68876955 };
68886956
68896957 /* A special fixup for Lenovo C940 and Yoga Duet 7;
....@@ -8194,6 +8262,14 @@
81948262 .type = HDA_FIXUP_FUNC,
81958263 .v.func = alc285_fixup_hp_mute_led,
81968264 },
8265
+ [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
8266
+ .type = HDA_FIXUP_FUNC,
8267
+ .v.func = alc285_fixup_hp_spectre_x360_mute_led,
8268
+ },
8269
+ [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
8270
+ .type = HDA_FIXUP_FUNC,
8271
+ .v.func = alc236_fixup_hp_mute_led_coefbit2,
8272
+ },
81978273 [ALC236_FIXUP_HP_GPIO_LED] = {
81988274 .type = HDA_FIXUP_FUNC,
81998275 .v.func = alc236_fixup_hp_gpio_led,
....@@ -8704,6 +8780,18 @@
87048780 .chained = true,
87058781 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
87068782 },
8783
+ [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
8784
+ .type = HDA_FIXUP_FUNC,
8785
+ .v.func = alc295_fixup_dell_inspiron_top_speakers,
8786
+ .chained = true,
8787
+ .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
8788
+ },
8789
+ [ALC236_FIXUP_DELL_DUAL_CODECS] = {
8790
+ .type = HDA_FIXUP_PINS,
8791
+ .v.func = alc1220_fixup_gb_dual_codecs,
8792
+ .chained = true,
8793
+ .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8794
+ },
87078795 };
87088796
87098797 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
....@@ -8745,6 +8833,7 @@
87458833 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
87468834 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
87478835 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
8836
+ SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
87488837 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
87498838 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
87508839 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
....@@ -8803,6 +8892,15 @@
88038892 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
88048893 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
88058894 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
8895
+ SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
8896
+ SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
8897
+ SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8898
+ SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
8899
+ SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
8900
+ SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
8901
+ SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
8902
+ SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
8903
+ SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
88068904 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
88078905 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
88088906 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
....@@ -8867,7 +8965,7 @@
88678965 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
88688966 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
88698967 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8870
- SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8968
+ SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
88718969 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
88728970 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
88738971 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
....@@ -8885,6 +8983,7 @@
88858983 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
88868984 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
88878985 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8986
+ SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
88888987 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
88898988 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
88908989 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
....@@ -8916,6 +9015,7 @@
89169015 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
89179016 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
89189017 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9018
+ SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
89199019 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
89209020 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
89219021 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
....@@ -8925,6 +9025,7 @@
89259025 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
89269026 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
89279027 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9028
+ SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
89289029 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
89299030 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
89309031 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
....@@ -8966,6 +9067,7 @@
89669067 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
89679068 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
89689069 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
9070
+ SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
89699071 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
89709072 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
89719073 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
....@@ -9013,6 +9115,8 @@
90139115 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
90149116 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
90159117 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
9118
+ SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
9119
+ SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
90169120 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
90179121 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
90189122 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
....@@ -9056,6 +9160,7 @@
90569160 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
90579161 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
90589162 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9163
+ SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
90599164 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
90609165 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
90619166 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -9174,6 +9279,7 @@
91749279 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
91759280 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
91769281 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
9282
+ SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
91779283 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
91789284 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
91799285 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
....@@ -9184,6 +9290,7 @@
91849290 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
91859291 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
91869292 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
9293
+ SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
91879294 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
91889295 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
91899296 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
....@@ -9899,6 +10006,7 @@
989910006 spec = codec->spec;
990010007 spec->gen.shared_mic_vref_pin = 0x18;
990110008 codec->power_save_node = 0;
10009
+ spec->en_3kpull_low = true;
990210010
990310011 #ifdef CONFIG_PM
990410012 codec->patch_ops.suspend = alc269_suspend;
....@@ -9981,12 +10089,16 @@
998110089 spec->shutup = alc256_shutup;
998210090 spec->init_hook = alc256_init;
998310091 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
10092
+ if (codec->core.vendor_id == 0x10ec0236 &&
10093
+ codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
10094
+ spec->en_3kpull_low = false;
998410095 break;
998510096 case 0x10ec0257:
998610097 spec->codec_variant = ALC269_TYPE_ALC257;
998710098 spec->shutup = alc256_shutup;
998810099 spec->init_hook = alc256_init;
998910100 spec->gen.mixer_nid = 0;
10101
+ spec->en_3kpull_low = false;
999010102 break;
999110103 case 0x10ec0215:
999210104 case 0x10ec0245:
....@@ -10514,6 +10626,17 @@
1051410626 }
1051510627 }
1051610628
10629
+static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec,
10630
+ const struct hda_fixup *fix, int action)
10631
+{
10632
+ struct alc_spec *spec = codec->spec;
10633
+
10634
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
10635
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10636
+ spec->gen.hp_automute_hook = alc897_hp_automute_hook;
10637
+ }
10638
+}
10639
+
1051710640 static const struct coef_fw alc668_coefs[] = {
1051810641 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
1051910642 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
....@@ -10597,6 +10720,9 @@
1059710720 ALC897_FIXUP_LENOVO_HEADSET_MIC,
1059810721 ALC897_FIXUP_HEADSET_MIC_PIN,
1059910722 ALC897_FIXUP_HP_HSMIC_VERB,
10723
+ ALC897_FIXUP_LENOVO_HEADSET_MODE,
10724
+ ALC897_FIXUP_HEADSET_MIC_PIN2,
10725
+ ALC897_FIXUP_UNIS_H3C_X500S,
1060010726 };
1060110727
1060210728 static const struct hda_fixup alc662_fixups[] = {
....@@ -11023,6 +11149,26 @@
1102311149 { }
1102411150 },
1102511151 },
11152
+ [ALC897_FIXUP_LENOVO_HEADSET_MODE] = {
11153
+ .type = HDA_FIXUP_FUNC,
11154
+ .v.func = alc897_fixup_lenovo_headset_mode,
11155
+ },
11156
+ [ALC897_FIXUP_HEADSET_MIC_PIN2] = {
11157
+ .type = HDA_FIXUP_PINS,
11158
+ .v.pins = (const struct hda_pintbl[]) {
11159
+ { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
11160
+ { }
11161
+ },
11162
+ .chained = true,
11163
+ .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE
11164
+ },
11165
+ [ALC897_FIXUP_UNIS_H3C_X500S] = {
11166
+ .type = HDA_FIXUP_VERBS,
11167
+ .v.verbs = (const struct hda_verb[]) {
11168
+ { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 },
11169
+ {}
11170
+ },
11171
+ },
1102611172 };
1102711173
1102811174 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
....@@ -11048,8 +11194,11 @@
1104811194 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
1104911195 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
1105011196 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
11197
+ SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
1105111198 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
11199
+ SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
1105211200 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
11201
+ SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2),
1105311202 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
1105411203 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
1105511204 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
....@@ -11071,10 +11220,14 @@
1107111220 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
1107211221 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
1107311222 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN),
11223
+ SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN),
1107411224 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN),
1107511225 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
1107611226 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
1107711227 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
11228
+ SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
11229
+ SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
11230
+ SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
1107811231 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
1107911232 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
1108011233 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
....@@ -11082,6 +11235,7 @@
1108211235 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
1108311236 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
1108411237 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
11238
+ SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB),
1108511239
1108611240 #if 0
1108711241 /* Below is a quirk table taken from the old code.
....@@ -11176,6 +11330,7 @@
1117611330 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
1117711331 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
1117811332 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
11333
+ {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
1117911334 {}
1118011335 };
1118111336