forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/sound/pci/hda/patch_realtek.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Universal Interface for Intel High Definition Audio Codec
34 *
....@@ -7,20 +8,6 @@
78 * PeiSen Hou <pshou@realtek.com.tw>
89 * Takashi Iwai <tiwai@suse.de>
910 * Jonathan Woithe <jwoithe@just42.net>
10
- *
11
- * This driver is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This driver is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to the Free Software
23
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2411 */
2512
2613 #include <linux/init.h>
....@@ -30,9 +17,10 @@
3017 #include <linux/dmi.h>
3118 #include <linux/module.h>
3219 #include <linux/input.h>
20
+#include <linux/leds.h>
3321 #include <sound/core.h>
3422 #include <sound/jack.h>
35
-#include "hda_codec.h"
23
+#include <sound/hda_codec.h>
3624 #include "hda_local.h"
3725 #include "hda_auto_parser.h"
3826 #include "hda_jack.h"
....@@ -79,6 +67,13 @@
7967 unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */
8068 };
8169
70
+struct alc_coef_led {
71
+ unsigned int idx;
72
+ unsigned int mask;
73
+ unsigned int on;
74
+ unsigned int off;
75
+};
76
+
8277 struct alc_spec {
8378 struct hda_gen_spec gen; /* must be at head */
8479
....@@ -92,7 +87,7 @@
9287 unsigned int gpio_data;
9388 bool gpio_write_delay; /* add a delay before writing gpio_data */
9489
95
- /* mute LED for HP laptops, see alc269_fixup_mic_mute_hook() */
90
+ /* mute LED for HP laptops, see vref_mute_led_set() */
9691 int mute_led_polarity;
9792 int micmute_led_polarity;
9893 hda_nid_t mute_led_nid;
....@@ -100,6 +95,9 @@
10095
10196 unsigned int gpio_mute_led_mask;
10297 unsigned int gpio_mic_led_mask;
98
+ struct alc_coef_led mute_led_coef;
99
+ struct alc_coef_led mic_led_coef;
100
+ struct mutex coef_mutex;
103101
104102 hda_nid_t headset_mic_pin;
105103 hda_nid_t headphone_mic_pin;
....@@ -120,6 +118,10 @@
120118 unsigned int no_depop_delay:1;
121119 unsigned int done_hp_init:1;
122120 unsigned int no_shutup_pins:1;
121
+ unsigned int ultra_low_power:1;
122
+ unsigned int has_hs_key:1;
123
+ unsigned int no_internal_mic_pin:1;
124
+ unsigned int en_3kpull_low:1;
123125
124126 /* for PLL fix */
125127 hda_nid_t pll_nid;
....@@ -133,8 +135,24 @@
133135 * COEF access helper functions
134136 */
135137
136
-static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
137
- unsigned int coef_idx)
138
+static void coef_mutex_lock(struct hda_codec *codec)
139
+{
140
+ struct alc_spec *spec = codec->spec;
141
+
142
+ snd_hda_power_up_pm(codec);
143
+ mutex_lock(&spec->coef_mutex);
144
+}
145
+
146
+static void coef_mutex_unlock(struct hda_codec *codec)
147
+{
148
+ struct alc_spec *spec = codec->spec;
149
+
150
+ mutex_unlock(&spec->coef_mutex);
151
+ snd_hda_power_down_pm(codec);
152
+}
153
+
154
+static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
155
+ unsigned int coef_idx)
138156 {
139157 unsigned int val;
140158
....@@ -143,28 +161,56 @@
143161 return val;
144162 }
145163
164
+static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
165
+ unsigned int coef_idx)
166
+{
167
+ unsigned int val;
168
+
169
+ coef_mutex_lock(codec);
170
+ val = __alc_read_coefex_idx(codec, nid, coef_idx);
171
+ coef_mutex_unlock(codec);
172
+ return val;
173
+}
174
+
146175 #define alc_read_coef_idx(codec, coef_idx) \
147176 alc_read_coefex_idx(codec, 0x20, coef_idx)
148177
149
-static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
150
- unsigned int coef_idx, unsigned int coef_val)
178
+static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
179
+ unsigned int coef_idx, unsigned int coef_val)
151180 {
152181 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx);
153182 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val);
154183 }
155184
185
+static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
186
+ unsigned int coef_idx, unsigned int coef_val)
187
+{
188
+ coef_mutex_lock(codec);
189
+ __alc_write_coefex_idx(codec, nid, coef_idx, coef_val);
190
+ coef_mutex_unlock(codec);
191
+}
192
+
156193 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
157194 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
195
+
196
+static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
197
+ unsigned int coef_idx, unsigned int mask,
198
+ unsigned int bits_set)
199
+{
200
+ unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx);
201
+
202
+ if (val != -1)
203
+ __alc_write_coefex_idx(codec, nid, coef_idx,
204
+ (val & ~mask) | bits_set);
205
+}
158206
159207 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
160208 unsigned int coef_idx, unsigned int mask,
161209 unsigned int bits_set)
162210 {
163
- unsigned int val = alc_read_coefex_idx(codec, nid, coef_idx);
164
-
165
- if (val != -1)
166
- alc_write_coefex_idx(codec, nid, coef_idx,
167
- (val & ~mask) | bits_set);
211
+ coef_mutex_lock(codec);
212
+ __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set);
213
+ coef_mutex_unlock(codec);
168214 }
169215
170216 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
....@@ -197,13 +243,15 @@
197243 static void alc_process_coef_fw(struct hda_codec *codec,
198244 const struct coef_fw *fw)
199245 {
246
+ coef_mutex_lock(codec);
200247 for (; fw->nid; fw++) {
201248 if (fw->mask == (unsigned short)-1)
202
- alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
249
+ __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
203250 else
204
- alc_update_coefex_idx(codec, fw->nid, fw->idx,
205
- fw->mask, fw->val);
251
+ __alc_update_coefex_idx(codec, fw->nid, fw->idx,
252
+ fw->mask, fw->val);
206253 }
254
+ coef_mutex_unlock(codec);
207255 }
208256
209257 /*
....@@ -287,6 +335,13 @@
287335 const struct hda_fixup *fix, int action)
288336 {
289337 alc_fixup_gpio(codec, action, 0x04);
338
+}
339
+
340
+static void alc_fixup_micmute_led(struct hda_codec *codec,
341
+ const struct hda_fixup *fix, int action)
342
+{
343
+ if (action == HDA_FIXUP_ACT_PROBE)
344
+ snd_hda_gen_add_micmute_led_cdev(codec, NULL);
290345 }
291346
292347 /*
....@@ -376,14 +431,16 @@
376431 case 0x10ec0295:
377432 case 0x10ec0299:
378433 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
379
- /* fallthrough */
434
+ fallthrough;
380435 case 0x10ec0215:
436
+ case 0x10ec0230:
381437 case 0x10ec0233:
382438 case 0x10ec0235:
383439 case 0x10ec0236:
384440 case 0x10ec0245:
385441 case 0x10ec0255:
386442 case 0x10ec0256:
443
+ case 0x19e58326:
387444 case 0x10ec0257:
388445 case 0x10ec0282:
389446 case 0x10ec0283:
....@@ -482,10 +539,10 @@
482539 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
483540 {
484541 /* We currently only handle front, HP */
485
- static hda_nid_t pins[] = {
542
+ static const hda_nid_t pins[] = {
486543 0x0f, 0x10, 0x14, 0x15, 0x17, 0
487544 };
488
- hda_nid_t *p;
545
+ const hda_nid_t *p;
489546 for (p = pins; *p; p++)
490547 set_eapd(codec, *p, on);
491548 }
....@@ -521,6 +578,7 @@
521578 switch (codec->core.vendor_id) {
522579 case 0x10ec0236:
523580 case 0x10ec0256:
581
+ case 0x19e58326:
524582 case 0x10ec0283:
525583 case 0x10ec0286:
526584 case 0x10ec0288:
....@@ -550,7 +608,6 @@
550608 /* generic EAPD initialization */
551609 static void alc_auto_init_amp(struct hda_codec *codec, int type)
552610 {
553
- alc_fill_eapd_coef(codec);
554611 alc_auto_setup_eapd(codec, true);
555612 alc_write_gpio(codec);
556613 switch (type) {
....@@ -771,7 +828,7 @@
771828 alc_setup_gpio(codec, 0x02);
772829 break;
773830 case 7:
774
- alc_setup_gpio(codec, 0x03);
831
+ alc_setup_gpio(codec, 0x04);
775832 break;
776833 case 5:
777834 default:
....@@ -847,9 +904,23 @@
847904 * Common callbacks
848905 */
849906
907
+static void alc_pre_init(struct hda_codec *codec)
908
+{
909
+ alc_fill_eapd_coef(codec);
910
+}
911
+
912
+#define is_s3_resume(codec) \
913
+ ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
914
+#define is_s4_resume(codec) \
915
+ ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
916
+
850917 static int alc_init(struct hda_codec *codec)
851918 {
852919 struct alc_spec *spec = codec->spec;
920
+
921
+ /* hibernation resume needs the full chip initialization */
922
+ if (is_s4_resume(codec))
923
+ alc_pre_init(codec);
853924
854925 if (spec->init_hook)
855926 spec->init_hook(codec);
....@@ -914,7 +985,7 @@
914985 if (!spec->no_depop_delay)
915986 msleep(150); /* to avoid pop noise */
916987 codec->patch_ops.init(codec);
917
- regcache_sync(codec->core.regmap);
988
+ snd_hda_regmap_sync(codec);
918989 hda_call_check_power_status(codec, 0x01);
919990 return 0;
920991 }
....@@ -956,7 +1027,7 @@
9561027 const char *name;
9571028 };
9581029
959
-static struct alc_codec_rename_table rename_tbl[] = {
1030
+static const struct alc_codec_rename_table rename_tbl[] = {
9601031 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
9611032 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
9621033 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
....@@ -977,7 +1048,7 @@
9771048 { } /* terminator */
9781049 };
9791050
980
-static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
1051
+static const struct alc_codec_rename_pci_table rename_pci_tbl[] = {
9811052 { 0x10ec0280, 0x1028, 0, "ALC3220" },
9821053 { 0x10ec0282, 0x1028, 0, "ALC3221" },
9831054 { 0x10ec0283, 0x1028, 0, "ALC3223" },
....@@ -1065,7 +1136,7 @@
10651136 return 0;
10661137 }
10671138
1068
-static const struct snd_pci_quirk beep_white_list[] = {
1139
+static const struct snd_pci_quirk beep_allow_list[] = {
10691140 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
10701141 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
10711142 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
....@@ -1075,7 +1146,7 @@
10751146 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
10761147 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
10771148 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1078
- /* blacklist -- no beep available */
1149
+ /* denylist -- no beep available */
10791150 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
10801151 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
10811152 {}
....@@ -1085,7 +1156,7 @@
10851156 {
10861157 struct alc_spec *spec = codec->spec;
10871158 const struct snd_pci_quirk *q;
1088
- q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list);
1159
+ q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list);
10891160 if (q)
10901161 return q->value;
10911162 return spec->cdefine.enable_pcbeep;
....@@ -1137,7 +1208,9 @@
11371208 codec->single_adc_amp = 1;
11381209 /* FIXME: do we need this for all Realtek codec models? */
11391210 codec->spdif_status_reset = 1;
1211
+ codec->forced_resume = 1;
11401212 codec->patch_ops = alc_patch_ops;
1213
+ mutex_init(&spec->coef_mutex);
11411214
11421215 err = alc_codec_rename_from_preset(codec);
11431216 if (err < 0) {
....@@ -1584,6 +1657,8 @@
15841657
15851658 codec->patch_ops.unsol_event = alc880_unsol_event;
15861659
1660
+ alc_pre_init(codec);
1661
+
15871662 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl,
15881663 alc880_fixups);
15891664 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -1835,6 +1910,8 @@
18351910
18361911 spec->shutup = alc_eapd_shutup;
18371912
1913
+ alc_pre_init(codec);
1914
+
18381915 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl,
18391916 alc260_fixups);
18401917 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -1916,6 +1993,7 @@
19161993 ALC1220_FIXUP_CLEVO_PB51ED_PINS,
19171994 ALC887_FIXUP_ASUS_AUDIO,
19181995 ALC887_FIXUP_ASUS_HMIC,
1996
+ ALCS1200A_FIXUP_MIC_VREF,
19191997 };
19201998
19211999 static void alc889_fixup_coef(struct hda_codec *codec,
....@@ -1945,19 +2023,19 @@
19452023 {
19462024 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
19472025 /* fake the connections during parsing the tree */
1948
- hda_nid_t conn1[2] = { 0x0c, 0x0d };
1949
- hda_nid_t conn2[2] = { 0x0e, 0x0f };
1950
- snd_hda_override_conn_list(codec, 0x14, 2, conn1);
1951
- snd_hda_override_conn_list(codec, 0x15, 2, conn1);
1952
- snd_hda_override_conn_list(codec, 0x18, 2, conn2);
1953
- snd_hda_override_conn_list(codec, 0x1a, 2, conn2);
2026
+ static const hda_nid_t conn1[] = { 0x0c, 0x0d };
2027
+ static const hda_nid_t conn2[] = { 0x0e, 0x0f };
2028
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2029
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
2030
+ snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2);
2031
+ snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2);
19542032 } else if (action == HDA_FIXUP_ACT_PROBE) {
19552033 /* restore the connections */
1956
- hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
1957
- snd_hda_override_conn_list(codec, 0x14, 5, conn);
1958
- snd_hda_override_conn_list(codec, 0x15, 5, conn);
1959
- snd_hda_override_conn_list(codec, 0x18, 5, conn);
1960
- snd_hda_override_conn_list(codec, 0x1a, 5, conn);
2034
+ static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
2035
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2036
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
2037
+ snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn);
2038
+ snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn);
19612039 }
19622040 }
19632041
....@@ -1965,8 +2043,8 @@
19652043 static void alc889_fixup_mbp_vref(struct hda_codec *codec,
19662044 const struct hda_fixup *fix, int action)
19672045 {
2046
+ static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 };
19682047 struct alc_spec *spec = codec->spec;
1969
- static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 };
19702048 int i;
19712049
19722050 if (action != HDA_FIXUP_ACT_INIT)
....@@ -2002,7 +2080,7 @@
20022080 static void alc889_fixup_imac91_vref(struct hda_codec *codec,
20032081 const struct hda_fixup *fix, int action)
20042082 {
2005
- static hda_nid_t nids[2] = { 0x18, 0x1a };
2083
+ static const hda_nid_t nids[] = { 0x18, 0x1a };
20062084
20072085 if (action == HDA_FIXUP_ACT_INIT)
20082086 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2012,7 +2090,7 @@
20122090 static void alc889_fixup_mba11_vref(struct hda_codec *codec,
20132091 const struct hda_fixup *fix, int action)
20142092 {
2015
- static hda_nid_t nids[1] = { 0x18 };
2093
+ static const hda_nid_t nids[] = { 0x18 };
20162094
20172095 if (action == HDA_FIXUP_ACT_INIT)
20182096 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2022,7 +2100,7 @@
20222100 static void alc889_fixup_mba21_vref(struct hda_codec *codec,
20232101 const struct hda_fixup *fix, int action)
20242102 {
2025
- static hda_nid_t nids[2] = { 0x18, 0x19 };
2103
+ static const hda_nid_t nids[] = { 0x18, 0x19 };
20262104
20272105 if (action == HDA_FIXUP_ACT_INIT)
20282106 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2128,7 +2206,7 @@
21282206 const struct hda_fixup *fix,
21292207 int action)
21302208 {
2131
- hda_nid_t conn1[1] = { 0x0c };
2209
+ static const hda_nid_t conn1[] = { 0x0c };
21322210
21332211 if (action != HDA_FIXUP_ACT_PRE_PROBE)
21342212 return;
....@@ -2137,8 +2215,8 @@
21372215 /* We therefore want to make sure 0x14 (front headphone) and
21382216 * 0x1b (speakers) use the stereo DAC 0x02
21392217 */
2140
- snd_hda_override_conn_list(codec, 0x14, 1, conn1);
2141
- snd_hda_override_conn_list(codec, 0x1b, 1, conn1);
2218
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2219
+ snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
21422220 }
21432221
21442222 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
....@@ -2461,6 +2539,14 @@
24612539 .chained = true,
24622540 .chain_id = ALC887_FIXUP_ASUS_AUDIO,
24632541 },
2542
+ [ALCS1200A_FIXUP_MIC_VREF] = {
2543
+ .type = HDA_FIXUP_PINCTLS,
2544
+ .v.pins = (const struct hda_pintbl[]) {
2545
+ { 0x18, PIN_VREF50 }, /* rear mic */
2546
+ { 0x19, PIN_VREF50 }, /* front mic */
2547
+ {}
2548
+ }
2549
+ },
24642550 };
24652551
24662552 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
....@@ -2498,6 +2584,7 @@
24982584 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
24992585 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
25002586 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
2587
+ SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
25012588 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
25022589 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
25032590 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
....@@ -2546,16 +2633,19 @@
25462633 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
25472634 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
25482635 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),
25492637 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25502638 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25512639 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25522640 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25532641 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25542642 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2643
+ SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25552644 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25562645 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25572646 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25582647 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2648
+ SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25592649 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25602650 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25612651 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
....@@ -2614,6 +2704,28 @@
26142704 {}
26152705 };
26162706
2707
+static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = {
2708
+ SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950,
2709
+ {0x14, 0x01014010},
2710
+ {0x15, 0x01011012},
2711
+ {0x16, 0x01016011},
2712
+ {0x18, 0x01a19040},
2713
+ {0x19, 0x02a19050},
2714
+ {0x1a, 0x0181304f},
2715
+ {0x1b, 0x0221401f},
2716
+ {0x1e, 0x01456130}),
2717
+ SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2718
+ {0x14, 0x01015010},
2719
+ {0x15, 0x01011012},
2720
+ {0x16, 0x01011011},
2721
+ {0x18, 0x01a11040},
2722
+ {0x19, 0x02a19050},
2723
+ {0x1a, 0x0181104f},
2724
+ {0x1b, 0x0221401f},
2725
+ {0x1e, 0x01451130}),
2726
+ {}
2727
+};
2728
+
26172729 /*
26182730 * BIOS auto configuration
26192731 */
....@@ -2651,8 +2763,11 @@
26512763 break;
26522764 }
26532765
2766
+ alc_pre_init(codec);
2767
+
26542768 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
26552769 alc882_fixups);
2770
+ snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true);
26562771 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
26572772
26582773 alc_auto_parse_customize_define(codec);
....@@ -2825,6 +2940,8 @@
28252940 #endif
28262941 alc_fix_pll_init(codec, 0x20, 0x0a, 10);
28272942
2943
+ alc_pre_init(codec);
2944
+
28282945 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl,
28292946 alc262_fixups);
28302947 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -2965,9 +3082,12 @@
29653082 return err;
29663083
29673084 spec = codec->spec;
2968
- spec->gen.beep_nid = 0x01;
3085
+ if (has_cdefine_beep(codec))
3086
+ spec->gen.beep_nid = 0x01;
29693087
29703088 spec->shutup = alc_eapd_shutup;
3089
+
3090
+ alc_pre_init(codec);
29713091
29723092 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups);
29733093 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -3085,6 +3205,113 @@
30853205 return alc_parse_auto_config(codec, alc269_ignore, ssids);
30863206 }
30873207
3208
+static const struct hda_jack_keymap alc_headset_btn_keymap[] = {
3209
+ { SND_JACK_BTN_0, KEY_PLAYPAUSE },
3210
+ { SND_JACK_BTN_1, KEY_VOICECOMMAND },
3211
+ { SND_JACK_BTN_2, KEY_VOLUMEUP },
3212
+ { SND_JACK_BTN_3, KEY_VOLUMEDOWN },
3213
+ {}
3214
+};
3215
+
3216
+static void alc_headset_btn_callback(struct hda_codec *codec,
3217
+ struct hda_jack_callback *jack)
3218
+{
3219
+ int report = 0;
3220
+
3221
+ if (jack->unsol_res & (7 << 13))
3222
+ report |= SND_JACK_BTN_0;
3223
+
3224
+ if (jack->unsol_res & (1 << 16 | 3 << 8))
3225
+ report |= SND_JACK_BTN_1;
3226
+
3227
+ /* Volume up key */
3228
+ if (jack->unsol_res & (7 << 23))
3229
+ report |= SND_JACK_BTN_2;
3230
+
3231
+ /* Volume down key */
3232
+ if (jack->unsol_res & (7 << 10))
3233
+ report |= SND_JACK_BTN_3;
3234
+
3235
+ jack->jack->button_state = report;
3236
+}
3237
+
3238
+static void alc_disable_headset_jack_key(struct hda_codec *codec)
3239
+{
3240
+ struct alc_spec *spec = codec->spec;
3241
+
3242
+ if (!spec->has_hs_key)
3243
+ return;
3244
+
3245
+ switch (codec->core.vendor_id) {
3246
+ case 0x10ec0215:
3247
+ case 0x10ec0225:
3248
+ case 0x10ec0285:
3249
+ case 0x10ec0287:
3250
+ case 0x10ec0295:
3251
+ case 0x10ec0289:
3252
+ case 0x10ec0299:
3253
+ alc_write_coef_idx(codec, 0x48, 0x0);
3254
+ alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3255
+ alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
3256
+ break;
3257
+ case 0x10ec0230:
3258
+ case 0x10ec0236:
3259
+ case 0x10ec0256:
3260
+ case 0x19e58326:
3261
+ alc_write_coef_idx(codec, 0x48, 0x0);
3262
+ alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3263
+ break;
3264
+ }
3265
+}
3266
+
3267
+static void alc_enable_headset_jack_key(struct hda_codec *codec)
3268
+{
3269
+ struct alc_spec *spec = codec->spec;
3270
+
3271
+ if (!spec->has_hs_key)
3272
+ return;
3273
+
3274
+ switch (codec->core.vendor_id) {
3275
+ case 0x10ec0215:
3276
+ case 0x10ec0225:
3277
+ case 0x10ec0285:
3278
+ case 0x10ec0287:
3279
+ case 0x10ec0295:
3280
+ case 0x10ec0289:
3281
+ case 0x10ec0299:
3282
+ alc_write_coef_idx(codec, 0x48, 0xd011);
3283
+ alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3284
+ alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
3285
+ break;
3286
+ case 0x10ec0230:
3287
+ case 0x10ec0236:
3288
+ case 0x10ec0256:
3289
+ case 0x19e58326:
3290
+ alc_write_coef_idx(codec, 0x48, 0xd011);
3291
+ alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3292
+ break;
3293
+ }
3294
+}
3295
+
3296
+static void alc_fixup_headset_jack(struct hda_codec *codec,
3297
+ const struct hda_fixup *fix, int action)
3298
+{
3299
+ struct alc_spec *spec = codec->spec;
3300
+
3301
+ switch (action) {
3302
+ case HDA_FIXUP_ACT_PRE_PROBE:
3303
+ spec->has_hs_key = 1;
3304
+ snd_hda_jack_detect_enable_callback(codec, 0x55,
3305
+ alc_headset_btn_callback);
3306
+ snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false,
3307
+ SND_JACK_HEADSET, alc_headset_btn_keymap);
3308
+ break;
3309
+ case HDA_FIXUP_ACT_INIT:
3310
+ alc_enable_headset_jack_key(codec);
3311
+ break;
3312
+ }
3313
+}
3314
+
30883315 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
30893316 {
30903317 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0);
....@@ -3103,7 +3330,7 @@
31033330 alc_shutup_pins(codec);
31043331 }
31053332
3106
-static struct coef_fw alc282_coefs[] = {
3333
+static const struct coef_fw alc282_coefs[] = {
31073334 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
31083335 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
31093336 WRITE_COEF(0x07, 0x0200), /* DMIC control */
....@@ -3215,7 +3442,7 @@
32153442 alc_write_coef_idx(codec, 0x78, coef78);
32163443 }
32173444
3218
-static struct coef_fw alc283_coefs[] = {
3445
+static const struct coef_fw alc283_coefs[] = {
32193446 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
32203447 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
32213448 WRITE_COEF(0x07, 0x0200), /* DMIC control */
....@@ -3336,8 +3563,17 @@
33363563 hda_nid_t hp_pin = alc_get_hp_pin(spec);
33373564 bool hp_pin_sense;
33383565
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
+
33393575 if (!hp_pin)
3340
- return;
3576
+ hp_pin = 0x21;
33413577
33423578 msleep(30);
33433579
....@@ -3351,13 +3587,13 @@
33513587 snd_hda_codec_write(codec, hp_pin, 0,
33523588 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
33533589
3354
- if (hp_pin_sense)
3590
+ if (hp_pin_sense || spec->ultra_low_power)
33553591 msleep(85);
33563592
33573593 snd_hda_codec_write(codec, hp_pin, 0,
33583594 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
33593595
3360
- if (hp_pin_sense)
3596
+ if (hp_pin_sense || spec->ultra_low_power)
33613597 msleep(100);
33623598
33633599 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
....@@ -3379,11 +3615,10 @@
33793615 hda_nid_t hp_pin = alc_get_hp_pin(spec);
33803616 bool hp_pin_sense;
33813617
3382
- if (!hp_pin) {
3383
- alc269_shutup(codec);
3384
- return;
3385
- }
3618
+ if (!hp_pin)
3619
+ hp_pin = 0x21;
33863620
3621
+ alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
33873622 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
33883623
33893624 if (hp_pin_sense)
....@@ -3392,7 +3627,7 @@
33923627 snd_hda_codec_write(codec, hp_pin, 0,
33933628 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
33943629
3395
- if (hp_pin_sense)
3630
+ if (hp_pin_sense || spec->ultra_low_power)
33963631 msleep(85);
33973632
33983633 /* 3k pull low control for Headset jack. */
....@@ -3400,19 +3635,27 @@
34003635 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
34013636 * when booting with headset plugged. So skip setting it for the codec alc257
34023637 */
3403
- if (spec->codec_variant != ALC269_TYPE_ALC257 &&
3404
- spec->codec_variant != ALC269_TYPE_ALC256)
3638
+ if (spec->en_3kpull_low)
34053639 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
34063640
34073641 if (!spec->no_shutup_pins)
34083642 snd_hda_codec_write(codec, hp_pin, 0,
34093643 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34103644
3411
- if (hp_pin_sense)
3645
+ if (hp_pin_sense || spec->ultra_low_power)
34123646 msleep(100);
34133647
34143648 alc_auto_setup_eapd(codec, false);
34153649 alc_shutup_pins(codec);
3650
+ if (spec->ultra_low_power) {
3651
+ msleep(50);
3652
+ alc_update_coef_idx(codec, 0x03, 1<<1, 0);
3653
+ alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4);
3654
+ alc_update_coef_idx(codec, 0x08, 3<<2, 0);
3655
+ alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15);
3656
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3657
+ msleep(30);
3658
+ }
34163659 }
34173660
34183661 static void alc225_init(struct hda_codec *codec)
....@@ -3421,9 +3664,15 @@
34213664 hda_nid_t hp_pin = alc_get_hp_pin(spec);
34223665 bool hp1_pin_sense, hp2_pin_sense;
34233666
3424
- if (!hp_pin)
3425
- return;
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
+ }
34263673
3674
+ if (!hp_pin)
3675
+ hp_pin = 0x21;
34273676 msleep(30);
34283677
34293678 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
....@@ -3434,24 +3683,24 @@
34343683
34353684 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
34363685
3437
- if (hp1_pin_sense)
3686
+ if (hp1_pin_sense || spec->ultra_low_power)
34383687 snd_hda_codec_write(codec, hp_pin, 0,
34393688 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34403689 if (hp2_pin_sense)
34413690 snd_hda_codec_write(codec, 0x16, 0,
34423691 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34433692
3444
- if (hp1_pin_sense || hp2_pin_sense)
3693
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34453694 msleep(85);
34463695
3447
- if (hp1_pin_sense)
3696
+ if (hp1_pin_sense || spec->ultra_low_power)
34483697 snd_hda_codec_write(codec, hp_pin, 0,
34493698 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
34503699 if (hp2_pin_sense)
34513700 snd_hda_codec_write(codec, 0x16, 0,
34523701 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
34533702
3454
- if (hp1_pin_sense || hp2_pin_sense)
3703
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34553704 msleep(100);
34563705
34573706 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
....@@ -3464,11 +3713,10 @@
34643713 hda_nid_t hp_pin = alc_get_hp_pin(spec);
34653714 bool hp1_pin_sense, hp2_pin_sense;
34663715
3467
- if (!hp_pin) {
3468
- alc269_shutup(codec);
3469
- return;
3470
- }
3716
+ if (!hp_pin)
3717
+ hp_pin = 0x21;
34713718
3719
+ alc_disable_headset_jack_key(codec);
34723720 /* 3k pull low control for Headset jack. */
34733721 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);
34743722
....@@ -3478,28 +3726,39 @@
34783726 if (hp1_pin_sense || hp2_pin_sense)
34793727 msleep(2);
34803728
3481
- if (hp1_pin_sense)
3729
+ if (hp1_pin_sense || spec->ultra_low_power)
34823730 snd_hda_codec_write(codec, hp_pin, 0,
34833731 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34843732 if (hp2_pin_sense)
34853733 snd_hda_codec_write(codec, 0x16, 0,
34863734 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34873735
3488
- if (hp1_pin_sense || hp2_pin_sense)
3736
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34893737 msleep(85);
34903738
3491
- if (hp1_pin_sense)
3739
+ if (hp1_pin_sense || spec->ultra_low_power)
34923740 snd_hda_codec_write(codec, hp_pin, 0,
34933741 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34943742 if (hp2_pin_sense)
34953743 snd_hda_codec_write(codec, 0x16, 0,
34963744 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34973745
3498
- if (hp1_pin_sense || hp2_pin_sense)
3746
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34993747 msleep(100);
35003748
35013749 alc_auto_setup_eapd(codec, false);
35023750 alc_shutup_pins(codec);
3751
+ if (spec->ultra_low_power) {
3752
+ msleep(50);
3753
+ alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2);
3754
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3755
+ alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11);
3756
+ alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4);
3757
+ msleep(30);
3758
+ }
3759
+
3760
+ alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
3761
+ alc_enable_headset_jack_key(codec);
35033762 }
35043763
35053764 static void alc_default_init(struct hda_codec *codec)
....@@ -3694,8 +3953,8 @@
36943953 }
36953954
36963955 #ifdef HALT_REALTEK_ALC5505
3697
-#define alc5505_dsp_suspend(codec) /* NOP */
3698
-#define alc5505_dsp_resume(codec) /* NOP */
3956
+#define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
3957
+#define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
36993958 #else
37003959 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
37013960 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
....@@ -3731,7 +3990,7 @@
37313990 msleep(200);
37323991 }
37333992
3734
- regcache_sync(codec->core.regmap);
3993
+ snd_hda_regmap_sync(codec);
37353994 hda_call_check_power_status(codec, 0x01);
37363995
37373996 /* on some machine, the BIOS will clear the codec gpio data when enter
....@@ -3804,6 +4063,15 @@
38044063 snd_hda_sequence_write(codec, verbs);
38054064 }
38064065
4066
+/* Fix the speaker amp after resume, etc */
4067
+static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
4068
+ const struct hda_fixup *fix,
4069
+ int action)
4070
+{
4071
+ if (action == HDA_FIXUP_ACT_INIT)
4072
+ alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
4073
+}
4074
+
38074075 static void alc269_fixup_pcm_44k(struct hda_codec *codec,
38084076 const struct hda_fixup *fix, int action)
38094077 {
....@@ -3865,6 +4133,72 @@
38654133 vref);
38664134 }
38674135
4136
+/*
4137
+ * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4138
+ */
4139
+struct hda_alc298_mbxinit {
4140
+ unsigned char value_0x23;
4141
+ unsigned char value_0x25;
4142
+};
4143
+
4144
+static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
4145
+ const struct hda_alc298_mbxinit *initval,
4146
+ bool first)
4147
+{
4148
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0);
4149
+ alc_write_coef_idx(codec, 0x26, 0xb000);
4150
+
4151
+ if (first)
4152
+ snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0);
4153
+
4154
+ snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4155
+ alc_write_coef_idx(codec, 0x26, 0xf000);
4156
+ alc_write_coef_idx(codec, 0x23, initval->value_0x23);
4157
+
4158
+ if (initval->value_0x23 != 0x1e)
4159
+ alc_write_coef_idx(codec, 0x25, initval->value_0x25);
4160
+
4161
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4162
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4163
+}
4164
+
4165
+static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
4166
+ const struct hda_fixup *fix,
4167
+ int action)
4168
+{
4169
+ /* Initialization magic */
4170
+ static const struct hda_alc298_mbxinit dac_init[] = {
4171
+ {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4172
+ {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4173
+ {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4174
+ {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4175
+ {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4176
+ {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4177
+ {0x2f, 0x00},
4178
+ {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4179
+ {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4180
+ {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4181
+ {}
4182
+ };
4183
+ const struct hda_alc298_mbxinit *seq;
4184
+
4185
+ if (action != HDA_FIXUP_ACT_INIT)
4186
+ return;
4187
+
4188
+ /* Start */
4189
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00);
4190
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4191
+ alc_write_coef_idx(codec, 0x26, 0xf000);
4192
+ alc_write_coef_idx(codec, 0x22, 0x31);
4193
+ alc_write_coef_idx(codec, 0x23, 0x0b);
4194
+ alc_write_coef_idx(codec, 0x25, 0x00);
4195
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4196
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4197
+
4198
+ for (seq = dac_init; seq->value_0x23; seq++)
4199
+ alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init);
4200
+}
4201
+
38684202 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
38694203 const struct hda_fixup *fix, int action)
38704204 {
....@@ -3875,25 +4209,34 @@
38754209 }
38764210 }
38774211
3878
-
3879
-/* update mute-LED according to the speaker mute state via mic VREF pin */
3880
-static void alc269_fixup_mic_mute_hook(void *private_data, int enabled)
4212
+static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
4213
+ bool polarity, bool on)
38814214 {
3882
- struct hda_codec *codec = private_data;
3883
- struct alc_spec *spec = codec->spec;
38844215 unsigned int pinval;
38854216
3886
- if (spec->mute_led_polarity)
3887
- enabled = !enabled;
3888
- pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
4217
+ if (!pin)
4218
+ return;
4219
+ if (polarity)
4220
+ on = !on;
4221
+ pinval = snd_hda_codec_get_pin_target(codec, pin);
38894222 pinval &= ~AC_PINCTL_VREFEN;
3890
- pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80;
3891
- if (spec->mute_led_nid) {
3892
- /* temporarily power up/down for setting VREF */
3893
- snd_hda_power_up_pm(codec);
3894
- snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval);
3895
- snd_hda_power_down_pm(codec);
3896
- }
4223
+ pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
4224
+ /* temporarily power up/down for setting VREF */
4225
+ snd_hda_power_up_pm(codec);
4226
+ snd_hda_set_pin_ctl_cache(codec, pin, pinval);
4227
+ snd_hda_power_down_pm(codec);
4228
+}
4229
+
4230
+/* update mute-LED according to the speaker mute state via mic VREF pin */
4231
+static int vref_mute_led_set(struct led_classdev *led_cdev,
4232
+ enum led_brightness brightness)
4233
+{
4234
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4235
+ struct alc_spec *spec = codec->spec;
4236
+
4237
+ alc_update_vref_led(codec, spec->mute_led_nid,
4238
+ spec->mute_led_polarity, brightness);
4239
+ return 0;
38974240 }
38984241
38994242 /* Make sure the led works even in runtime suspend */
....@@ -3931,8 +4274,7 @@
39314274 break;
39324275 spec->mute_led_polarity = pol;
39334276 spec->mute_led_nid = pin - 0x0a + 0x18;
3934
- spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook;
3935
- spec->gen.vmaster_mute_enum = 1;
4277
+ snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
39364278 codec->power_filter = led_power_filter;
39374279 codec_dbg(codec,
39384280 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
....@@ -3950,8 +4292,7 @@
39504292 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
39514293 spec->mute_led_polarity = 0;
39524294 spec->mute_led_nid = pin;
3953
- spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook;
3954
- spec->gen.vmaster_mute_enum = 1;
4295
+ snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
39554296 codec->power_filter = led_power_filter;
39564297 }
39574298 }
....@@ -3984,23 +4325,27 @@
39844325 }
39854326
39864327 /* turn on/off mute LED via GPIO per vmaster hook */
3987
-static void alc_fixup_gpio_mute_hook(void *private_data, int enabled)
4328
+static int gpio_mute_led_set(struct led_classdev *led_cdev,
4329
+ enum led_brightness brightness)
39884330 {
3989
- struct hda_codec *codec = private_data;
4331
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
39904332 struct alc_spec *spec = codec->spec;
39914333
39924334 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
3993
- spec->mute_led_polarity, enabled);
4335
+ spec->mute_led_polarity, !brightness);
4336
+ return 0;
39944337 }
39954338
39964339 /* turn on/off mic-mute LED via GPIO per capture hook */
3997
-static void alc_gpio_micmute_update(struct hda_codec *codec)
4340
+static int micmute_led_set(struct led_classdev *led_cdev,
4341
+ enum led_brightness brightness)
39984342 {
4343
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
39994344 struct alc_spec *spec = codec->spec;
40004345
40014346 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4002
- spec->micmute_led_polarity,
4003
- spec->gen.micmute_led.led_value);
4347
+ spec->micmute_led_polarity, !brightness);
4348
+ return 0;
40044349 }
40054350
40064351 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
....@@ -4017,12 +4362,18 @@
40174362 return;
40184363 if (mute_mask) {
40194364 spec->gpio_mute_led_mask = mute_mask;
4020
- spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
4365
+ snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set);
40214366 }
40224367 if (micmute_mask) {
40234368 spec->gpio_mic_led_mask = micmute_mask;
4024
- snd_hda_gen_add_micmute_led(codec, alc_gpio_micmute_update);
4369
+ snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set);
40254370 }
4371
+}
4372
+
4373
+static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
4374
+ const struct hda_fixup *fix, int action)
4375
+{
4376
+ alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
40264377 }
40274378
40284379 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
....@@ -4034,10 +4385,6 @@
40344385 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
40354386 const struct hda_fixup *fix, int action)
40364387 {
4037
- struct alc_spec *spec = codec->spec;
4038
-
4039
- spec->micmute_led_polarity = 1;
4040
-
40414388 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
40424389 }
40434390
....@@ -4047,21 +4394,32 @@
40474394 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20);
40484395 }
40494396
4050
-/* turn on/off mic-mute LED per capture hook */
4051
-static void alc_cap_micmute_update(struct hda_codec *codec)
4397
+static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
4398
+ const struct hda_fixup *fix, int action)
4399
+{
4400
+ alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
4401
+}
4402
+
4403
+static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
4404
+ const struct hda_fixup *fix, int action)
40524405 {
40534406 struct alc_spec *spec = codec->spec;
4054
- unsigned int pinval;
40554407
4056
- if (!spec->cap_mute_led_nid)
4057
- return;
4058
- pinval = snd_hda_codec_get_pin_target(codec, spec->cap_mute_led_nid);
4059
- pinval &= ~AC_PINCTL_VREFEN;
4060
- if (spec->gen.micmute_led.led_value)
4061
- pinval |= AC_PINCTL_VREF_80;
4062
- else
4063
- pinval |= AC_PINCTL_VREF_HIZ;
4064
- snd_hda_set_pin_ctl_cache(codec, spec->cap_mute_led_nid, pinval);
4408
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
4409
+ spec->micmute_led_polarity = 1;
4410
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4411
+}
4412
+
4413
+/* turn on/off mic-mute LED per capture hook via VREF change */
4414
+static int vref_micmute_led_set(struct led_classdev *led_cdev,
4415
+ enum led_brightness brightness)
4416
+{
4417
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4418
+ struct alc_spec *spec = codec->spec;
4419
+
4420
+ alc_update_vref_led(codec, spec->cap_mute_led_nid,
4421
+ spec->micmute_led_polarity, brightness);
4422
+ return 0;
40654423 }
40664424
40674425 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
....@@ -4077,7 +4435,7 @@
40774435 spec->gpio_mask |= 0x10;
40784436 spec->gpio_dir |= 0x10;
40794437 spec->cap_mute_led_nid = 0x18;
4080
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4438
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
40814439 codec->power_filter = led_power_filter;
40824440 }
40834441 }
....@@ -4090,8 +4448,261 @@
40904448 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
40914449 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
40924450 spec->cap_mute_led_nid = 0x18;
4093
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4451
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
40944452 codec->power_filter = led_power_filter;
4453
+ }
4454
+}
4455
+
4456
+/* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4457
+ * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4458
+ */
4459
+static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
4460
+ const struct hda_fixup *fix, int action)
4461
+{
4462
+ struct alc_spec *spec = codec->spec;
4463
+
4464
+ switch (action) {
4465
+ case HDA_FIXUP_ACT_PRE_PROBE:
4466
+ spec->gpio_mask |= 0x01;
4467
+ spec->gpio_dir |= 0x01;
4468
+ break;
4469
+ case HDA_FIXUP_ACT_INIT:
4470
+ /* need to toggle GPIO to enable the amp */
4471
+ alc_update_gpio_data(codec, 0x01, true);
4472
+ msleep(100);
4473
+ alc_update_gpio_data(codec, 0x01, false);
4474
+ break;
4475
+ }
4476
+}
4477
+
4478
+/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4479
+static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
4480
+ struct hda_codec *codec,
4481
+ struct snd_pcm_substream *substream,
4482
+ int action)
4483
+{
4484
+ switch (action) {
4485
+ case HDA_GEN_PCM_ACT_PREPARE:
4486
+ alc_update_gpio_data(codec, 0x04, true);
4487
+ break;
4488
+ case HDA_GEN_PCM_ACT_CLEANUP:
4489
+ alc_update_gpio_data(codec, 0x04, false);
4490
+ break;
4491
+ }
4492
+}
4493
+
4494
+static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
4495
+ const struct hda_fixup *fix,
4496
+ int action)
4497
+{
4498
+ struct alc_spec *spec = codec->spec;
4499
+
4500
+ if (action == HDA_FIXUP_ACT_PROBE) {
4501
+ spec->gpio_mask |= 0x04;
4502
+ spec->gpio_dir |= 0x04;
4503
+ spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4504
+ }
4505
+}
4506
+
4507
+static void alc_update_coef_led(struct hda_codec *codec,
4508
+ struct alc_coef_led *led,
4509
+ bool polarity, bool on)
4510
+{
4511
+ if (polarity)
4512
+ on = !on;
4513
+ /* temporarily power up/down for setting COEF bit */
4514
+ alc_update_coef_idx(codec, led->idx, led->mask,
4515
+ on ? led->on : led->off);
4516
+}
4517
+
4518
+/* update mute-LED according to the speaker mute state via COEF bit */
4519
+static int coef_mute_led_set(struct led_classdev *led_cdev,
4520
+ enum led_brightness brightness)
4521
+{
4522
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4523
+ struct alc_spec *spec = codec->spec;
4524
+
4525
+ alc_update_coef_led(codec, &spec->mute_led_coef,
4526
+ spec->mute_led_polarity, brightness);
4527
+ return 0;
4528
+}
4529
+
4530
+static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4531
+ const struct hda_fixup *fix,
4532
+ int action)
4533
+{
4534
+ struct alc_spec *spec = codec->spec;
4535
+
4536
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4537
+ spec->mute_led_polarity = 0;
4538
+ spec->mute_led_coef.idx = 0x0b;
4539
+ spec->mute_led_coef.mask = 1 << 3;
4540
+ spec->mute_led_coef.on = 1 << 3;
4541
+ spec->mute_led_coef.off = 0;
4542
+ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4543
+ }
4544
+}
4545
+
4546
+static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4547
+ const struct hda_fixup *fix,
4548
+ int action)
4549
+{
4550
+ struct alc_spec *spec = codec->spec;
4551
+
4552
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4553
+ spec->mute_led_polarity = 0;
4554
+ spec->mute_led_coef.idx = 0x34;
4555
+ spec->mute_led_coef.mask = 1 << 5;
4556
+ spec->mute_led_coef.on = 0;
4557
+ spec->mute_led_coef.off = 1 << 5;
4558
+ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4559
+ }
4560
+}
4561
+
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
+
4577
+/* turn on/off mic-mute LED per capture hook by coef bit */
4578
+static int coef_micmute_led_set(struct led_classdev *led_cdev,
4579
+ enum led_brightness brightness)
4580
+{
4581
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4582
+ struct alc_spec *spec = codec->spec;
4583
+
4584
+ alc_update_coef_led(codec, &spec->mic_led_coef,
4585
+ spec->micmute_led_polarity, brightness);
4586
+ return 0;
4587
+}
4588
+
4589
+static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4590
+ const struct hda_fixup *fix, int action)
4591
+{
4592
+ struct alc_spec *spec = codec->spec;
4593
+
4594
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4595
+ spec->mic_led_coef.idx = 0x19;
4596
+ spec->mic_led_coef.mask = 1 << 13;
4597
+ spec->mic_led_coef.on = 1 << 13;
4598
+ spec->mic_led_coef.off = 0;
4599
+ snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4600
+ }
4601
+}
4602
+
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
+
4613
+static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4614
+ const struct hda_fixup *fix, int action)
4615
+{
4616
+ struct alc_spec *spec = codec->spec;
4617
+
4618
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4619
+ spec->mic_led_coef.idx = 0x35;
4620
+ spec->mic_led_coef.mask = 3 << 2;
4621
+ spec->mic_led_coef.on = 2 << 2;
4622
+ spec->mic_led_coef.off = 1 << 2;
4623
+ snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4624
+ }
4625
+}
4626
+
4627
+static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
4628
+ const struct hda_fixup *fix, int action)
4629
+{
4630
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4631
+ 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);
4639
+}
4640
+
4641
+static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
4642
+ const struct hda_fixup *fix, int action)
4643
+{
4644
+ alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4645
+ alc236_fixup_hp_coef_micmute_led(codec, fix, action);
4646
+}
4647
+
4648
+static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
4649
+ const struct hda_fixup *fix, int action)
4650
+{
4651
+ struct alc_spec *spec = codec->spec;
4652
+
4653
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4654
+ spec->cap_mute_led_nid = 0x1a;
4655
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4656
+ codec->power_filter = led_power_filter;
4657
+ }
4658
+}
4659
+
4660
+static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
4661
+ const struct hda_fixup *fix, int action)
4662
+{
4663
+ alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4664
+ alc236_fixup_hp_micmute_led_vref(codec, fix, action);
4665
+}
4666
+
4667
+static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
4668
+ const unsigned short coefs[2])
4669
+{
4670
+ alc_write_coef_idx(codec, 0x23, coefs[0]);
4671
+ alc_write_coef_idx(codec, 0x25, coefs[1]);
4672
+ alc_write_coef_idx(codec, 0x26, 0xb011);
4673
+}
4674
+
4675
+struct alc298_samsung_amp_desc {
4676
+ unsigned char nid;
4677
+ unsigned short init_seq[2][2];
4678
+};
4679
+
4680
+static void alc298_fixup_samsung_amp(struct hda_codec *codec,
4681
+ const struct hda_fixup *fix, int action)
4682
+{
4683
+ int i, j;
4684
+ static const unsigned short init_seq[][2] = {
4685
+ { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
4686
+ { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
4687
+ { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
4688
+ { 0x41, 0x07 }, { 0x400, 0x1 }
4689
+ };
4690
+ static const struct alc298_samsung_amp_desc amps[] = {
4691
+ { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
4692
+ { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
4693
+ };
4694
+
4695
+ if (action != HDA_FIXUP_ACT_INIT)
4696
+ return;
4697
+
4698
+ for (i = 0; i < ARRAY_SIZE(amps); i++) {
4699
+ alc_write_coef_idx(codec, 0x22, amps[i].nid);
4700
+
4701
+ for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++)
4702
+ alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]);
4703
+
4704
+ for (j = 0; j < ARRAY_SIZE(init_seq); j++)
4705
+ alc298_samsung_write_coef_pack(codec, init_seq[j]);
40954706 }
40964707 }
40974708
....@@ -4184,7 +4795,6 @@
41844795 {
41854796 struct alc_spec *spec = codec->spec;
41864797
4187
- spec->micmute_led_polarity = 1;
41884798 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
41894799 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
41904800 spec->init_amp = ALC_INIT_DEFAULT;
....@@ -4218,11 +4828,11 @@
42184828 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a);
42194829 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
42204830 spec->cap_mute_led_nid = 0x18;
4221
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4831
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
42224832 }
42234833 }
42244834
4225
-static struct coef_fw alc225_pre_hsmode[] = {
4835
+static const struct coef_fw alc225_pre_hsmode[] = {
42264836 UPDATE_COEF(0x4a, 1<<8, 0),
42274837 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
42284838 UPDATE_COEF(0x63, 3<<14, 3<<14),
....@@ -4235,7 +4845,8 @@
42354845
42364846 static void alc_headset_mode_unplugged(struct hda_codec *codec)
42374847 {
4238
- static struct coef_fw coef0255[] = {
4848
+ struct alc_spec *spec = codec->spec;
4849
+ static const struct coef_fw coef0255[] = {
42394850 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
42404851 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
42414852 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
....@@ -4243,7 +4854,7 @@
42434854 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
42444855 {}
42454856 };
4246
- static struct coef_fw coef0256[] = {
4857
+ static const struct coef_fw coef0256[] = {
42474858 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
42484859 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
42494860 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
....@@ -4251,7 +4862,7 @@
42514862 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
42524863 {}
42534864 };
4254
- static struct coef_fw coef0233[] = {
4865
+ static const struct coef_fw coef0233[] = {
42554866 WRITE_COEF(0x1b, 0x0c0b),
42564867 WRITE_COEF(0x45, 0xc429),
42574868 UPDATE_COEF(0x35, 0x4000, 0),
....@@ -4261,7 +4872,7 @@
42614872 WRITE_COEF(0x32, 0x42a3),
42624873 {}
42634874 };
4264
- static struct coef_fw coef0288[] = {
4875
+ static const struct coef_fw coef0288[] = {
42654876 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
42664877 UPDATE_COEF(0x50, 0x2000, 0x2000),
42674878 UPDATE_COEF(0x56, 0x0006, 0x0006),
....@@ -4269,18 +4880,18 @@
42694880 UPDATE_COEF(0x67, 0x2000, 0),
42704881 {}
42714882 };
4272
- static struct coef_fw coef0298[] = {
4883
+ static const struct coef_fw coef0298[] = {
42734884 UPDATE_COEF(0x19, 0x1300, 0x0300),
42744885 {}
42754886 };
4276
- static struct coef_fw coef0292[] = {
4887
+ static const struct coef_fw coef0292[] = {
42774888 WRITE_COEF(0x76, 0x000e),
42784889 WRITE_COEF(0x6c, 0x2400),
42794890 WRITE_COEF(0x18, 0x7308),
42804891 WRITE_COEF(0x6b, 0xc429),
42814892 {}
42824893 };
4283
- static struct coef_fw coef0293[] = {
4894
+ static const struct coef_fw coef0293[] = {
42844895 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
42854896 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
42864897 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
....@@ -4289,16 +4900,16 @@
42894900 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
42904901 {}
42914902 };
4292
- static struct coef_fw coef0668[] = {
4903
+ static const struct coef_fw coef0668[] = {
42934904 WRITE_COEF(0x15, 0x0d40),
42944905 WRITE_COEF(0xb7, 0x802b),
42954906 {}
42964907 };
4297
- static struct coef_fw coef0225[] = {
4908
+ static const struct coef_fw coef0225[] = {
42984909 UPDATE_COEF(0x63, 3<<14, 0),
42994910 {}
43004911 };
4301
- static struct coef_fw coef0274[] = {
4912
+ static const struct coef_fw coef0274[] = {
43024913 UPDATE_COEF(0x4a, 0x0100, 0),
43034914 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
43044915 UPDATE_COEF(0x6b, 0xf000, 0x5000),
....@@ -4309,12 +4920,19 @@
43094920 {}
43104921 };
43114922
4923
+ if (spec->no_internal_mic_pin) {
4924
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
4925
+ return;
4926
+ }
4927
+
43124928 switch (codec->core.vendor_id) {
43134929 case 0x10ec0255:
43144930 alc_process_coef_fw(codec, coef0255);
43154931 break;
4932
+ case 0x10ec0230:
43164933 case 0x10ec0236:
43174934 case 0x10ec0256:
4935
+ case 0x19e58326:
43184936 alc_process_coef_fw(codec, coef0256);
43194937 break;
43204938 case 0x10ec0234:
....@@ -4363,25 +4981,25 @@
43634981 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
43644982 hda_nid_t mic_pin)
43654983 {
4366
- static struct coef_fw coef0255[] = {
4984
+ static const struct coef_fw coef0255[] = {
43674985 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
43684986 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
43694987 {}
43704988 };
4371
- static struct coef_fw coef0256[] = {
4989
+ static const struct coef_fw coef0256[] = {
43724990 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
43734991 WRITE_COEFEX(0x57, 0x03, 0x09a3),
43744992 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
43754993 {}
43764994 };
4377
- static struct coef_fw coef0233[] = {
4995
+ static const struct coef_fw coef0233[] = {
43784996 UPDATE_COEF(0x35, 0, 1<<14),
43794997 WRITE_COEF(0x06, 0x2100),
43804998 WRITE_COEF(0x1a, 0x0021),
43814999 WRITE_COEF(0x26, 0x008c),
43825000 {}
43835001 };
4384
- static struct coef_fw coef0288[] = {
5002
+ static const struct coef_fw coef0288[] = {
43855003 UPDATE_COEF(0x4f, 0x00c0, 0),
43865004 UPDATE_COEF(0x50, 0x2000, 0),
43875005 UPDATE_COEF(0x56, 0x0006, 0),
....@@ -4390,30 +5008,30 @@
43905008 UPDATE_COEF(0x67, 0x2000, 0x2000),
43915009 {}
43925010 };
4393
- static struct coef_fw coef0292[] = {
5011
+ static const struct coef_fw coef0292[] = {
43945012 WRITE_COEF(0x19, 0xa208),
43955013 WRITE_COEF(0x2e, 0xacf0),
43965014 {}
43975015 };
4398
- static struct coef_fw coef0293[] = {
5016
+ static const struct coef_fw coef0293[] = {
43995017 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
44005018 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
44015019 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
44025020 {}
44035021 };
4404
- static struct coef_fw coef0688[] = {
5022
+ static const struct coef_fw coef0688[] = {
44055023 WRITE_COEF(0xb7, 0x802b),
44065024 WRITE_COEF(0xb5, 0x1040),
44075025 UPDATE_COEF(0xc3, 0, 1<<12),
44085026 {}
44095027 };
4410
- static struct coef_fw coef0225[] = {
5028
+ static const struct coef_fw coef0225[] = {
44115029 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
44125030 UPDATE_COEF(0x4a, 3<<4, 2<<4),
44135031 UPDATE_COEF(0x63, 3<<14, 0),
44145032 {}
44155033 };
4416
- static struct coef_fw coef0274[] = {
5034
+ static const struct coef_fw coef0274[] = {
44175035 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
44185036 UPDATE_COEF(0x4a, 0x0010, 0),
44195037 UPDATE_COEF(0x6b, 0xf000, 0),
....@@ -4427,8 +5045,10 @@
44275045 alc_process_coef_fw(codec, coef0255);
44285046 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
44295047 break;
5048
+ case 0x10ec0230:
44305049 case 0x10ec0236:
44315050 case 0x10ec0256:
5051
+ case 0x19e58326:
44325052 alc_write_coef_idx(codec, 0x45, 0xc489);
44335053 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
44345054 alc_process_coef_fw(codec, coef0256);
....@@ -4469,7 +5089,7 @@
44695089 break;
44705090 case 0x10ec0867:
44715091 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14);
4472
- /* fallthru */
5092
+ fallthrough;
44735093 case 0x10ec0221:
44745094 case 0x10ec0662:
44755095 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
....@@ -4499,7 +5119,7 @@
44995119
45005120 static void alc_headset_mode_default(struct hda_codec *codec)
45015121 {
4502
- static struct coef_fw coef0225[] = {
5122
+ static const struct coef_fw coef0225[] = {
45035123 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
45045124 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
45055125 UPDATE_COEF(0x49, 3<<8, 0<<8),
....@@ -4508,14 +5128,14 @@
45085128 UPDATE_COEF(0x67, 0xf000, 0x3000),
45095129 {}
45105130 };
4511
- static struct coef_fw coef0255[] = {
5131
+ static const struct coef_fw coef0255[] = {
45125132 WRITE_COEF(0x45, 0xc089),
45135133 WRITE_COEF(0x45, 0xc489),
45145134 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
45155135 WRITE_COEF(0x49, 0x0049),
45165136 {}
45175137 };
4518
- static struct coef_fw coef0256[] = {
5138
+ static const struct coef_fw coef0256[] = {
45195139 WRITE_COEF(0x45, 0xc489),
45205140 WRITE_COEFEX(0x57, 0x03, 0x0da3),
45215141 WRITE_COEF(0x49, 0x0049),
....@@ -4523,12 +5143,12 @@
45235143 WRITE_COEF(0x06, 0x6100),
45245144 {}
45255145 };
4526
- static struct coef_fw coef0233[] = {
5146
+ static const struct coef_fw coef0233[] = {
45275147 WRITE_COEF(0x06, 0x2100),
45285148 WRITE_COEF(0x32, 0x4ea3),
45295149 {}
45305150 };
4531
- static struct coef_fw coef0288[] = {
5151
+ static const struct coef_fw coef0288[] = {
45325152 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
45335153 UPDATE_COEF(0x50, 0x2000, 0x2000),
45345154 UPDATE_COEF(0x56, 0x0006, 0x0006),
....@@ -4536,26 +5156,26 @@
45365156 UPDATE_COEF(0x67, 0x2000, 0),
45375157 {}
45385158 };
4539
- static struct coef_fw coef0292[] = {
5159
+ static const struct coef_fw coef0292[] = {
45405160 WRITE_COEF(0x76, 0x000e),
45415161 WRITE_COEF(0x6c, 0x2400),
45425162 WRITE_COEF(0x6b, 0xc429),
45435163 WRITE_COEF(0x18, 0x7308),
45445164 {}
45455165 };
4546
- static struct coef_fw coef0293[] = {
5166
+ static const struct coef_fw coef0293[] = {
45475167 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
45485168 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
45495169 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
45505170 {}
45515171 };
4552
- static struct coef_fw coef0688[] = {
5172
+ static const struct coef_fw coef0688[] = {
45535173 WRITE_COEF(0x11, 0x0041),
45545174 WRITE_COEF(0x15, 0x0d40),
45555175 WRITE_COEF(0xb7, 0x802b),
45565176 {}
45575177 };
4558
- static struct coef_fw coef0274[] = {
5178
+ static const struct coef_fw coef0274[] = {
45595179 WRITE_COEF(0x45, 0x4289),
45605180 UPDATE_COEF(0x4a, 0x0010, 0x0010),
45615181 UPDATE_COEF(0x6b, 0x0f00, 0),
....@@ -4576,8 +5196,10 @@
45765196 case 0x10ec0255:
45775197 alc_process_coef_fw(codec, coef0255);
45785198 break;
5199
+ case 0x10ec0230:
45795200 case 0x10ec0236:
45805201 case 0x10ec0256:
5202
+ case 0x19e58326:
45815203 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
45825204 alc_write_coef_idx(codec, 0x45, 0xc089);
45835205 msleep(50);
....@@ -4618,53 +5240,53 @@
46185240 {
46195241 int val;
46205242
4621
- static struct coef_fw coef0255[] = {
5243
+ static const struct coef_fw coef0255[] = {
46225244 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
46235245 WRITE_COEF(0x1b, 0x0c2b),
46245246 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
46255247 {}
46265248 };
4627
- static struct coef_fw coef0256[] = {
5249
+ static const struct coef_fw coef0256[] = {
46285250 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
46295251 WRITE_COEF(0x1b, 0x0e6b),
46305252 {}
46315253 };
4632
- static struct coef_fw coef0233[] = {
5254
+ static const struct coef_fw coef0233[] = {
46335255 WRITE_COEF(0x45, 0xd429),
46345256 WRITE_COEF(0x1b, 0x0c2b),
46355257 WRITE_COEF(0x32, 0x4ea3),
46365258 {}
46375259 };
4638
- static struct coef_fw coef0288[] = {
5260
+ static const struct coef_fw coef0288[] = {
46395261 UPDATE_COEF(0x50, 0x2000, 0x2000),
46405262 UPDATE_COEF(0x56, 0x0006, 0x0006),
46415263 UPDATE_COEF(0x66, 0x0008, 0),
46425264 UPDATE_COEF(0x67, 0x2000, 0),
46435265 {}
46445266 };
4645
- static struct coef_fw coef0292[] = {
5267
+ static const struct coef_fw coef0292[] = {
46465268 WRITE_COEF(0x6b, 0xd429),
46475269 WRITE_COEF(0x76, 0x0008),
46485270 WRITE_COEF(0x18, 0x7388),
46495271 {}
46505272 };
4651
- static struct coef_fw coef0293[] = {
5273
+ static const struct coef_fw coef0293[] = {
46525274 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
46535275 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
46545276 {}
46555277 };
4656
- static struct coef_fw coef0688[] = {
5278
+ static const struct coef_fw coef0688[] = {
46575279 WRITE_COEF(0x11, 0x0001),
46585280 WRITE_COEF(0x15, 0x0d60),
46595281 WRITE_COEF(0xc3, 0x0000),
46605282 {}
46615283 };
4662
- static struct coef_fw coef0225_1[] = {
5284
+ static const struct coef_fw coef0225_1[] = {
46635285 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
46645286 UPDATE_COEF(0x63, 3<<14, 2<<14),
46655287 {}
46665288 };
4667
- static struct coef_fw coef0225_2[] = {
5289
+ static const struct coef_fw coef0225_2[] = {
46685290 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
46695291 UPDATE_COEF(0x63, 3<<14, 1<<14),
46705292 {}
....@@ -4674,8 +5296,10 @@
46745296 case 0x10ec0255:
46755297 alc_process_coef_fw(codec, coef0255);
46765298 break;
5299
+ case 0x10ec0230:
46775300 case 0x10ec0236:
46785301 case 0x10ec0256:
5302
+ case 0x19e58326:
46795303 alc_process_coef_fw(codec, coef0256);
46805304 break;
46815305 case 0x10ec0234:
....@@ -4736,48 +5360,48 @@
47365360 /* Nokia type */
47375361 static void alc_headset_mode_omtp(struct hda_codec *codec)
47385362 {
4739
- static struct coef_fw coef0255[] = {
5363
+ static const struct coef_fw coef0255[] = {
47405364 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
47415365 WRITE_COEF(0x1b, 0x0c2b),
47425366 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
47435367 {}
47445368 };
4745
- static struct coef_fw coef0256[] = {
5369
+ static const struct coef_fw coef0256[] = {
47465370 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
47475371 WRITE_COEF(0x1b, 0x0e6b),
47485372 {}
47495373 };
4750
- static struct coef_fw coef0233[] = {
5374
+ static const struct coef_fw coef0233[] = {
47515375 WRITE_COEF(0x45, 0xe429),
47525376 WRITE_COEF(0x1b, 0x0c2b),
47535377 WRITE_COEF(0x32, 0x4ea3),
47545378 {}
47555379 };
4756
- static struct coef_fw coef0288[] = {
5380
+ static const struct coef_fw coef0288[] = {
47575381 UPDATE_COEF(0x50, 0x2000, 0x2000),
47585382 UPDATE_COEF(0x56, 0x0006, 0x0006),
47595383 UPDATE_COEF(0x66, 0x0008, 0),
47605384 UPDATE_COEF(0x67, 0x2000, 0),
47615385 {}
47625386 };
4763
- static struct coef_fw coef0292[] = {
5387
+ static const struct coef_fw coef0292[] = {
47645388 WRITE_COEF(0x6b, 0xe429),
47655389 WRITE_COEF(0x76, 0x0008),
47665390 WRITE_COEF(0x18, 0x7388),
47675391 {}
47685392 };
4769
- static struct coef_fw coef0293[] = {
5393
+ static const struct coef_fw coef0293[] = {
47705394 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
47715395 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
47725396 {}
47735397 };
4774
- static struct coef_fw coef0688[] = {
5398
+ static const struct coef_fw coef0688[] = {
47755399 WRITE_COEF(0x11, 0x0001),
47765400 WRITE_COEF(0x15, 0x0d50),
47775401 WRITE_COEF(0xc3, 0x0000),
47785402 {}
47795403 };
4780
- static struct coef_fw coef0225[] = {
5404
+ static const struct coef_fw coef0225[] = {
47815405 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
47825406 UPDATE_COEF(0x63, 3<<14, 2<<14),
47835407 {}
....@@ -4787,8 +5411,10 @@
47875411 case 0x10ec0255:
47885412 alc_process_coef_fw(codec, coef0255);
47895413 break;
5414
+ case 0x10ec0230:
47905415 case 0x10ec0236:
47915416 case 0x10ec0256:
5417
+ case 0x19e58326:
47925418 alc_process_coef_fw(codec, coef0256);
47935419 break;
47945420 case 0x10ec0234:
....@@ -4837,17 +5463,17 @@
48375463 int val;
48385464 bool is_ctia = false;
48395465 struct alc_spec *spec = codec->spec;
4840
- static struct coef_fw coef0255[] = {
5466
+ static const struct coef_fw coef0255[] = {
48415467 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
48425468 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
48435469 conteol) */
48445470 {}
48455471 };
4846
- static struct coef_fw coef0288[] = {
5472
+ static const struct coef_fw coef0288[] = {
48475473 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
48485474 {}
48495475 };
4850
- static struct coef_fw coef0298[] = {
5476
+ static const struct coef_fw coef0298[] = {
48515477 UPDATE_COEF(0x50, 0x2000, 0x2000),
48525478 UPDATE_COEF(0x56, 0x0006, 0x0006),
48535479 UPDATE_COEF(0x66, 0x0008, 0),
....@@ -4855,25 +5481,30 @@
48555481 UPDATE_COEF(0x19, 0x1300, 0x1300),
48565482 {}
48575483 };
4858
- static struct coef_fw coef0293[] = {
5484
+ static const struct coef_fw coef0293[] = {
48595485 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
48605486 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
48615487 {}
48625488 };
4863
- static struct coef_fw coef0688[] = {
5489
+ static const struct coef_fw coef0688[] = {
48645490 WRITE_COEF(0x11, 0x0001),
48655491 WRITE_COEF(0xb7, 0x802b),
48665492 WRITE_COEF(0x15, 0x0d60),
48675493 WRITE_COEF(0xc3, 0x0c00),
48685494 {}
48695495 };
4870
- static struct coef_fw coef0274[] = {
5496
+ static const struct coef_fw coef0274[] = {
48715497 UPDATE_COEF(0x4a, 0x0010, 0),
48725498 UPDATE_COEF(0x4a, 0x8000, 0),
48735499 WRITE_COEF(0x45, 0xd289),
48745500 UPDATE_COEF(0x49, 0x0300, 0x0300),
48755501 {}
48765502 };
5503
+
5504
+ if (spec->no_internal_mic_pin) {
5505
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
5506
+ return;
5507
+ }
48775508
48785509 switch (codec->core.vendor_id) {
48795510 case 0x10ec0255:
....@@ -4882,8 +5513,10 @@
48825513 val = alc_read_coef_idx(codec, 0x46);
48835514 is_ctia = (val & 0x0070) == 0x0070;
48845515 break;
5516
+ case 0x10ec0230:
48855517 case 0x10ec0236:
48865518 case 0x10ec0256:
5519
+ case 0x19e58326:
48875520 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
48885521 alc_write_coef_idx(codec, 0x06, 0x6104);
48895522 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
....@@ -5051,6 +5684,8 @@
50515684 switch (new_headset_mode) {
50525685 case ALC_HEADSET_MODE_UNPLUGGED:
50535686 alc_headset_mode_unplugged(codec);
5687
+ spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5688
+ spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
50545689 spec->gen.hp_jack_present = false;
50555690 break;
50565691 case ALC_HEADSET_MODE_HEADSET:
....@@ -5093,8 +5728,6 @@
50935728 static void alc_update_headset_jack_cb(struct hda_codec *codec,
50945729 struct hda_jack_callback *jack)
50955730 {
5096
- struct alc_spec *spec = codec->spec;
5097
- spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
50985731 snd_hda_gen_hp_automute(codec, jack);
50995732 alc_update_headset_mode(codec);
51005733 }
....@@ -5132,7 +5765,10 @@
51325765 alc_probe_headset_mode(codec);
51335766 break;
51345767 case HDA_FIXUP_ACT_INIT:
5135
- spec->current_headset_mode = 0;
5768
+ if (is_s3_resume(codec) || is_s4_resume(codec)) {
5769
+ spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5770
+ spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5771
+ }
51365772 alc_update_headset_mode(codec);
51375773 break;
51385774 }
....@@ -5152,7 +5788,7 @@
51525788 static void alc255_set_default_jack_type(struct hda_codec *codec)
51535789 {
51545790 /* Set to iphone type */
5155
- static struct coef_fw alc255fw[] = {
5791
+ static const struct coef_fw alc255fw[] = {
51565792 WRITE_COEF(0x1b, 0x880b),
51575793 WRITE_COEF(0x45, 0xd089),
51585794 WRITE_COEF(0x1b, 0x080b),
....@@ -5160,7 +5796,7 @@
51605796 WRITE_COEF(0x1b, 0x0c0b),
51615797 {}
51625798 };
5163
- static struct coef_fw alc256fw[] = {
5799
+ static const struct coef_fw alc256fw[] = {
51645800 WRITE_COEF(0x1b, 0x884b),
51655801 WRITE_COEF(0x45, 0xd089),
51665802 WRITE_COEF(0x1b, 0x084b),
....@@ -5172,8 +5808,10 @@
51725808 case 0x10ec0255:
51735809 alc_process_coef_fw(codec, alc255fw);
51745810 break;
5811
+ case 0x10ec0230:
51755812 case 0x10ec0236:
51765813 case 0x10ec0256:
5814
+ case 0x19e58326:
51775815 alc_process_coef_fw(codec, alc256fw);
51785816 break;
51795817 }
....@@ -5301,9 +5939,21 @@
53015939 * the speaker output becomes too low by some reason on Thinkpads with
53025940 * ALC298 codec
53035941 */
5304
- static hda_nid_t preferred_pairs[] = {
5942
+ static const hda_nid_t preferred_pairs[] = {
53055943 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
53065944 0
5945
+ };
5946
+ struct alc_spec *spec = codec->spec;
5947
+
5948
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
5949
+ spec->gen.preferred_dacs = preferred_pairs;
5950
+}
5951
+
5952
+static void alc295_fixup_asus_dacs(struct hda_codec *codec,
5953
+ const struct hda_fixup *fix, int action)
5954
+{
5955
+ static const hda_nid_t preferred_pairs[] = {
5956
+ 0x17, 0x02, 0x21, 0x03, 0
53075957 };
53085958 struct alc_spec *spec = codec->spec;
53095959
....@@ -5552,9 +6202,9 @@
55526202 /* DAC node 0x03 is giving mono output. We therefore want to
55536203 make sure 0x14 (front speaker) and 0x15 (headphones) use the
55546204 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
5555
- hda_nid_t conn1[2] = { 0x0c };
5556
- snd_hda_override_conn_list(codec, 0x14, 1, conn1);
5557
- snd_hda_override_conn_list(codec, 0x15, 1, conn1);
6205
+ static const hda_nid_t conn1[] = { 0x0c };
6206
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
6207
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
55586208 }
55596209 }
55606210
....@@ -5569,8 +6219,8 @@
55696219 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
55706220 speaker's volume now. */
55716221
5572
- hda_nid_t conn1[1] = { 0x0c };
5573
- snd_hda_override_conn_list(codec, 0x17, 1, conn1);
6222
+ static const hda_nid_t conn1[] = { 0x0c };
6223
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
55746224 }
55756225 }
55766226
....@@ -5579,8 +6229,8 @@
55796229 const struct hda_fixup *fix, int action)
55806230 {
55816231 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5582
- hda_nid_t conn[2] = { 0x02, 0x03 };
5583
- snd_hda_override_conn_list(codec, 0x17, 2, conn);
6232
+ static const hda_nid_t conn[] = { 0x02, 0x03 };
6233
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
55846234 }
55856235 }
55866236
....@@ -5589,8 +6239,8 @@
55896239 const struct hda_fixup *fix, int action)
55906240 {
55916241 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5592
- hda_nid_t conn[1] = { 0x02 };
5593
- snd_hda_override_conn_list(codec, 0x17, 1, conn);
6242
+ static const hda_nid_t conn[] = { 0x02 };
6243
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
55946244 }
55956245 }
55966246
....@@ -5640,6 +6290,39 @@
56406290 }
56416291 }
56426292
6293
+/* Quirk for Thinkpad X1 7th and 8th Gen
6294
+ * The following fixed routing needed
6295
+ * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6296
+ * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6297
+ * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6298
+ */
6299
+static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
6300
+ const struct hda_fixup *fix, int action)
6301
+{
6302
+ static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
6303
+ static const hda_nid_t preferred_pairs[] = {
6304
+ 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6305
+ };
6306
+ struct alc_spec *spec = codec->spec;
6307
+
6308
+ switch (action) {
6309
+ case HDA_FIXUP_ACT_PRE_PROBE:
6310
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6311
+ spec->gen.preferred_dacs = preferred_pairs;
6312
+ break;
6313
+ case HDA_FIXUP_ACT_BUILD:
6314
+ /* The generic parser creates somewhat unintuitive volume ctls
6315
+ * with the fixed routing above, and the shared DAC2 may be
6316
+ * confusing for PA.
6317
+ * Rename those to unique names so that PA doesn't touch them
6318
+ * and use only Master volume.
6319
+ */
6320
+ rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume");
6321
+ rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6322
+ break;
6323
+ }
6324
+}
6325
+
56436326 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
56446327 const struct hda_fixup *fix,
56456328 int action)
....@@ -5678,7 +6361,7 @@
56786361 const struct hda_fixup *fix, int action)
56796362 {
56806363 struct alc_spec *spec = codec->spec;
5681
- static hda_nid_t preferred_pairs[] = {
6364
+ static const hda_nid_t preferred_pairs[] = {
56826365 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
56836366 0
56846367 };
....@@ -5691,6 +6374,21 @@
56916374 codec->power_save_node = 0;
56926375 }
56936376
6377
+/* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6378
+static void alc289_fixup_asus_ga401(struct hda_codec *codec,
6379
+ const struct hda_fixup *fix, int action)
6380
+{
6381
+ static const hda_nid_t preferred_pairs[] = {
6382
+ 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6383
+ };
6384
+ struct alc_spec *spec = codec->spec;
6385
+
6386
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6387
+ spec->gen.preferred_dacs = preferred_pairs;
6388
+ spec->gen.obey_preferred_dacs = 1;
6389
+ }
6390
+}
6391
+
56946392 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
56956393 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
56966394 const struct hda_fixup *fix, int action)
....@@ -5701,11 +6399,205 @@
57016399 snd_hda_override_wcaps(codec, 0x03, 0);
57026400 }
57036401
6402
+static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
6403
+{
6404
+ switch (codec->core.vendor_id) {
6405
+ case 0x10ec0274:
6406
+ case 0x10ec0294:
6407
+ case 0x10ec0225:
6408
+ case 0x10ec0295:
6409
+ case 0x10ec0299:
6410
+ alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6411
+ alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
6412
+ break;
6413
+ case 0x10ec0230:
6414
+ case 0x10ec0235:
6415
+ case 0x10ec0236:
6416
+ case 0x10ec0255:
6417
+ case 0x10ec0256:
6418
+ case 0x19e58326:
6419
+ alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6420
+ alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
6421
+ break;
6422
+ }
6423
+}
6424
+
6425
+static void alc295_fixup_chromebook(struct hda_codec *codec,
6426
+ const struct hda_fixup *fix, int action)
6427
+{
6428
+ struct alc_spec *spec = codec->spec;
6429
+
6430
+ switch (action) {
6431
+ case HDA_FIXUP_ACT_PRE_PROBE:
6432
+ spec->ultra_low_power = true;
6433
+ break;
6434
+ case HDA_FIXUP_ACT_INIT:
6435
+ alc_combo_jack_hp_jd_restart(codec);
6436
+ break;
6437
+ }
6438
+}
6439
+
57046440 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
57056441 const struct hda_fixup *fix, int action)
57066442 {
57076443 if (action == HDA_FIXUP_ACT_PRE_PROBE)
57086444 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
6445
+}
6446
+
6447
+
6448
+static void alc294_gx502_toggle_output(struct hda_codec *codec,
6449
+ struct hda_jack_callback *cb)
6450
+{
6451
+ /* The Windows driver sets the codec up in a very different way where
6452
+ * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6453
+ */
6454
+ if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6455
+ alc_write_coef_idx(codec, 0x10, 0x8a20);
6456
+ else
6457
+ alc_write_coef_idx(codec, 0x10, 0x0a20);
6458
+}
6459
+
6460
+static void alc294_fixup_gx502_hp(struct hda_codec *codec,
6461
+ const struct hda_fixup *fix, int action)
6462
+{
6463
+ /* Pin 0x21: headphones/headset mic */
6464
+ if (!is_jack_detectable(codec, 0x21))
6465
+ return;
6466
+
6467
+ switch (action) {
6468
+ case HDA_FIXUP_ACT_PRE_PROBE:
6469
+ snd_hda_jack_detect_enable_callback(codec, 0x21,
6470
+ alc294_gx502_toggle_output);
6471
+ break;
6472
+ case HDA_FIXUP_ACT_INIT:
6473
+ /* Make sure to start in a correct state, i.e. if
6474
+ * headphones have been plugged in before powering up the system
6475
+ */
6476
+ alc294_gx502_toggle_output(codec, NULL);
6477
+ break;
6478
+ }
6479
+}
6480
+
6481
+static void alc294_gu502_toggle_output(struct hda_codec *codec,
6482
+ struct hda_jack_callback *cb)
6483
+{
6484
+ /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6485
+ * responsible from changes between speakers and headphones
6486
+ */
6487
+ if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6488
+ alc_write_coef_idx(codec, 0x10, 0x8420);
6489
+ else
6490
+ alc_write_coef_idx(codec, 0x10, 0x0a20);
6491
+}
6492
+
6493
+static void alc294_fixup_gu502_hp(struct hda_codec *codec,
6494
+ const struct hda_fixup *fix, int action)
6495
+{
6496
+ if (!is_jack_detectable(codec, 0x21))
6497
+ return;
6498
+
6499
+ switch (action) {
6500
+ case HDA_FIXUP_ACT_PRE_PROBE:
6501
+ snd_hda_jack_detect_enable_callback(codec, 0x21,
6502
+ alc294_gu502_toggle_output);
6503
+ break;
6504
+ case HDA_FIXUP_ACT_INIT:
6505
+ alc294_gu502_toggle_output(codec, NULL);
6506
+ break;
6507
+ }
6508
+}
6509
+
6510
+static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
6511
+ const struct hda_fixup *fix, int action)
6512
+{
6513
+ if (action != HDA_FIXUP_ACT_INIT)
6514
+ return;
6515
+
6516
+ msleep(100);
6517
+ alc_write_coef_idx(codec, 0x65, 0x0);
6518
+}
6519
+
6520
+static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
6521
+ const struct hda_fixup *fix, int action)
6522
+{
6523
+ switch (action) {
6524
+ case HDA_FIXUP_ACT_INIT:
6525
+ alc_combo_jack_hp_jd_restart(codec);
6526
+ break;
6527
+ }
6528
+}
6529
+
6530
+static void alc_fixup_no_int_mic(struct hda_codec *codec,
6531
+ const struct hda_fixup *fix, int action)
6532
+{
6533
+ struct alc_spec *spec = codec->spec;
6534
+
6535
+ switch (action) {
6536
+ case HDA_FIXUP_ACT_PRE_PROBE:
6537
+ /* Mic RING SLEEVE swap for combo jack */
6538
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
6539
+ spec->no_internal_mic_pin = true;
6540
+ break;
6541
+ case HDA_FIXUP_ACT_INIT:
6542
+ alc_combo_jack_hp_jd_restart(codec);
6543
+ break;
6544
+ }
6545
+}
6546
+
6547
+/* GPIO1 = amplifier on/off
6548
+ * GPIO3 = mic mute LED
6549
+ */
6550
+static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
6551
+ const struct hda_fixup *fix, int action)
6552
+{
6553
+ static const hda_nid_t conn[] = { 0x02 };
6554
+
6555
+ struct alc_spec *spec = codec->spec;
6556
+ static const struct hda_pintbl pincfgs[] = {
6557
+ { 0x14, 0x90170110 }, /* front/high speakers */
6558
+ { 0x17, 0x90170130 }, /* back/bass speakers */
6559
+ { }
6560
+ };
6561
+
6562
+ //enable micmute led
6563
+ alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
6564
+
6565
+ switch (action) {
6566
+ case HDA_FIXUP_ACT_PRE_PROBE:
6567
+ spec->micmute_led_polarity = 1;
6568
+ /* needed for amp of back speakers */
6569
+ spec->gpio_mask |= 0x01;
6570
+ spec->gpio_dir |= 0x01;
6571
+ snd_hda_apply_pincfgs(codec, pincfgs);
6572
+ /* share DAC to have unified volume control */
6573
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6574
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6575
+ break;
6576
+ case HDA_FIXUP_ACT_INIT:
6577
+ /* need to toggle GPIO to enable the amp of back speakers */
6578
+ alc_update_gpio_data(codec, 0x01, true);
6579
+ msleep(100);
6580
+ alc_update_gpio_data(codec, 0x01, false);
6581
+ break;
6582
+ }
6583
+}
6584
+
6585
+static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
6586
+ const struct hda_fixup *fix, int action)
6587
+{
6588
+ static const hda_nid_t conn[] = { 0x02 };
6589
+ static const struct hda_pintbl pincfgs[] = {
6590
+ { 0x14, 0x90170110 }, /* rear speaker */
6591
+ { }
6592
+ };
6593
+
6594
+ switch (action) {
6595
+ case HDA_FIXUP_ACT_PRE_PROBE:
6596
+ snd_hda_apply_pincfgs(codec, pincfgs);
6597
+ /* force front speaker to DAC1 */
6598
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6599
+ break;
6600
+ }
57096601 }
57106602
57116603 /* for hda_fixup_thinkpad_acpi() */
....@@ -5718,11 +6610,113 @@
57186610 hda_fixup_thinkpad_acpi(codec, fix, action);
57196611 }
57206612
5721
-/* for dell wmi mic mute led */
5722
-#include "dell_wmi_helper.c"
6613
+/* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6614
+static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
6615
+ const struct hda_fixup *fix,
6616
+ int action)
6617
+{
6618
+ struct alc_spec *spec = codec->spec;
6619
+
6620
+ switch (action) {
6621
+ case HDA_FIXUP_ACT_PRE_PROBE:
6622
+ spec->gen.suppress_auto_mute = 1;
6623
+ break;
6624
+ }
6625
+}
57236626
57246627 /* for alc295_fixup_hp_top_speakers */
57256628 #include "hp_x360_helper.c"
6629
+
6630
+/* for alc285_fixup_ideapad_s740_coef() */
6631
+#include "ideapad_s740_helper.c"
6632
+
6633
+static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = {
6634
+ WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6635
+ WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6636
+ WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6637
+ {}
6638
+};
6639
+
6640
+static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
6641
+ const struct hda_fixup *fix,
6642
+ int action)
6643
+{
6644
+ /*
6645
+ * A certain other OS sets these coeffs to different values. On at least
6646
+ * one TongFang barebone these settings might survive even a cold
6647
+ * reboot. So to restore a clean slate the values are explicitly reset
6648
+ * to default here. Without this, the external microphone is always in a
6649
+ * plugged-in state, while the internal microphone is always in an
6650
+ * unplugged state, breaking the ability to use the internal microphone.
6651
+ */
6652
+ alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs);
6653
+}
6654
+
6655
+static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = {
6656
+ WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6657
+ WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6658
+ WRITE_COEF(0x49, 0x0149),
6659
+ {}
6660
+};
6661
+
6662
+static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
6663
+ const struct hda_fixup *fix,
6664
+ int action)
6665
+{
6666
+ /*
6667
+ * The audio jack input and output is not detected on the ASRock NUC Box
6668
+ * 1100 series when cold booting without this fix. Warm rebooting from a
6669
+ * certain other OS makes the audio functional, as COEF settings are
6670
+ * preserved in this case. This fix sets these altered COEF values as
6671
+ * the default.
6672
+ */
6673
+ alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
6674
+}
6675
+
6676
+static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
6677
+ const struct hda_fixup *fix,
6678
+ int action)
6679
+{
6680
+ /*
6681
+ * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
6682
+ * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
6683
+ * needs an additional quirk for sound working after suspend and resume.
6684
+ */
6685
+ if (codec->core.vendor_id == 0x10ec0256) {
6686
+ alc_update_coef_idx(codec, 0x10, 1<<9, 0);
6687
+ snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120);
6688
+ } else {
6689
+ snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c);
6690
+ }
6691
+}
6692
+
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
+}
57266720
57276721 enum {
57286722 ALC269_FIXUP_GPIO2,
....@@ -5778,6 +6772,7 @@
57786772 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
57796773 ALC269VB_FIXUP_ASUS_ZENBOOK,
57806774 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
6775
+ ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
57816776 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
57826777 ALC269VB_FIXUP_ORDISSIMO_EVE2,
57836778 ALC283_FIXUP_CHROME_BOOK,
....@@ -5800,21 +6795,26 @@
58006795 ALC292_FIXUP_TPT440_DOCK,
58016796 ALC292_FIXUP_TPT440,
58026797 ALC283_FIXUP_HEADSET_MIC,
5803
- ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
6798
+ ALC255_FIXUP_MIC_MUTE_LED,
58046799 ALC282_FIXUP_ASPIRE_V5_PINS,
6800
+ ALC269VB_FIXUP_ASPIRE_E1_COEF,
58056801 ALC280_FIXUP_HP_GPIO4,
58066802 ALC286_FIXUP_HP_GPIO_LED,
58076803 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
58086804 ALC280_FIXUP_HP_DOCK_PINS,
58096805 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
58106806 ALC280_FIXUP_HP_9480M,
6807
+ ALC245_FIXUP_HP_X360_AMP,
6808
+ ALC285_FIXUP_HP_SPECTRE_X360_EB1,
58116809 ALC288_FIXUP_DELL_HEADSET_MODE,
58126810 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
58136811 ALC288_FIXUP_DELL_XPS_13,
58146812 ALC288_FIXUP_DISABLE_AAMIX,
6813
+ ALC292_FIXUP_DELL_E7X_AAMIX,
58156814 ALC292_FIXUP_DELL_E7X,
58166815 ALC292_FIXUP_DISABLE_AAMIX,
58176816 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
6817
+ ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
58186818 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
58196819 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
58206820 ALC275_FIXUP_DELL_XPS,
....@@ -5832,6 +6832,7 @@
58326832 ALC298_FIXUP_LENOVO_SPK_VOLUME,
58336833 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
58346834 ALC269_FIXUP_ATIV_BOOK_8,
6835
+ ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
58356836 ALC221_FIXUP_HP_MIC_NO_PRESENCE,
58366837 ALC256_FIXUP_ASUS_HEADSET_MODE,
58376838 ALC256_FIXUP_ASUS_MIC,
....@@ -5850,7 +6851,8 @@
58506851 ALC298_FIXUP_TPT470_DOCK,
58516852 ALC255_FIXUP_DUMMY_LINEOUT_VERB,
58526853 ALC255_FIXUP_DELL_HEADSET_MIC,
5853
- ALC256_FIXUP_HUAWEI_MBXP_PINS,
6854
+ ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
6855
+ ALC298_FIXUP_HUAWEI_MBX_STEREO,
58546856 ALC295_FIXUP_HP_X360,
58556857 ALC221_FIXUP_HP_HEADSET_MIC,
58566858 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
....@@ -5862,6 +6864,8 @@
58626864 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
58636865 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
58646866 ALC255_FIXUP_ACER_HEADSET_MIC,
6867
+ ALC295_FIXUP_CHROME_BOOK,
6868
+ ALC225_FIXUP_HEADSET_JACK,
58656869 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
58666870 ALC225_FIXUP_WYSE_AUTO_MUTE,
58676871 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
....@@ -5874,9 +6878,98 @@
58746878 ALC289_FIXUP_DUAL_SPK,
58756879 ALC294_FIXUP_SPK2_TO_DAC1,
58766880 ALC294_FIXUP_ASUS_DUAL_SPK,
6881
+ ALC285_FIXUP_THINKPAD_X1_GEN7,
6882
+ ALC285_FIXUP_THINKPAD_HEADSET_JACK,
58776883 ALC294_FIXUP_ASUS_HPE,
6884
+ ALC294_FIXUP_ASUS_COEF_1B,
6885
+ ALC294_FIXUP_ASUS_GX502_HP,
6886
+ ALC294_FIXUP_ASUS_GX502_PINS,
6887
+ ALC294_FIXUP_ASUS_GX502_VERBS,
6888
+ ALC294_FIXUP_ASUS_GU502_HP,
6889
+ ALC294_FIXUP_ASUS_GU502_PINS,
6890
+ ALC294_FIXUP_ASUS_GU502_VERBS,
6891
+ ALC294_FIXUP_ASUS_G513_PINS,
6892
+ ALC285_FIXUP_ASUS_G533Z_PINS,
58786893 ALC285_FIXUP_HP_GPIO_LED,
6894
+ ALC285_FIXUP_HP_MUTE_LED,
6895
+ ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
6896
+ ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
6897
+ ALC236_FIXUP_HP_GPIO_LED,
6898
+ ALC236_FIXUP_HP_MUTE_LED,
6899
+ ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
6900
+ ALC298_FIXUP_SAMSUNG_AMP,
6901
+ ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
6902
+ ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
6903
+ ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
6904
+ ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
6905
+ ALC269VC_FIXUP_ACER_HEADSET_MIC,
6906
+ ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
6907
+ ALC289_FIXUP_ASUS_GA401,
6908
+ ALC289_FIXUP_ASUS_GA502,
6909
+ ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
6910
+ ALC285_FIXUP_HP_GPIO_AMP_INIT,
6911
+ ALC269_FIXUP_CZC_B20,
6912
+ ALC269_FIXUP_CZC_TMI,
6913
+ ALC269_FIXUP_CZC_L101,
6914
+ ALC269_FIXUP_LEMOTE_A1802,
6915
+ ALC269_FIXUP_LEMOTE_A190X,
6916
+ ALC256_FIXUP_INTEL_NUC8_RUGGED,
6917
+ ALC233_FIXUP_INTEL_NUC8_DMIC,
6918
+ ALC233_FIXUP_INTEL_NUC8_BOOST,
6919
+ ALC256_FIXUP_INTEL_NUC10,
6920
+ ALC255_FIXUP_XIAOMI_HEADSET_MIC,
6921
+ ALC274_FIXUP_HP_MIC,
6922
+ ALC274_FIXUP_HP_HEADSET_MIC,
6923
+ ALC274_FIXUP_HP_ENVY_GPIO,
6924
+ ALC256_FIXUP_ASUS_HPE,
6925
+ ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6926
+ ALC287_FIXUP_HP_GPIO_LED,
6927
+ ALC256_FIXUP_HP_HEADSET_MIC,
6928
+ ALC245_FIXUP_HP_GPIO_LED,
6929
+ ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
6930
+ ALC282_FIXUP_ACER_DISABLE_LINEOUT,
6931
+ ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
6932
+ ALC256_FIXUP_ACER_HEADSET_MIC,
6933
+ ALC285_FIXUP_IDEAPAD_S740_COEF,
6934
+ ALC295_FIXUP_ASUS_DACS,
6935
+ ALC295_FIXUP_HP_OMEN,
6936
+ ALC285_FIXUP_HP_SPECTRE_X360,
6937
+ ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
6938
+ ALC623_FIXUP_LENOVO_THINKSTATION_P340,
6939
+ ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
6940
+ ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
6941
+ ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
6942
+ ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
6943
+ ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
6944
+ ALC298_FIXUP_LENOVO_C940_DUET7,
6945
+ ALC287_FIXUP_13S_GEN2_SPEAKERS,
6946
+ ALC256_FIXUP_SET_COEF_DEFAULTS,
6947
+ ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
6948
+ ALC233_FIXUP_NO_AUDIO_JACK,
6949
+ ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
6950
+ ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
6951
+ ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
6952
+ ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
6953
+ ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
6954
+ ALC236_FIXUP_DELL_DUAL_CODECS,
58796955 };
6956
+
6957
+/* A special fixup for Lenovo C940 and Yoga Duet 7;
6958
+ * both have the very same PCI SSID, and we need to apply different fixups
6959
+ * depending on the codec ID
6960
+ */
6961
+static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
6962
+ const struct hda_fixup *fix,
6963
+ int action)
6964
+{
6965
+ int id;
6966
+
6967
+ if (codec->core.vendor_id == 0x10ec0298)
6968
+ id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
6969
+ else
6970
+ id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
6971
+ __snd_hda_apply_fixup(codec, id, action, 0);
6972
+}
58806973
58816974 static const struct hda_fixup alc269_fixups[] = {
58826975 [ALC269_FIXUP_GPIO2] = {
....@@ -6133,7 +7226,7 @@
61337226 .type = HDA_FIXUP_FUNC,
61347227 .v.func = alc_fixup_headset_mode,
61357228 .chained = true,
6136
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7229
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
61377230 },
61387231 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
61397232 .type = HDA_FIXUP_FUNC,
....@@ -6157,7 +7250,7 @@
61577250 .chained = true,
61587251 .chain_id = ALC269_FIXUP_HEADSET_MIC
61597252 },
6160
- [ALC256_FIXUP_HUAWEI_MBXP_PINS] = {
7253
+ [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
61617254 .type = HDA_FIXUP_PINS,
61627255 .v.pins = (const struct hda_pintbl[]) {
61637256 {0x12, 0x90a60130},
....@@ -6172,6 +7265,14 @@
61727265 {0x21, 0x04211020},
61737266 { }
61747267 },
7268
+ .chained = true,
7269
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7270
+ },
7271
+ [ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
7272
+ .type = HDA_FIXUP_FUNC,
7273
+ .v.func = alc298_fixup_huawei_mbx_stereo,
7274
+ .chained = true,
7275
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
61757276 },
61767277 [ALC269_FIXUP_ASUS_X101_FUNC] = {
61777278 .type = HDA_FIXUP_FUNC,
....@@ -6254,6 +7355,15 @@
62547355 },
62557356 .chained = true,
62567357 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
7358
+ },
7359
+ [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
7360
+ .type = HDA_FIXUP_PINS,
7361
+ .v.pins = (const struct hda_pintbl[]) {
7362
+ { 0x18, 0x01a110f0 }, /* use as headset mic */
7363
+ { }
7364
+ },
7365
+ .chained = true,
7366
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
62577367 },
62587368 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
62597369 .type = HDA_FIXUP_FUNC,
....@@ -6375,7 +7485,7 @@
63757485 .type = HDA_FIXUP_FUNC,
63767486 .v.func = alc_fixup_headset_mode_alc255,
63777487 .chained = true,
6378
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7488
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
63797489 },
63807490 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
63817491 .type = HDA_FIXUP_FUNC,
....@@ -6410,9 +7520,9 @@
64107520 { },
64117521 },
64127522 },
6413
- [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = {
7523
+ [ALC255_FIXUP_MIC_MUTE_LED] = {
64147524 .type = HDA_FIXUP_FUNC,
6415
- .v.func = alc_fixup_dell_wmi,
7525
+ .v.func = alc_fixup_micmute_led,
64167526 },
64177527 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
64187528 .type = HDA_FIXUP_PINS,
....@@ -6429,6 +7539,10 @@
64297539 { 0x21, 0x0321101f },
64307540 { },
64317541 },
7542
+ },
7543
+ [ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
7544
+ .type = HDA_FIXUP_FUNC,
7545
+ .v.func = alc269vb_fixup_aspire_e1_coef,
64327546 },
64337547 [ALC280_FIXUP_HP_GPIO4] = {
64347548 .type = HDA_FIXUP_FUNC,
....@@ -6467,11 +7581,17 @@
64677581 .type = HDA_FIXUP_FUNC,
64687582 .v.func = alc280_fixup_hp_9480m,
64697583 },
7584
+ [ALC245_FIXUP_HP_X360_AMP] = {
7585
+ .type = HDA_FIXUP_FUNC,
7586
+ .v.func = alc245_fixup_hp_x360_amp,
7587
+ .chained = true,
7588
+ .chain_id = ALC245_FIXUP_HP_GPIO_LED
7589
+ },
64707590 [ALC288_FIXUP_DELL_HEADSET_MODE] = {
64717591 .type = HDA_FIXUP_FUNC,
64727592 .v.func = alc_fixup_headset_mode_dell_alc288,
64737593 .chained = true,
6474
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7594
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
64757595 },
64767596 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
64777597 .type = HDA_FIXUP_PINS,
....@@ -6507,11 +7627,27 @@
65077627 .chained = true,
65087628 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
65097629 },
6510
- [ALC292_FIXUP_DELL_E7X] = {
7630
+ [ALC292_FIXUP_DELL_E7X_AAMIX] = {
65117631 .type = HDA_FIXUP_FUNC,
65127632 .v.func = alc_fixup_dell_xps13,
65137633 .chained = true,
65147634 .chain_id = ALC292_FIXUP_DISABLE_AAMIX
7635
+ },
7636
+ [ALC292_FIXUP_DELL_E7X] = {
7637
+ .type = HDA_FIXUP_FUNC,
7638
+ .v.func = alc_fixup_micmute_led,
7639
+ /* micmute fixup must be applied at last */
7640
+ .chained_before = true,
7641
+ .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
7642
+ },
7643
+ [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
7644
+ .type = HDA_FIXUP_PINS,
7645
+ .v.pins = (const struct hda_pintbl[]) {
7646
+ { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7647
+ { }
7648
+ },
7649
+ .chained_before = true,
7650
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
65157651 },
65167652 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
65177653 .type = HDA_FIXUP_PINS,
....@@ -6552,6 +7688,16 @@
65527688 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
65537689 .type = HDA_FIXUP_FUNC,
65547690 .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
7691
+ },
7692
+ [ALC233_FIXUP_INTEL_NUC8_DMIC] = {
7693
+ .type = HDA_FIXUP_FUNC,
7694
+ .v.func = alc_fixup_inv_dmic,
7695
+ .chained = true,
7696
+ .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST,
7697
+ },
7698
+ [ALC233_FIXUP_INTEL_NUC8_BOOST] = {
7699
+ .type = HDA_FIXUP_FUNC,
7700
+ .v.func = alc269_fixup_limit_int_mic_boost
65557701 },
65567702 [ALC255_FIXUP_DELL_SPK_NOISE] = {
65577703 .type = HDA_FIXUP_FUNC,
....@@ -6629,6 +7775,16 @@
66297775 .v.func = alc_fixup_auto_mute_via_amp,
66307776 .chained = true,
66317777 .chain_id = ALC269_FIXUP_NO_SHUTUP
7778
+ },
7779
+ [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
7780
+ .type = HDA_FIXUP_PINS,
7781
+ .v.pins = (const struct hda_pintbl[]) {
7782
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7783
+ { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
7784
+ { }
7785
+ },
7786
+ .chained = true,
7787
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
66327788 },
66337789 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
66347790 .type = HDA_FIXUP_PINS,
....@@ -6851,6 +8007,16 @@
68518007 .chained = true,
68528008 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
68538009 },
8010
+ [ALC295_FIXUP_CHROME_BOOK] = {
8011
+ .type = HDA_FIXUP_FUNC,
8012
+ .v.func = alc295_fixup_chromebook,
8013
+ .chained = true,
8014
+ .chain_id = ALC225_FIXUP_HEADSET_JACK
8015
+ },
8016
+ [ALC225_FIXUP_HEADSET_JACK] = {
8017
+ .type = HDA_FIXUP_FUNC,
8018
+ .v.func = alc_fixup_headset_jack,
8019
+ },
68548020 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
68558021 .type = HDA_FIXUP_PINS,
68568022 .v.pins = (const struct hda_pintbl[]) {
....@@ -6976,6 +8142,18 @@
69768142 .chained = true,
69778143 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1
69788144 },
8145
+ [ALC285_FIXUP_THINKPAD_X1_GEN7] = {
8146
+ .type = HDA_FIXUP_FUNC,
8147
+ .v.func = alc285_fixup_thinkpad_x1_gen7,
8148
+ .chained = true,
8149
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8150
+ },
8151
+ [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
8152
+ .type = HDA_FIXUP_FUNC,
8153
+ .v.func = alc_fixup_headset_jack,
8154
+ .chained = true,
8155
+ .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
8156
+ },
69798157 [ALC294_FIXUP_ASUS_HPE] = {
69808158 .type = HDA_FIXUP_VERBS,
69818159 .v.verbs = (const struct hda_verb[]) {
....@@ -6987,9 +8165,632 @@
69878165 .chained = true,
69888166 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
69898167 },
8168
+ [ALC294_FIXUP_ASUS_GX502_PINS] = {
8169
+ .type = HDA_FIXUP_PINS,
8170
+ .v.pins = (const struct hda_pintbl[]) {
8171
+ { 0x19, 0x03a11050 }, /* front HP mic */
8172
+ { 0x1a, 0x01a11830 }, /* rear external mic */
8173
+ { 0x21, 0x03211020 }, /* front HP out */
8174
+ { }
8175
+ },
8176
+ .chained = true,
8177
+ .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
8178
+ },
8179
+ [ALC294_FIXUP_ASUS_GX502_VERBS] = {
8180
+ .type = HDA_FIXUP_VERBS,
8181
+ .v.verbs = (const struct hda_verb[]) {
8182
+ /* set 0x15 to HP-OUT ctrl */
8183
+ { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8184
+ /* unmute the 0x15 amp */
8185
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8186
+ { }
8187
+ },
8188
+ .chained = true,
8189
+ .chain_id = ALC294_FIXUP_ASUS_GX502_HP
8190
+ },
8191
+ [ALC294_FIXUP_ASUS_GX502_HP] = {
8192
+ .type = HDA_FIXUP_FUNC,
8193
+ .v.func = alc294_fixup_gx502_hp,
8194
+ },
8195
+ [ALC294_FIXUP_ASUS_GU502_PINS] = {
8196
+ .type = HDA_FIXUP_PINS,
8197
+ .v.pins = (const struct hda_pintbl[]) {
8198
+ { 0x19, 0x01a11050 }, /* rear HP mic */
8199
+ { 0x1a, 0x01a11830 }, /* rear external mic */
8200
+ { 0x21, 0x012110f0 }, /* rear HP out */
8201
+ { }
8202
+ },
8203
+ .chained = true,
8204
+ .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
8205
+ },
8206
+ [ALC294_FIXUP_ASUS_GU502_VERBS] = {
8207
+ .type = HDA_FIXUP_VERBS,
8208
+ .v.verbs = (const struct hda_verb[]) {
8209
+ /* set 0x15 to HP-OUT ctrl */
8210
+ { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8211
+ /* unmute the 0x15 amp */
8212
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8213
+ /* set 0x1b to HP-OUT */
8214
+ { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
8215
+ { }
8216
+ },
8217
+ .chained = true,
8218
+ .chain_id = ALC294_FIXUP_ASUS_GU502_HP
8219
+ },
8220
+ [ALC294_FIXUP_ASUS_GU502_HP] = {
8221
+ .type = HDA_FIXUP_FUNC,
8222
+ .v.func = alc294_fixup_gu502_hp,
8223
+ },
8224
+ [ALC294_FIXUP_ASUS_G513_PINS] = {
8225
+ .type = HDA_FIXUP_PINS,
8226
+ .v.pins = (const struct hda_pintbl[]) {
8227
+ { 0x19, 0x03a11050 }, /* front HP mic */
8228
+ { 0x1a, 0x03a11c30 }, /* rear external mic */
8229
+ { 0x21, 0x03211420 }, /* front HP out */
8230
+ { }
8231
+ },
8232
+ },
8233
+ [ALC285_FIXUP_ASUS_G533Z_PINS] = {
8234
+ .type = HDA_FIXUP_PINS,
8235
+ .v.pins = (const struct hda_pintbl[]) {
8236
+ { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
8237
+ { 0x19, 0x03a19020 }, /* Mic Boost Volume */
8238
+ { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
8239
+ { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
8240
+ { 0x21, 0x03211420 },
8241
+ { }
8242
+ },
8243
+ },
8244
+ [ALC294_FIXUP_ASUS_COEF_1B] = {
8245
+ .type = HDA_FIXUP_VERBS,
8246
+ .v.verbs = (const struct hda_verb[]) {
8247
+ /* Set bit 10 to correct noisy output after reboot from
8248
+ * Windows 10 (due to pop noise reduction?)
8249
+ */
8250
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
8251
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
8252
+ { }
8253
+ },
8254
+ .chained = true,
8255
+ .chain_id = ALC289_FIXUP_ASUS_GA401,
8256
+ },
69908257 [ALC285_FIXUP_HP_GPIO_LED] = {
69918258 .type = HDA_FIXUP_FUNC,
69928259 .v.func = alc285_fixup_hp_gpio_led,
8260
+ },
8261
+ [ALC285_FIXUP_HP_MUTE_LED] = {
8262
+ .type = HDA_FIXUP_FUNC,
8263
+ .v.func = alc285_fixup_hp_mute_led,
8264
+ },
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
+ },
8273
+ [ALC236_FIXUP_HP_GPIO_LED] = {
8274
+ .type = HDA_FIXUP_FUNC,
8275
+ .v.func = alc236_fixup_hp_gpio_led,
8276
+ },
8277
+ [ALC236_FIXUP_HP_MUTE_LED] = {
8278
+ .type = HDA_FIXUP_FUNC,
8279
+ .v.func = alc236_fixup_hp_mute_led,
8280
+ },
8281
+ [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
8282
+ .type = HDA_FIXUP_FUNC,
8283
+ .v.func = alc236_fixup_hp_mute_led_micmute_vref,
8284
+ },
8285
+ [ALC298_FIXUP_SAMSUNG_AMP] = {
8286
+ .type = HDA_FIXUP_FUNC,
8287
+ .v.func = alc298_fixup_samsung_amp,
8288
+ .chained = true,
8289
+ .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
8290
+ },
8291
+ [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8292
+ .type = HDA_FIXUP_VERBS,
8293
+ .v.verbs = (const struct hda_verb[]) {
8294
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
8295
+ { }
8296
+ },
8297
+ },
8298
+ [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8299
+ .type = HDA_FIXUP_VERBS,
8300
+ .v.verbs = (const struct hda_verb[]) {
8301
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
8302
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
8303
+ { }
8304
+ },
8305
+ },
8306
+ [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
8307
+ .type = HDA_FIXUP_PINS,
8308
+ .v.pins = (const struct hda_pintbl[]) {
8309
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8310
+ { }
8311
+ },
8312
+ .chained = true,
8313
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8314
+ },
8315
+ [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
8316
+ .type = HDA_FIXUP_PINS,
8317
+ .v.pins = (const struct hda_pintbl[]) {
8318
+ { 0x14, 0x90100120 }, /* use as internal speaker */
8319
+ { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8320
+ { 0x1a, 0x01011020 }, /* use as line out */
8321
+ { },
8322
+ },
8323
+ .chained = true,
8324
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8325
+ },
8326
+ [ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
8327
+ .type = HDA_FIXUP_PINS,
8328
+ .v.pins = (const struct hda_pintbl[]) {
8329
+ { 0x18, 0x02a11030 }, /* use as headset mic */
8330
+ { }
8331
+ },
8332
+ .chained = true,
8333
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8334
+ },
8335
+ [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
8336
+ .type = HDA_FIXUP_PINS,
8337
+ .v.pins = (const struct hda_pintbl[]) {
8338
+ { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8339
+ { }
8340
+ },
8341
+ .chained = true,
8342
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8343
+ },
8344
+ [ALC289_FIXUP_ASUS_GA401] = {
8345
+ .type = HDA_FIXUP_FUNC,
8346
+ .v.func = alc289_fixup_asus_ga401,
8347
+ .chained = true,
8348
+ .chain_id = ALC289_FIXUP_ASUS_GA502,
8349
+ },
8350
+ [ALC289_FIXUP_ASUS_GA502] = {
8351
+ .type = HDA_FIXUP_PINS,
8352
+ .v.pins = (const struct hda_pintbl[]) {
8353
+ { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8354
+ { }
8355
+ },
8356
+ },
8357
+ [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
8358
+ .type = HDA_FIXUP_PINS,
8359
+ .v.pins = (const struct hda_pintbl[]) {
8360
+ { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8361
+ { }
8362
+ },
8363
+ .chained = true,
8364
+ .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8365
+ },
8366
+ [ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
8367
+ .type = HDA_FIXUP_FUNC,
8368
+ .v.func = alc285_fixup_hp_gpio_amp_init,
8369
+ .chained = true,
8370
+ .chain_id = ALC285_FIXUP_HP_GPIO_LED
8371
+ },
8372
+ [ALC269_FIXUP_CZC_B20] = {
8373
+ .type = HDA_FIXUP_PINS,
8374
+ .v.pins = (const struct hda_pintbl[]) {
8375
+ { 0x12, 0x411111f0 },
8376
+ { 0x14, 0x90170110 }, /* speaker */
8377
+ { 0x15, 0x032f1020 }, /* HP out */
8378
+ { 0x17, 0x411111f0 },
8379
+ { 0x18, 0x03ab1040 }, /* mic */
8380
+ { 0x19, 0xb7a7013f },
8381
+ { 0x1a, 0x0181305f },
8382
+ { 0x1b, 0x411111f0 },
8383
+ { 0x1d, 0x411111f0 },
8384
+ { 0x1e, 0x411111f0 },
8385
+ { }
8386
+ },
8387
+ .chain_id = ALC269_FIXUP_DMIC,
8388
+ },
8389
+ [ALC269_FIXUP_CZC_TMI] = {
8390
+ .type = HDA_FIXUP_PINS,
8391
+ .v.pins = (const struct hda_pintbl[]) {
8392
+ { 0x12, 0x4000c000 },
8393
+ { 0x14, 0x90170110 }, /* speaker */
8394
+ { 0x15, 0x0421401f }, /* HP out */
8395
+ { 0x17, 0x411111f0 },
8396
+ { 0x18, 0x04a19020 }, /* mic */
8397
+ { 0x19, 0x411111f0 },
8398
+ { 0x1a, 0x411111f0 },
8399
+ { 0x1b, 0x411111f0 },
8400
+ { 0x1d, 0x40448505 },
8401
+ { 0x1e, 0x411111f0 },
8402
+ { 0x20, 0x8000ffff },
8403
+ { }
8404
+ },
8405
+ .chain_id = ALC269_FIXUP_DMIC,
8406
+ },
8407
+ [ALC269_FIXUP_CZC_L101] = {
8408
+ .type = HDA_FIXUP_PINS,
8409
+ .v.pins = (const struct hda_pintbl[]) {
8410
+ { 0x12, 0x40000000 },
8411
+ { 0x14, 0x01014010 }, /* speaker */
8412
+ { 0x15, 0x411111f0 }, /* HP out */
8413
+ { 0x16, 0x411111f0 },
8414
+ { 0x18, 0x01a19020 }, /* mic */
8415
+ { 0x19, 0x02a19021 },
8416
+ { 0x1a, 0x0181302f },
8417
+ { 0x1b, 0x0221401f },
8418
+ { 0x1c, 0x411111f0 },
8419
+ { 0x1d, 0x4044c601 },
8420
+ { 0x1e, 0x411111f0 },
8421
+ { }
8422
+ },
8423
+ .chain_id = ALC269_FIXUP_DMIC,
8424
+ },
8425
+ [ALC269_FIXUP_LEMOTE_A1802] = {
8426
+ .type = HDA_FIXUP_PINS,
8427
+ .v.pins = (const struct hda_pintbl[]) {
8428
+ { 0x12, 0x40000000 },
8429
+ { 0x14, 0x90170110 }, /* speaker */
8430
+ { 0x17, 0x411111f0 },
8431
+ { 0x18, 0x03a19040 }, /* mic1 */
8432
+ { 0x19, 0x90a70130 }, /* mic2 */
8433
+ { 0x1a, 0x411111f0 },
8434
+ { 0x1b, 0x411111f0 },
8435
+ { 0x1d, 0x40489d2d },
8436
+ { 0x1e, 0x411111f0 },
8437
+ { 0x20, 0x0003ffff },
8438
+ { 0x21, 0x03214020 },
8439
+ { }
8440
+ },
8441
+ .chain_id = ALC269_FIXUP_DMIC,
8442
+ },
8443
+ [ALC269_FIXUP_LEMOTE_A190X] = {
8444
+ .type = HDA_FIXUP_PINS,
8445
+ .v.pins = (const struct hda_pintbl[]) {
8446
+ { 0x14, 0x99130110 }, /* speaker */
8447
+ { 0x15, 0x0121401f }, /* HP out */
8448
+ { 0x18, 0x01a19c20 }, /* rear mic */
8449
+ { 0x19, 0x99a3092f }, /* front mic */
8450
+ { 0x1b, 0x0201401f }, /* front lineout */
8451
+ { }
8452
+ },
8453
+ .chain_id = ALC269_FIXUP_DMIC,
8454
+ },
8455
+ [ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
8456
+ .type = HDA_FIXUP_PINS,
8457
+ .v.pins = (const struct hda_pintbl[]) {
8458
+ { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8459
+ { }
8460
+ },
8461
+ .chained = true,
8462
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8463
+ },
8464
+ [ALC256_FIXUP_INTEL_NUC10] = {
8465
+ .type = HDA_FIXUP_PINS,
8466
+ .v.pins = (const struct hda_pintbl[]) {
8467
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8468
+ { }
8469
+ },
8470
+ .chained = true,
8471
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8472
+ },
8473
+ [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
8474
+ .type = HDA_FIXUP_VERBS,
8475
+ .v.verbs = (const struct hda_verb[]) {
8476
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8477
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8478
+ { }
8479
+ },
8480
+ .chained = true,
8481
+ .chain_id = ALC289_FIXUP_ASUS_GA502
8482
+ },
8483
+ [ALC274_FIXUP_HP_MIC] = {
8484
+ .type = HDA_FIXUP_VERBS,
8485
+ .v.verbs = (const struct hda_verb[]) {
8486
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8487
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8488
+ { }
8489
+ },
8490
+ },
8491
+ [ALC274_FIXUP_HP_HEADSET_MIC] = {
8492
+ .type = HDA_FIXUP_FUNC,
8493
+ .v.func = alc274_fixup_hp_headset_mic,
8494
+ .chained = true,
8495
+ .chain_id = ALC274_FIXUP_HP_MIC
8496
+ },
8497
+ [ALC274_FIXUP_HP_ENVY_GPIO] = {
8498
+ .type = HDA_FIXUP_FUNC,
8499
+ .v.func = alc274_fixup_hp_envy_gpio,
8500
+ },
8501
+ [ALC256_FIXUP_ASUS_HPE] = {
8502
+ .type = HDA_FIXUP_VERBS,
8503
+ .v.verbs = (const struct hda_verb[]) {
8504
+ /* Set EAPD high */
8505
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
8506
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
8507
+ { }
8508
+ },
8509
+ .chained = true,
8510
+ .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
8511
+ },
8512
+ [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
8513
+ .type = HDA_FIXUP_FUNC,
8514
+ .v.func = alc_fixup_headset_jack,
8515
+ .chained = true,
8516
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8517
+ },
8518
+ [ALC287_FIXUP_HP_GPIO_LED] = {
8519
+ .type = HDA_FIXUP_FUNC,
8520
+ .v.func = alc287_fixup_hp_gpio_led,
8521
+ },
8522
+ [ALC256_FIXUP_HP_HEADSET_MIC] = {
8523
+ .type = HDA_FIXUP_FUNC,
8524
+ .v.func = alc274_fixup_hp_headset_mic,
8525
+ },
8526
+ [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
8527
+ .type = HDA_FIXUP_FUNC,
8528
+ .v.func = alc_fixup_no_int_mic,
8529
+ .chained = true,
8530
+ .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8531
+ },
8532
+ [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
8533
+ .type = HDA_FIXUP_PINS,
8534
+ .v.pins = (const struct hda_pintbl[]) {
8535
+ { 0x1b, 0x411111f0 },
8536
+ { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8537
+ { },
8538
+ },
8539
+ .chained = true,
8540
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8541
+ },
8542
+ [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
8543
+ .type = HDA_FIXUP_FUNC,
8544
+ .v.func = alc269_fixup_limit_int_mic_boost,
8545
+ .chained = true,
8546
+ .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
8547
+ },
8548
+ [ALC256_FIXUP_ACER_HEADSET_MIC] = {
8549
+ .type = HDA_FIXUP_PINS,
8550
+ .v.pins = (const struct hda_pintbl[]) {
8551
+ { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8552
+ { 0x1a, 0x90a1092f }, /* use as internal mic */
8553
+ { }
8554
+ },
8555
+ .chained = true,
8556
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8557
+ },
8558
+ [ALC285_FIXUP_IDEAPAD_S740_COEF] = {
8559
+ .type = HDA_FIXUP_FUNC,
8560
+ .v.func = alc285_fixup_ideapad_s740_coef,
8561
+ .chained = true,
8562
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
8563
+ },
8564
+ [ALC295_FIXUP_ASUS_DACS] = {
8565
+ .type = HDA_FIXUP_FUNC,
8566
+ .v.func = alc295_fixup_asus_dacs,
8567
+ },
8568
+ [ALC295_FIXUP_HP_OMEN] = {
8569
+ .type = HDA_FIXUP_PINS,
8570
+ .v.pins = (const struct hda_pintbl[]) {
8571
+ { 0x12, 0xb7a60130 },
8572
+ { 0x13, 0x40000000 },
8573
+ { 0x14, 0x411111f0 },
8574
+ { 0x16, 0x411111f0 },
8575
+ { 0x17, 0x90170110 },
8576
+ { 0x18, 0x411111f0 },
8577
+ { 0x19, 0x02a11030 },
8578
+ { 0x1a, 0x411111f0 },
8579
+ { 0x1b, 0x04a19030 },
8580
+ { 0x1d, 0x40600001 },
8581
+ { 0x1e, 0x411111f0 },
8582
+ { 0x21, 0x03211020 },
8583
+ {}
8584
+ },
8585
+ .chained = true,
8586
+ .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
8587
+ },
8588
+ [ALC285_FIXUP_HP_SPECTRE_X360] = {
8589
+ .type = HDA_FIXUP_FUNC,
8590
+ .v.func = alc285_fixup_hp_spectre_x360,
8591
+ },
8592
+ [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
8593
+ .type = HDA_FIXUP_FUNC,
8594
+ .v.func = alc285_fixup_hp_spectre_x360_eb1
8595
+ },
8596
+ [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
8597
+ .type = HDA_FIXUP_FUNC,
8598
+ .v.func = alc285_fixup_ideapad_s740_coef,
8599
+ .chained = true,
8600
+ .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
8601
+ },
8602
+ [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
8603
+ .type = HDA_FIXUP_FUNC,
8604
+ .v.func = alc_fixup_no_shutup,
8605
+ .chained = true,
8606
+ .chain_id = ALC283_FIXUP_HEADSET_MIC,
8607
+ },
8608
+ [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
8609
+ .type = HDA_FIXUP_PINS,
8610
+ .v.pins = (const struct hda_pintbl[]) {
8611
+ { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8612
+ { }
8613
+ },
8614
+ .chained = true,
8615
+ .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
8616
+ },
8617
+ [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
8618
+ .type = HDA_FIXUP_FUNC,
8619
+ .v.func = alc269_fixup_limit_int_mic_boost,
8620
+ .chained = true,
8621
+ .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
8622
+ },
8623
+ [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
8624
+ .type = HDA_FIXUP_FUNC,
8625
+ .v.func = alc285_fixup_ideapad_s740_coef,
8626
+ .chained = true,
8627
+ .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
8628
+ },
8629
+ [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
8630
+ .type = HDA_FIXUP_FUNC,
8631
+ .v.func = alc287_fixup_legion_15imhg05_speakers,
8632
+ .chained = true,
8633
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
8634
+ },
8635
+ [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
8636
+ .type = HDA_FIXUP_VERBS,
8637
+ //.v.verbs = legion_15imhg05_coefs,
8638
+ .v.verbs = (const struct hda_verb[]) {
8639
+ // set left speaker Legion 7i.
8640
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8641
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8642
+
8643
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8644
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8645
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8646
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8647
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8648
+
8649
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8650
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8651
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8652
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8653
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8654
+
8655
+ // set right speaker Legion 7i.
8656
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8657
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8658
+
8659
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8660
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8661
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8662
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8663
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8664
+
8665
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8666
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8667
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8668
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8669
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8670
+ {}
8671
+ },
8672
+ .chained = true,
8673
+ .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
8674
+ },
8675
+ [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
8676
+ .type = HDA_FIXUP_FUNC,
8677
+ .v.func = alc287_fixup_legion_15imhg05_speakers,
8678
+ .chained = true,
8679
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8680
+ },
8681
+ [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
8682
+ .type = HDA_FIXUP_VERBS,
8683
+ .v.verbs = (const struct hda_verb[]) {
8684
+ // set left speaker Yoga 7i.
8685
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8686
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8687
+
8688
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8689
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8690
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8691
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8692
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8693
+
8694
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8695
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8696
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8697
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8698
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8699
+
8700
+ // set right speaker Yoga 7i.
8701
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8702
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
8703
+
8704
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8705
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8706
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8707
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8708
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8709
+
8710
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8711
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8712
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8713
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8714
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8715
+ {}
8716
+ },
8717
+ .chained = true,
8718
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8719
+ },
8720
+ [ALC298_FIXUP_LENOVO_C940_DUET7] = {
8721
+ .type = HDA_FIXUP_FUNC,
8722
+ .v.func = alc298_fixup_lenovo_c940_duet7,
8723
+ },
8724
+ [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
8725
+ .type = HDA_FIXUP_VERBS,
8726
+ .v.verbs = (const struct hda_verb[]) {
8727
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8728
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8729
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8730
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8731
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8732
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8733
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8734
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8735
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8736
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8737
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8738
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8739
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8740
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8741
+ {}
8742
+ },
8743
+ .chained = true,
8744
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8745
+ },
8746
+ [ALC256_FIXUP_SET_COEF_DEFAULTS] = {
8747
+ .type = HDA_FIXUP_FUNC,
8748
+ .v.func = alc256_fixup_set_coef_defaults,
8749
+ },
8750
+ [ALC245_FIXUP_HP_GPIO_LED] = {
8751
+ .type = HDA_FIXUP_FUNC,
8752
+ .v.func = alc245_fixup_hp_gpio_led,
8753
+ },
8754
+ [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
8755
+ .type = HDA_FIXUP_PINS,
8756
+ .v.pins = (const struct hda_pintbl[]) {
8757
+ { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
8758
+ { }
8759
+ },
8760
+ .chained = true,
8761
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
8762
+ },
8763
+ [ALC233_FIXUP_NO_AUDIO_JACK] = {
8764
+ .type = HDA_FIXUP_FUNC,
8765
+ .v.func = alc233_fixup_no_audio_jack,
8766
+ },
8767
+ [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
8768
+ .type = HDA_FIXUP_FUNC,
8769
+ .v.func = alc256_fixup_mic_no_presence_and_resume,
8770
+ .chained = true,
8771
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8772
+ },
8773
+ [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
8774
+ .type = HDA_FIXUP_VERBS,
8775
+ .v.verbs = (const struct hda_verb[]) {
8776
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
8777
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
8778
+ { }
8779
+ },
8780
+ .chained = true,
8781
+ .chain_id = ALC285_FIXUP_HP_MUTE_LED,
8782
+ },
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,
69938794 },
69948795 };
69958796
....@@ -6999,24 +8800,42 @@
69998800 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
70008801 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
70018802 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7002
- SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
70038803 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
70048804 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
70058805 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
70068806 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
70078807 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
8808
+ SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
8809
+ SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
8810
+ SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
70088811 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
8812
+ SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
70098813 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
8814
+ SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
70108815 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
70118816 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8817
+ SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
8818
+ SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
70128819 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
8820
+ SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
8821
+ SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
8822
+ SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
70138823 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70148824 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70158825 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8826
+ SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
8827
+ SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8828
+ SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
70168829 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70178830 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
70188831 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
8832
+ SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8833
+ SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8834
+ SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8835
+ 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),
70198837 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
8838
+ SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
70208839 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
70218840 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
70228841 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
....@@ -7064,6 +8883,24 @@
70648883 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
70658884 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
70668885 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
8886
+ SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8887
+ SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8888
+ SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
8889
+ SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
8890
+ SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
8891
+ SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8892
+ SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8893
+ SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
8894
+ 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),
70678904 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
70688905 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
70698906 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
....@@ -7123,9 +8960,12 @@
71238960 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
71248961 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
71258962 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8963
+ SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
71268964 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
71278965 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
7128
- SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8966
+ SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8967
+ SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8968
+ SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
71298969 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
71308970 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
71318971 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
....@@ -7134,8 +8974,62 @@
71348974 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
71358975 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
71368976 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8977
+ SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
71378978 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
7138
- SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED),
8979
+ SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
8980
+ SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8981
+ SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8982
+ SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8983
+ SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
8984
+ SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8985
+ 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),
8987
+ SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8988
+ SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8989
+ SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
8990
+ SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
8991
+ SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
8992
+ SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8993
+ SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8994
+ SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8995
+ SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
8996
+ SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
8997
+ SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8998
+ SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
8999
+ ALC285_FIXUP_HP_GPIO_AMP_INIT),
9000
+ SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
9001
+ ALC285_FIXUP_HP_GPIO_AMP_INIT),
9002
+ SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9003
+ SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9004
+ SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
9005
+ SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
9006
+ SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9007
+ SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9008
+ SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9009
+ SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9010
+ SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
9011
+ SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
9012
+ SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
9013
+ SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
9014
+ SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
9015
+ SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9016
+ SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9017
+ 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),
9019
+ SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9020
+ SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9021
+ SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9022
+ SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
9023
+ SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9024
+ SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9025
+ SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9026
+ SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
9027
+ 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),
9029
+ SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
9030
+ SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
9031
+ SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
9032
+ SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
71399033 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
71409034 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
71419035 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
....@@ -7144,25 +9038,47 @@
71449038 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71459039 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
71469040 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9041
+ SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71479042 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
71489043 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
71499044 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
7150
- SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
71519045 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
9046
+ SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
9047
+ SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
71529048 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
71539049 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
71549050 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
9051
+ SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
9052
+ SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
71559053 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
9054
+ SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
71569055 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
9056
+ SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
71579057 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
9058
+ SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
9059
+ SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
9060
+ SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
9061
+ SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
71589062 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
9063
+ SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
71599064 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
71609065 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
9066
+ SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
71619067 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
71629068 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71639069 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7164
- SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
9070
+ SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
9071
+ SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
71659072 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
9073
+ SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
9074
+ SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
9075
+ SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
9076
+ SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
9077
+ SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
9078
+ SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
9079
+ SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
9080
+ SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
9081
+ SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
71669082 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
71679083 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
71689084 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
....@@ -7178,13 +9094,29 @@
71789094 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
71799095 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
71809096 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
7181
- SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
71829097 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
9098
+ SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
71839099 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
71849100 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
9101
+ SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
9102
+ SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9103
+ SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9104
+ SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9105
+ SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
71859106 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
71869107 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
9108
+ SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9109
+ SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
9110
+ SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
9111
+ SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9112
+ SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
9113
+ SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
71879114 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
9115
+ SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
9116
+ SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
9117
+ 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),
71889120 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
71899121 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
71909122 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
....@@ -7198,14 +9130,19 @@
71989130 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
71999131 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72009132 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9133
+ SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72019134 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72029135 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72039136 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9137
+ SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9138
+ SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72049139 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72059140 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72069141 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72079142 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72089143 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9144
+ SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9145
+ SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72099146 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72109147 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72119148 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7220,6 +9157,10 @@
72209157 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72219158 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72229159 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9160
+ SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9161
+ SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9162
+ 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),
72239164 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72249165 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72259166 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7231,8 +9172,11 @@
72319172 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
72329173 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
72339174 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9175
+ SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9176
+ SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9177
+ SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72349178 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7235
- SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9179
+ SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
72369180 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72379181 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72389182 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7249,7 +9193,7 @@
72499193 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72509194 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72519195 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
7252
- SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
9196
+ SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
72539197 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
72549198 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
72559199 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
....@@ -7283,8 +9227,10 @@
72839227 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
72849228 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
72859229 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7286
- SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
7287
- SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
9230
+ SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
9231
+ SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
9232
+ SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
9233
+ SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
72889234 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
72899235 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
72909236 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
....@@ -7295,7 +9241,20 @@
72959241 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
72969242 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
72979243 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7298
- SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
9244
+ SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
9245
+ SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9246
+ SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
9247
+ SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
9248
+ SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
9249
+ SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9250
+ SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
9251
+ SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
9252
+ SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9253
+ SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
9254
+ SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
9255
+ SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9256
+ SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9257
+ SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
72999258 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
73009259 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
73019260 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
....@@ -7315,14 +9274,40 @@
73159274 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73169275 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73179276 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
9277
+ SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
73189278 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
73199279 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73209280 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73219281 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
7322
- SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS),
9282
+ SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
9283
+ SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
9284
+ SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
9285
+ SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
9286
+ SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
9287
+ SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
9288
+ SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
9289
+ SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
73239290 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
9291
+ SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
9292
+ 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),
9294
+ SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
9295
+ SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
9296
+ SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
9297
+ SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9298
+ SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9299
+ SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9300
+ SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
9301
+ SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
9302
+ SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
9303
+ SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
9304
+ SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
73249305 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
7325
- SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
9306
+ SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
9307
+ SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
9308
+ SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
9309
+ SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
9310
+ SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
73269311
73279312 #if 0
73289313 /* Below is a quirk table taken from the old code.
....@@ -7380,6 +9365,7 @@
73809365 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
73819366 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
73829367 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI),
9368
+ SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
73839369 {}
73849370 };
73859371
....@@ -7449,8 +9435,9 @@
74499435 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
74509436 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
74519437 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
7452
- {.id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, .name = "alc255-dell-mute"},
9438
+ {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
74539439 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
9440
+ {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
74549441 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
74559442 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
74569443 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
....@@ -7488,8 +9475,23 @@
74889475 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
74899476 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
74909477 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
9478
+ {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
9479
+ {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
74919480 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
9481
+ {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
74929482 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
9483
+ {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
9484
+ {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
9485
+ {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
9486
+ {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
9487
+ {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
9488
+ {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
9489
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
9490
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9491
+ {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
9492
+ {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
9493
+ {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
9494
+ {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
74939495 {}
74949496 };
74959497 #define ALC225_STANDARD_PINS \
....@@ -7584,20 +9586,12 @@
75849586 {0x19, 0x02a11020},
75859587 {0x1a, 0x02a11030},
75869588 {0x21, 0x0221101f}),
7587
- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7588
- {0x12, 0x90a60140},
9589
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
9590
+ {0x21, 0x02211010}),
9591
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
75899592 {0x14, 0x90170110},
7590
- {0x21, 0x02211020}),
7591
- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7592
- {0x12, 0x90a60140},
7593
- {0x14, 0x90170150},
7594
- {0x21, 0x02211020}),
7595
- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7596
- {0x21, 0x02211020}),
7597
- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7598
- {0x12, 0x40000000},
7599
- {0x14, 0x90170110},
7600
- {0x21, 0x02211020}),
9593
+ {0x19, 0x02a11020},
9594
+ {0x21, 0x02211030}),
76019595 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
76029596 {0x14, 0x90170110},
76039597 {0x21, 0x02211020}),
....@@ -7680,38 +9674,6 @@
76809674 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
76819675 {0x1b, 0x01011020},
76829676 {0x21, 0x02211010}),
7683
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7684
- {0x12, 0x90a60130},
7685
- {0x14, 0x90170110},
7686
- {0x1b, 0x01011020},
7687
- {0x21, 0x0221101f}),
7688
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7689
- {0x12, 0x90a60160},
7690
- {0x14, 0x90170120},
7691
- {0x21, 0x02211030}),
7692
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7693
- {0x12, 0x90a60170},
7694
- {0x14, 0x90170120},
7695
- {0x21, 0x02211030}),
7696
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell Inspiron 5468", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7697
- {0x12, 0x90a60180},
7698
- {0x14, 0x90170120},
7699
- {0x21, 0x02211030}),
7700
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7701
- {0x12, 0xb7a60130},
7702
- {0x14, 0x90170110},
7703
- {0x21, 0x02211020}),
7704
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7705
- {0x12, 0x90a60130},
7706
- {0x14, 0x90170110},
7707
- {0x14, 0x01011020},
7708
- {0x21, 0x0221101f}),
7709
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7710
- ALC256_STANDARD_PINS),
7711
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7712
- {0x14, 0x90170110},
7713
- {0x1b, 0x01011020},
7714
- {0x21, 0x0221101f}),
77159677 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
77169678 {0x14, 0x90170110},
77179679 {0x1b, 0x90a70130},
....@@ -7732,11 +9694,14 @@
77329694 {0x1a, 0x90a70130},
77339695 {0x1b, 0x90170110},
77349696 {0x21, 0x03211020}),
7735
- SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
7736
- {0x12, 0xb7a60130},
7737
- {0x13, 0xb8a61140},
7738
- {0x16, 0x90170110},
7739
- {0x21, 0x04211020}),
9697
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
9698
+ {0x14, 0x90170110},
9699
+ {0x19, 0x02a11020},
9700
+ {0x21, 0x0221101f}),
9701
+ SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
9702
+ {0x17, 0x90170110},
9703
+ {0x19, 0x03a11030},
9704
+ {0x21, 0x03211020}),
77409705 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
77419706 {0x12, 0x90a60130},
77429707 {0x14, 0x90170110},
....@@ -7774,6 +9739,22 @@
77749739 {0x12, 0x90a60140},
77759740 {0x19, 0x04a11030},
77769741 {0x21, 0x04211020}),
9742
+ SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9743
+ ALC282_STANDARD_PINS,
9744
+ {0x12, 0x90a609c0},
9745
+ {0x18, 0x03a11830},
9746
+ {0x19, 0x04a19831},
9747
+ {0x1a, 0x0481303f},
9748
+ {0x1b, 0x04211020},
9749
+ {0x21, 0x0321101f}),
9750
+ SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9751
+ ALC282_STANDARD_PINS,
9752
+ {0x12, 0x90a60940},
9753
+ {0x18, 0x03a11830},
9754
+ {0x19, 0x04a19831},
9755
+ {0x1a, 0x0481303f},
9756
+ {0x1b, 0x04211020},
9757
+ {0x21, 0x0321101f}),
77779758 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
77789759 ALC282_STANDARD_PINS,
77799760 {0x12, 0x90a60130},
....@@ -7792,6 +9773,20 @@
77929773 {0x14, 0x90170110},
77939774 {0x19, 0x04a11040},
77949775 {0x21, 0x04211020}),
9776
+ SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
9777
+ {0x14, 0x90170110},
9778
+ {0x19, 0x04a11040},
9779
+ {0x1d, 0x40600001},
9780
+ {0x21, 0x04211020}),
9781
+ SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
9782
+ {0x14, 0x90170110},
9783
+ {0x19, 0x04a11040},
9784
+ {0x21, 0x04211020}),
9785
+ SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9786
+ {0x14, 0x90170110},
9787
+ {0x17, 0x90170111},
9788
+ {0x19, 0x03a11030},
9789
+ {0x21, 0x03211020}),
77959790 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
77969791 {0x12, 0x90a60130},
77979792 {0x17, 0x90170110},
....@@ -7800,10 +9795,6 @@
78009795 {0x12, 0x90a60120},
78019796 {0x14, 0x90170110},
78029797 {0x21, 0x0321101f}),
7803
- SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
7804
- {0x12, 0xb7a60130},
7805
- {0x14, 0x90170110},
7806
- {0x21, 0x04211020}),
78079798 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
78089799 ALC290_STANDARD_PINS,
78099800 {0x15, 0x04211040},
....@@ -7878,6 +9869,18 @@
78789869 {0x12, 0x90a60130},
78799870 {0x17, 0x90170110},
78809871 {0x21, 0x03211020}),
9872
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9873
+ {0x12, 0x90a60120},
9874
+ {0x17, 0x90170110},
9875
+ {0x21, 0x04211030}),
9876
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9877
+ {0x12, 0x90a60130},
9878
+ {0x17, 0x90170110},
9879
+ {0x21, 0x03211020}),
9880
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9881
+ {0x12, 0x90a60130},
9882
+ {0x17, 0x90170110},
9883
+ {0x21, 0x03211020}),
78819884 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
78829885 {0x14, 0x90170110},
78839886 {0x21, 0x04211020}),
....@@ -7909,6 +9912,11 @@
79099912 {0x17, 0x90170110},
79109913 {0x1a, 0x03011020},
79119914 {0x21, 0x03211030}),
9915
+ SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
9916
+ {0x12, 0xb7a60140},
9917
+ {0x17, 0x90170110},
9918
+ {0x1a, 0x03a11030},
9919
+ {0x21, 0x03211020}),
79129920 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
79139921 ALC225_STANDARD_PINS,
79149922 {0x12, 0xb7a60130},
....@@ -7919,6 +9927,28 @@
79199927 {0x18, 0x02a11030},
79209928 {0x19, 0x02a1103f},
79219929 {0x21, 0x0221101f}),
9930
+ {}
9931
+};
9932
+
9933
+/* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9934
+ * more machines, don't need to match all valid pins, just need to match
9935
+ * all the pins defined in the tbl. Just because of this reason, it is possible
9936
+ * that a single machine matches multiple tbls, so there is one limitation:
9937
+ * at most one tbl is allowed to define for the same vendor and same codec
9938
+ */
9939
+static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
9940
+ SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9941
+ {0x19, 0x40000000},
9942
+ {0x1b, 0x40000000}),
9943
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9944
+ {0x19, 0x40000000},
9945
+ {0x1a, 0x40000000}),
9946
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9947
+ {0x19, 0x40000000},
9948
+ {0x1a, 0x40000000}),
9949
+ SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
9950
+ {0x19, 0x40000000},
9951
+ {0x1a, 0x40000000}),
79229952 {}
79239953 };
79249954
....@@ -7976,6 +10006,7 @@
797610006 spec = codec->spec;
797710007 spec->gen.shared_mic_vref_pin = 0x18;
797810008 codec->power_save_node = 0;
10009
+ spec->en_3kpull_low = true;
797910010
798010011 #ifdef CONFIG_PM
798110012 codec->patch_ops.suspend = alc269_suspend;
....@@ -8050,18 +10081,24 @@
805010081 spec->shutup = alc256_shutup;
805110082 spec->init_hook = alc256_init;
805210083 break;
10084
+ case 0x10ec0230:
805310085 case 0x10ec0236:
805410086 case 0x10ec0256:
10087
+ case 0x19e58326:
805510088 spec->codec_variant = ALC269_TYPE_ALC256;
805610089 spec->shutup = alc256_shutup;
805710090 spec->init_hook = alc256_init;
805810091 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;
805910095 break;
806010096 case 0x10ec0257:
806110097 spec->codec_variant = ALC269_TYPE_ALC257;
806210098 spec->shutup = alc256_shutup;
806310099 spec->init_hook = alc256_init;
806410100 spec->gen.mixer_nid = 0;
10101
+ spec->en_3kpull_low = false;
806510102 break;
806610103 case 0x10ec0215:
806710104 case 0x10ec0245:
....@@ -8113,9 +10150,22 @@
811310150 spec->init_hook = alc5505_dsp_init;
811410151 }
811510152
10153
+ alc_pre_init(codec);
10154
+
811610155 snd_hda_pick_fixup(codec, alc269_fixup_models,
811710156 alc269_fixup_tbl, alc269_fixups);
8118
- snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups);
10157
+ /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
10158
+ * the quirk breaks the latter (bko#214101).
10159
+ * Clear the wrong entry.
10160
+ */
10161
+ if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
10162
+ codec->core.vendor_id == 0x10ec0294) {
10163
+ codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
10164
+ codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
10165
+ }
10166
+
10167
+ snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
10168
+ snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
811910169 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
812010170 alc269_fixups);
812110171 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8248,11 +10298,14 @@
824810298 return err;
824910299
825010300 spec = codec->spec;
8251
- spec->gen.beep_nid = 0x23;
10301
+ if (has_cdefine_beep(codec))
10302
+ spec->gen.beep_nid = 0x23;
825210303
825310304 #ifdef CONFIG_PM
825410305 spec->power_hook = alc_power_eapd;
825510306 #endif
10307
+
10308
+ alc_pre_init(codec);
825610309
825710310 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups);
825810311 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8347,9 +10400,12 @@
834710400 return err;
834810401
834910402 spec = codec->spec;
8350
- spec->gen.beep_nid = 0x23;
10403
+ if (has_cdefine_beep(codec))
10404
+ spec->gen.beep_nid = 0x23;
835110405
835210406 spec->shutup = alc_eapd_shutup;
10407
+
10408
+ alc_pre_init(codec);
835310409
835410410 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups);
835510411 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8485,7 +10541,103 @@
848510541 }
848610542 }
848710543
8488
-static struct coef_fw alc668_coefs[] = {
10544
+static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec,
10545
+ struct hda_jack_callback *cb)
10546
+{
10547
+ /* surround speakers at 0x1b already get muted automatically when
10548
+ * headphones are plugged in, but we have to mute/unmute the remaining
10549
+ * channels manually:
10550
+ * 0x15 - front left/front right
10551
+ * 0x18 - front center/ LFE
10552
+ */
10553
+ if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) {
10554
+ snd_hda_set_pin_ctl_cache(codec, 0x15, 0);
10555
+ snd_hda_set_pin_ctl_cache(codec, 0x18, 0);
10556
+ } else {
10557
+ snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT);
10558
+ snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT);
10559
+ }
10560
+}
10561
+
10562
+static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
10563
+ const struct hda_fixup *fix, int action)
10564
+{
10565
+ /* Pin 0x1b: shared headphones jack and surround speakers */
10566
+ if (!is_jack_detectable(codec, 0x1b))
10567
+ return;
10568
+
10569
+ switch (action) {
10570
+ case HDA_FIXUP_ACT_PRE_PROBE:
10571
+ snd_hda_jack_detect_enable_callback(codec, 0x1b,
10572
+ alc662_aspire_ethos_mute_speakers);
10573
+ /* subwoofer needs an extra GPIO setting to become audible */
10574
+ alc_setup_gpio(codec, 0x02);
10575
+ break;
10576
+ case HDA_FIXUP_ACT_INIT:
10577
+ /* Make sure to start in a correct state, i.e. if
10578
+ * headphones have been plugged in before powering up the system
10579
+ */
10580
+ alc662_aspire_ethos_mute_speakers(codec, NULL);
10581
+ break;
10582
+ }
10583
+}
10584
+
10585
+static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
10586
+ const struct hda_fixup *fix, int action)
10587
+{
10588
+ struct alc_spec *spec = codec->spec;
10589
+
10590
+ static const struct hda_pintbl pincfgs[] = {
10591
+ { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
10592
+ { 0x1b, 0x0181304f },
10593
+ { }
10594
+ };
10595
+
10596
+ switch (action) {
10597
+ case HDA_FIXUP_ACT_PRE_PROBE:
10598
+ spec->gen.mixer_nid = 0;
10599
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10600
+ snd_hda_apply_pincfgs(codec, pincfgs);
10601
+ break;
10602
+ case HDA_FIXUP_ACT_INIT:
10603
+ alc_write_coef_idx(codec, 0x19, 0xa054);
10604
+ break;
10605
+ }
10606
+}
10607
+
10608
+static void alc897_hp_automute_hook(struct hda_codec *codec,
10609
+ struct hda_jack_callback *jack)
10610
+{
10611
+ struct alc_spec *spec = codec->spec;
10612
+ int vref;
10613
+
10614
+ snd_hda_gen_hp_automute(codec, jack);
10615
+ vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
10616
+ snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
10617
+ vref);
10618
+}
10619
+
10620
+static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
10621
+ const struct hda_fixup *fix, int action)
10622
+{
10623
+ struct alc_spec *spec = codec->spec;
10624
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
10625
+ spec->gen.hp_automute_hook = alc897_hp_automute_hook;
10626
+ }
10627
+}
10628
+
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
+
10640
+static const struct coef_fw alc668_coefs[] = {
848910641 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
849010642 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
849110643 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
....@@ -8519,6 +10671,7 @@
851910671 ALC662_FIXUP_LED_GPIO1,
852010672 ALC662_FIXUP_IDEAPAD,
852110673 ALC272_FIXUP_MARIO,
10674
+ ALC662_FIXUP_CZC_ET26,
852210675 ALC662_FIXUP_CZC_P10T,
852310676 ALC662_FIXUP_SKU_IGNORE,
852410677 ALC662_FIXUP_HP_RP5800,
....@@ -8556,6 +10709,20 @@
855610709 ALC662_FIXUP_USI_FUNC,
855710710 ALC662_FIXUP_USI_HEADSET_MODE,
855810711 ALC662_FIXUP_LENOVO_MULTI_CODECS,
10712
+ ALC669_FIXUP_ACER_ASPIRE_ETHOS,
10713
+ ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET,
10714
+ ALC671_FIXUP_HP_HEADSET_MIC2,
10715
+ ALC662_FIXUP_ACER_X2660G_HEADSET_MODE,
10716
+ ALC662_FIXUP_ACER_NITRO_HEADSET_MODE,
10717
+ ALC668_FIXUP_ASUS_NO_HEADSET_MIC,
10718
+ ALC668_FIXUP_HEADSET_MIC,
10719
+ ALC668_FIXUP_MIC_DET_COEF,
10720
+ ALC897_FIXUP_LENOVO_HEADSET_MIC,
10721
+ ALC897_FIXUP_HEADSET_MIC_PIN,
10722
+ ALC897_FIXUP_HP_HSMIC_VERB,
10723
+ ALC897_FIXUP_LENOVO_HEADSET_MODE,
10724
+ ALC897_FIXUP_HEADSET_MIC_PIN2,
10725
+ ALC897_FIXUP_UNIS_H3C_X500S,
855910726 };
856010727
856110728 static const struct hda_fixup alc662_fixups[] = {
....@@ -8582,6 +10749,25 @@
858210749 [ALC272_FIXUP_MARIO] = {
858310750 .type = HDA_FIXUP_FUNC,
858410751 .v.func = alc272_fixup_mario,
10752
+ },
10753
+ [ALC662_FIXUP_CZC_ET26] = {
10754
+ .type = HDA_FIXUP_PINS,
10755
+ .v.pins = (const struct hda_pintbl[]) {
10756
+ {0x12, 0x403cc000},
10757
+ {0x14, 0x90170110}, /* speaker */
10758
+ {0x15, 0x411111f0},
10759
+ {0x16, 0x411111f0},
10760
+ {0x18, 0x01a19030}, /* mic */
10761
+ {0x19, 0x90a7013f}, /* int-mic */
10762
+ {0x1a, 0x01014020},
10763
+ {0x1b, 0x0121401f},
10764
+ {0x1c, 0x411111f0},
10765
+ {0x1d, 0x411111f0},
10766
+ {0x1e, 0x40478e35},
10767
+ {}
10768
+ },
10769
+ .chained = true,
10770
+ .chain_id = ALC662_FIXUP_SKU_IGNORE
858510771 },
858610772 [ALC662_FIXUP_CZC_P10T] = {
858710773 .type = HDA_FIXUP_VERBS,
....@@ -8882,6 +11068,107 @@
888211068 .type = HDA_FIXUP_FUNC,
888311069 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
888411070 },
11071
+ [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = {
11072
+ .type = HDA_FIXUP_FUNC,
11073
+ .v.func = alc662_fixup_aspire_ethos_hp,
11074
+ },
11075
+ [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = {
11076
+ .type = HDA_FIXUP_PINS,
11077
+ .v.pins = (const struct hda_pintbl[]) {
11078
+ { 0x15, 0x92130110 }, /* front speakers */
11079
+ { 0x18, 0x99130111 }, /* center/subwoofer */
11080
+ { 0x1b, 0x11130012 }, /* surround plus jack for HP */
11081
+ { }
11082
+ },
11083
+ .chained = true,
11084
+ .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
11085
+ },
11086
+ [ALC671_FIXUP_HP_HEADSET_MIC2] = {
11087
+ .type = HDA_FIXUP_FUNC,
11088
+ .v.func = alc671_fixup_hp_headset_mic2,
11089
+ },
11090
+ [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = {
11091
+ .type = HDA_FIXUP_PINS,
11092
+ .v.pins = (const struct hda_pintbl[]) {
11093
+ { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
11094
+ { }
11095
+ },
11096
+ .chained = true,
11097
+ .chain_id = ALC662_FIXUP_USI_FUNC
11098
+ },
11099
+ [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = {
11100
+ .type = HDA_FIXUP_PINS,
11101
+ .v.pins = (const struct hda_pintbl[]) {
11102
+ { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
11103
+ { 0x1b, 0x0221144f },
11104
+ { }
11105
+ },
11106
+ .chained = true,
11107
+ .chain_id = ALC662_FIXUP_USI_FUNC
11108
+ },
11109
+ [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = {
11110
+ .type = HDA_FIXUP_PINS,
11111
+ .v.pins = (const struct hda_pintbl[]) {
11112
+ { 0x1b, 0x04a1112c },
11113
+ { }
11114
+ },
11115
+ .chained = true,
11116
+ .chain_id = ALC668_FIXUP_HEADSET_MIC
11117
+ },
11118
+ [ALC668_FIXUP_HEADSET_MIC] = {
11119
+ .type = HDA_FIXUP_FUNC,
11120
+ .v.func = alc269_fixup_headset_mic,
11121
+ .chained = true,
11122
+ .chain_id = ALC668_FIXUP_MIC_DET_COEF
11123
+ },
11124
+ [ALC668_FIXUP_MIC_DET_COEF] = {
11125
+ .type = HDA_FIXUP_VERBS,
11126
+ .v.verbs = (const struct hda_verb[]) {
11127
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 },
11128
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 },
11129
+ {}
11130
+ },
11131
+ },
11132
+ [ALC897_FIXUP_LENOVO_HEADSET_MIC] = {
11133
+ .type = HDA_FIXUP_FUNC,
11134
+ .v.func = alc897_fixup_lenovo_headset_mic,
11135
+ },
11136
+ [ALC897_FIXUP_HEADSET_MIC_PIN] = {
11137
+ .type = HDA_FIXUP_PINS,
11138
+ .v.pins = (const struct hda_pintbl[]) {
11139
+ { 0x1a, 0x03a11050 },
11140
+ { }
11141
+ },
11142
+ .chained = true,
11143
+ .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC
11144
+ },
11145
+ [ALC897_FIXUP_HP_HSMIC_VERB] = {
11146
+ .type = HDA_FIXUP_PINS,
11147
+ .v.pins = (const struct hda_pintbl[]) {
11148
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
11149
+ { }
11150
+ },
11151
+ },
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
+ },
888511172 };
888611173
888711174 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
....@@ -8893,6 +11180,9 @@
889311180 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
889411181 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC),
889511182 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
11183
+ SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS),
11184
+ SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
11185
+ SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE),
889611186 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
889711187 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
889811188 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13),
....@@ -8904,15 +11194,23 @@
890411194 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
890511195 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
890611196 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
11197
+ SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
11198
+ SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
11199
+ SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
11200
+ 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),
11202
+ SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
11203
+ SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
890711204 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
890811205 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),
8909
- SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
891011206 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50),
891111207 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751),
11208
+ SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
891211209 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
891311210 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16),
891411211 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
891511212 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51),
11213
+ SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC),
891611214 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8),
891711215 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
891811216 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
....@@ -8921,12 +11219,23 @@
892111219 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
892211220 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
892311221 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
11222
+ 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),
11224
+ SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN),
11225
+ SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
11226
+ SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
11227
+ 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),
892411231 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
892511232 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
892611233 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
892711234 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
892811235 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
11236
+ SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
892911237 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),
893011239
893111240 #if 0
893211241 /* Below is a quirk table taken from the old code.
....@@ -9013,12 +11322,15 @@
901311322 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
901411323 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
901511324 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
11325
+ {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
901611326 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
901711327 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
901811328 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
901911329 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
902011330 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
902111331 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
11332
+ {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
11333
+ {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
902211334 {}
902311335 };
902411336
....@@ -9061,6 +11373,23 @@
906111373 {0x12, 0x90a60130},
906211374 {0x14, 0x90170110},
906311375 {0x15, 0x0321101f}),
11376
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11377
+ {0x14, 0x01014010},
11378
+ {0x17, 0x90170150},
11379
+ {0x19, 0x02a11060},
11380
+ {0x1b, 0x01813030},
11381
+ {0x21, 0x02211020}),
11382
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11383
+ {0x14, 0x01014010},
11384
+ {0x18, 0x01a19040},
11385
+ {0x1b, 0x01813030},
11386
+ {0x21, 0x02211020}),
11387
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11388
+ {0x14, 0x01014020},
11389
+ {0x17, 0x90170110},
11390
+ {0x18, 0x01a19050},
11391
+ {0x1b, 0x01813040},
11392
+ {0x21, 0x02211030}),
906411393 {}
906511394 };
906611395
....@@ -9090,9 +11419,11 @@
909011419 break;
909111420 }
909211421
11422
+ alc_pre_init(codec);
11423
+
909311424 snd_hda_pick_fixup(codec, alc662_fixup_models,
909411425 alc662_fixup_tbl, alc662_fixups);
9095
- snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups);
11426
+ snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true);
909611427 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
909711428
909811429 alc_auto_parse_customize_define(codec);
....@@ -9179,6 +11510,7 @@
917911510 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
918011511 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
918111512 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
11513
+ HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269),
918211514 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
918311515 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
918411516 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
....@@ -9252,6 +11584,7 @@
925211584 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
925311585 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
925411586 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
11587
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
925511588 {} /* terminator */
925611589 };
925711590 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);