forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
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,9 @@
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;
123124
124125 /* for PLL fix */
125126 hda_nid_t pll_nid;
....@@ -133,8 +134,24 @@
133134 * COEF access helper functions
134135 */
135136
136
-static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
137
- unsigned int coef_idx)
137
+static void coef_mutex_lock(struct hda_codec *codec)
138
+{
139
+ struct alc_spec *spec = codec->spec;
140
+
141
+ snd_hda_power_up_pm(codec);
142
+ mutex_lock(&spec->coef_mutex);
143
+}
144
+
145
+static void coef_mutex_unlock(struct hda_codec *codec)
146
+{
147
+ struct alc_spec *spec = codec->spec;
148
+
149
+ mutex_unlock(&spec->coef_mutex);
150
+ snd_hda_power_down_pm(codec);
151
+}
152
+
153
+static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
154
+ unsigned int coef_idx)
138155 {
139156 unsigned int val;
140157
....@@ -143,28 +160,56 @@
143160 return val;
144161 }
145162
163
+static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
164
+ unsigned int coef_idx)
165
+{
166
+ unsigned int val;
167
+
168
+ coef_mutex_lock(codec);
169
+ val = __alc_read_coefex_idx(codec, nid, coef_idx);
170
+ coef_mutex_unlock(codec);
171
+ return val;
172
+}
173
+
146174 #define alc_read_coef_idx(codec, coef_idx) \
147175 alc_read_coefex_idx(codec, 0x20, coef_idx)
148176
149
-static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
150
- unsigned int coef_idx, unsigned int coef_val)
177
+static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
178
+ unsigned int coef_idx, unsigned int coef_val)
151179 {
152180 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx);
153181 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val);
154182 }
155183
184
+static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
185
+ unsigned int coef_idx, unsigned int coef_val)
186
+{
187
+ coef_mutex_lock(codec);
188
+ __alc_write_coefex_idx(codec, nid, coef_idx, coef_val);
189
+ coef_mutex_unlock(codec);
190
+}
191
+
156192 #define alc_write_coef_idx(codec, coef_idx, coef_val) \
157193 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val)
194
+
195
+static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
196
+ unsigned int coef_idx, unsigned int mask,
197
+ unsigned int bits_set)
198
+{
199
+ unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx);
200
+
201
+ if (val != -1)
202
+ __alc_write_coefex_idx(codec, nid, coef_idx,
203
+ (val & ~mask) | bits_set);
204
+}
158205
159206 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
160207 unsigned int coef_idx, unsigned int mask,
161208 unsigned int bits_set)
162209 {
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);
210
+ coef_mutex_lock(codec);
211
+ __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set);
212
+ coef_mutex_unlock(codec);
168213 }
169214
170215 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \
....@@ -197,13 +242,15 @@
197242 static void alc_process_coef_fw(struct hda_codec *codec,
198243 const struct coef_fw *fw)
199244 {
245
+ coef_mutex_lock(codec);
200246 for (; fw->nid; fw++) {
201247 if (fw->mask == (unsigned short)-1)
202
- alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
248
+ __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
203249 else
204
- alc_update_coefex_idx(codec, fw->nid, fw->idx,
205
- fw->mask, fw->val);
250
+ __alc_update_coefex_idx(codec, fw->nid, fw->idx,
251
+ fw->mask, fw->val);
206252 }
253
+ coef_mutex_unlock(codec);
207254 }
208255
209256 /*
....@@ -287,6 +334,13 @@
287334 const struct hda_fixup *fix, int action)
288335 {
289336 alc_fixup_gpio(codec, action, 0x04);
337
+}
338
+
339
+static void alc_fixup_micmute_led(struct hda_codec *codec,
340
+ const struct hda_fixup *fix, int action)
341
+{
342
+ if (action == HDA_FIXUP_ACT_PROBE)
343
+ snd_hda_gen_add_micmute_led_cdev(codec, NULL);
290344 }
291345
292346 /*
....@@ -376,14 +430,16 @@
376430 case 0x10ec0295:
377431 case 0x10ec0299:
378432 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
379
- /* fallthrough */
433
+ fallthrough;
380434 case 0x10ec0215:
435
+ case 0x10ec0230:
381436 case 0x10ec0233:
382437 case 0x10ec0235:
383438 case 0x10ec0236:
384439 case 0x10ec0245:
385440 case 0x10ec0255:
386441 case 0x10ec0256:
442
+ case 0x19e58326:
387443 case 0x10ec0257:
388444 case 0x10ec0282:
389445 case 0x10ec0283:
....@@ -482,10 +538,10 @@
482538 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
483539 {
484540 /* We currently only handle front, HP */
485
- static hda_nid_t pins[] = {
541
+ static const hda_nid_t pins[] = {
486542 0x0f, 0x10, 0x14, 0x15, 0x17, 0
487543 };
488
- hda_nid_t *p;
544
+ const hda_nid_t *p;
489545 for (p = pins; *p; p++)
490546 set_eapd(codec, *p, on);
491547 }
....@@ -521,6 +577,7 @@
521577 switch (codec->core.vendor_id) {
522578 case 0x10ec0236:
523579 case 0x10ec0256:
580
+ case 0x19e58326:
524581 case 0x10ec0283:
525582 case 0x10ec0286:
526583 case 0x10ec0288:
....@@ -550,7 +607,6 @@
550607 /* generic EAPD initialization */
551608 static void alc_auto_init_amp(struct hda_codec *codec, int type)
552609 {
553
- alc_fill_eapd_coef(codec);
554610 alc_auto_setup_eapd(codec, true);
555611 alc_write_gpio(codec);
556612 switch (type) {
....@@ -847,9 +903,23 @@
847903 * Common callbacks
848904 */
849905
906
+static void alc_pre_init(struct hda_codec *codec)
907
+{
908
+ alc_fill_eapd_coef(codec);
909
+}
910
+
911
+#define is_s3_resume(codec) \
912
+ ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
913
+#define is_s4_resume(codec) \
914
+ ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
915
+
850916 static int alc_init(struct hda_codec *codec)
851917 {
852918 struct alc_spec *spec = codec->spec;
919
+
920
+ /* hibernation resume needs the full chip initialization */
921
+ if (is_s4_resume(codec))
922
+ alc_pre_init(codec);
853923
854924 if (spec->init_hook)
855925 spec->init_hook(codec);
....@@ -914,7 +984,7 @@
914984 if (!spec->no_depop_delay)
915985 msleep(150); /* to avoid pop noise */
916986 codec->patch_ops.init(codec);
917
- regcache_sync(codec->core.regmap);
987
+ snd_hda_regmap_sync(codec);
918988 hda_call_check_power_status(codec, 0x01);
919989 return 0;
920990 }
....@@ -956,7 +1026,7 @@
9561026 const char *name;
9571027 };
9581028
959
-static struct alc_codec_rename_table rename_tbl[] = {
1029
+static const struct alc_codec_rename_table rename_tbl[] = {
9601030 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
9611031 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
9621032 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
....@@ -977,7 +1047,7 @@
9771047 { } /* terminator */
9781048 };
9791049
980
-static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
1050
+static const struct alc_codec_rename_pci_table rename_pci_tbl[] = {
9811051 { 0x10ec0280, 0x1028, 0, "ALC3220" },
9821052 { 0x10ec0282, 0x1028, 0, "ALC3221" },
9831053 { 0x10ec0283, 0x1028, 0, "ALC3223" },
....@@ -1065,7 +1135,7 @@
10651135 return 0;
10661136 }
10671137
1068
-static const struct snd_pci_quirk beep_white_list[] = {
1138
+static const struct snd_pci_quirk beep_allow_list[] = {
10691139 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
10701140 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
10711141 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
....@@ -1075,7 +1145,7 @@
10751145 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
10761146 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
10771147 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
1078
- /* blacklist -- no beep available */
1148
+ /* denylist -- no beep available */
10791149 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0),
10801150 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0),
10811151 {}
....@@ -1085,7 +1155,7 @@
10851155 {
10861156 struct alc_spec *spec = codec->spec;
10871157 const struct snd_pci_quirk *q;
1088
- q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list);
1158
+ q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list);
10891159 if (q)
10901160 return q->value;
10911161 return spec->cdefine.enable_pcbeep;
....@@ -1137,7 +1207,9 @@
11371207 codec->single_adc_amp = 1;
11381208 /* FIXME: do we need this for all Realtek codec models? */
11391209 codec->spdif_status_reset = 1;
1210
+ codec->forced_resume = 1;
11401211 codec->patch_ops = alc_patch_ops;
1212
+ mutex_init(&spec->coef_mutex);
11411213
11421214 err = alc_codec_rename_from_preset(codec);
11431215 if (err < 0) {
....@@ -1584,6 +1656,8 @@
15841656
15851657 codec->patch_ops.unsol_event = alc880_unsol_event;
15861658
1659
+ alc_pre_init(codec);
1660
+
15871661 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl,
15881662 alc880_fixups);
15891663 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -1835,6 +1909,8 @@
18351909
18361910 spec->shutup = alc_eapd_shutup;
18371911
1912
+ alc_pre_init(codec);
1913
+
18381914 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl,
18391915 alc260_fixups);
18401916 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -1916,6 +1992,7 @@
19161992 ALC1220_FIXUP_CLEVO_PB51ED_PINS,
19171993 ALC887_FIXUP_ASUS_AUDIO,
19181994 ALC887_FIXUP_ASUS_HMIC,
1995
+ ALCS1200A_FIXUP_MIC_VREF,
19191996 };
19201997
19211998 static void alc889_fixup_coef(struct hda_codec *codec,
....@@ -1945,19 +2022,19 @@
19452022 {
19462023 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
19472024 /* 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);
2025
+ static const hda_nid_t conn1[] = { 0x0c, 0x0d };
2026
+ static const hda_nid_t conn2[] = { 0x0e, 0x0f };
2027
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2028
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
2029
+ snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2);
2030
+ snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2);
19542031 } else if (action == HDA_FIXUP_ACT_PROBE) {
19552032 /* 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);
2033
+ static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
2034
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2035
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
2036
+ snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn);
2037
+ snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn);
19612038 }
19622039 }
19632040
....@@ -1965,8 +2042,8 @@
19652042 static void alc889_fixup_mbp_vref(struct hda_codec *codec,
19662043 const struct hda_fixup *fix, int action)
19672044 {
2045
+ static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 };
19682046 struct alc_spec *spec = codec->spec;
1969
- static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 };
19702047 int i;
19712048
19722049 if (action != HDA_FIXUP_ACT_INIT)
....@@ -2002,7 +2079,7 @@
20022079 static void alc889_fixup_imac91_vref(struct hda_codec *codec,
20032080 const struct hda_fixup *fix, int action)
20042081 {
2005
- static hda_nid_t nids[2] = { 0x18, 0x1a };
2082
+ static const hda_nid_t nids[] = { 0x18, 0x1a };
20062083
20072084 if (action == HDA_FIXUP_ACT_INIT)
20082085 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2012,7 +2089,7 @@
20122089 static void alc889_fixup_mba11_vref(struct hda_codec *codec,
20132090 const struct hda_fixup *fix, int action)
20142091 {
2015
- static hda_nid_t nids[1] = { 0x18 };
2092
+ static const hda_nid_t nids[] = { 0x18 };
20162093
20172094 if (action == HDA_FIXUP_ACT_INIT)
20182095 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2022,7 +2099,7 @@
20222099 static void alc889_fixup_mba21_vref(struct hda_codec *codec,
20232100 const struct hda_fixup *fix, int action)
20242101 {
2025
- static hda_nid_t nids[2] = { 0x18, 0x19 };
2102
+ static const hda_nid_t nids[] = { 0x18, 0x19 };
20262103
20272104 if (action == HDA_FIXUP_ACT_INIT)
20282105 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
....@@ -2128,7 +2205,7 @@
21282205 const struct hda_fixup *fix,
21292206 int action)
21302207 {
2131
- hda_nid_t conn1[1] = { 0x0c };
2208
+ static const hda_nid_t conn1[] = { 0x0c };
21322209
21332210 if (action != HDA_FIXUP_ACT_PRE_PROBE)
21342211 return;
....@@ -2137,8 +2214,8 @@
21372214 /* We therefore want to make sure 0x14 (front headphone) and
21382215 * 0x1b (speakers) use the stereo DAC 0x02
21392216 */
2140
- snd_hda_override_conn_list(codec, 0x14, 1, conn1);
2141
- snd_hda_override_conn_list(codec, 0x1b, 1, conn1);
2217
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2218
+ snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
21422219 }
21432220
21442221 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
....@@ -2461,6 +2538,14 @@
24612538 .chained = true,
24622539 .chain_id = ALC887_FIXUP_ASUS_AUDIO,
24632540 },
2541
+ [ALCS1200A_FIXUP_MIC_VREF] = {
2542
+ .type = HDA_FIXUP_PINCTLS,
2543
+ .v.pins = (const struct hda_pintbl[]) {
2544
+ { 0x18, PIN_VREF50 }, /* rear mic */
2545
+ { 0x19, PIN_VREF50 }, /* front mic */
2546
+ {}
2547
+ }
2548
+ },
24642549 };
24652550
24662551 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
....@@ -2498,6 +2583,7 @@
24982583 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
24992584 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
25002585 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
2586
+ SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
25012587 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
25022588 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
25032589 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
....@@ -2552,10 +2638,12 @@
25522638 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25532639 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25542640 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2641
+ SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25552642 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25562643 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25572644 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25582645 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2646
+ SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25592647 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25602648 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25612649 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
....@@ -2614,6 +2702,28 @@
26142702 {}
26152703 };
26162704
2705
+static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = {
2706
+ SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950,
2707
+ {0x14, 0x01014010},
2708
+ {0x15, 0x01011012},
2709
+ {0x16, 0x01016011},
2710
+ {0x18, 0x01a19040},
2711
+ {0x19, 0x02a19050},
2712
+ {0x1a, 0x0181304f},
2713
+ {0x1b, 0x0221401f},
2714
+ {0x1e, 0x01456130}),
2715
+ SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2716
+ {0x14, 0x01015010},
2717
+ {0x15, 0x01011012},
2718
+ {0x16, 0x01011011},
2719
+ {0x18, 0x01a11040},
2720
+ {0x19, 0x02a19050},
2721
+ {0x1a, 0x0181104f},
2722
+ {0x1b, 0x0221401f},
2723
+ {0x1e, 0x01451130}),
2724
+ {}
2725
+};
2726
+
26172727 /*
26182728 * BIOS auto configuration
26192729 */
....@@ -2651,8 +2761,11 @@
26512761 break;
26522762 }
26532763
2764
+ alc_pre_init(codec);
2765
+
26542766 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
26552767 alc882_fixups);
2768
+ snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true);
26562769 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
26572770
26582771 alc_auto_parse_customize_define(codec);
....@@ -2825,6 +2938,8 @@
28252938 #endif
28262939 alc_fix_pll_init(codec, 0x20, 0x0a, 10);
28272940
2941
+ alc_pre_init(codec);
2942
+
28282943 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl,
28292944 alc262_fixups);
28302945 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -2965,9 +3080,12 @@
29653080 return err;
29663081
29673082 spec = codec->spec;
2968
- spec->gen.beep_nid = 0x01;
3083
+ if (has_cdefine_beep(codec))
3084
+ spec->gen.beep_nid = 0x01;
29693085
29703086 spec->shutup = alc_eapd_shutup;
3087
+
3088
+ alc_pre_init(codec);
29713089
29723090 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups);
29733091 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -3085,6 +3203,113 @@
30853203 return alc_parse_auto_config(codec, alc269_ignore, ssids);
30863204 }
30873205
3206
+static const struct hda_jack_keymap alc_headset_btn_keymap[] = {
3207
+ { SND_JACK_BTN_0, KEY_PLAYPAUSE },
3208
+ { SND_JACK_BTN_1, KEY_VOICECOMMAND },
3209
+ { SND_JACK_BTN_2, KEY_VOLUMEUP },
3210
+ { SND_JACK_BTN_3, KEY_VOLUMEDOWN },
3211
+ {}
3212
+};
3213
+
3214
+static void alc_headset_btn_callback(struct hda_codec *codec,
3215
+ struct hda_jack_callback *jack)
3216
+{
3217
+ int report = 0;
3218
+
3219
+ if (jack->unsol_res & (7 << 13))
3220
+ report |= SND_JACK_BTN_0;
3221
+
3222
+ if (jack->unsol_res & (1 << 16 | 3 << 8))
3223
+ report |= SND_JACK_BTN_1;
3224
+
3225
+ /* Volume up key */
3226
+ if (jack->unsol_res & (7 << 23))
3227
+ report |= SND_JACK_BTN_2;
3228
+
3229
+ /* Volume down key */
3230
+ if (jack->unsol_res & (7 << 10))
3231
+ report |= SND_JACK_BTN_3;
3232
+
3233
+ jack->jack->button_state = report;
3234
+}
3235
+
3236
+static void alc_disable_headset_jack_key(struct hda_codec *codec)
3237
+{
3238
+ struct alc_spec *spec = codec->spec;
3239
+
3240
+ if (!spec->has_hs_key)
3241
+ return;
3242
+
3243
+ switch (codec->core.vendor_id) {
3244
+ case 0x10ec0215:
3245
+ case 0x10ec0225:
3246
+ case 0x10ec0285:
3247
+ case 0x10ec0287:
3248
+ case 0x10ec0295:
3249
+ case 0x10ec0289:
3250
+ case 0x10ec0299:
3251
+ alc_write_coef_idx(codec, 0x48, 0x0);
3252
+ alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3253
+ alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
3254
+ break;
3255
+ case 0x10ec0230:
3256
+ case 0x10ec0236:
3257
+ case 0x10ec0256:
3258
+ case 0x19e58326:
3259
+ alc_write_coef_idx(codec, 0x48, 0x0);
3260
+ alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
3261
+ break;
3262
+ }
3263
+}
3264
+
3265
+static void alc_enable_headset_jack_key(struct hda_codec *codec)
3266
+{
3267
+ struct alc_spec *spec = codec->spec;
3268
+
3269
+ if (!spec->has_hs_key)
3270
+ return;
3271
+
3272
+ switch (codec->core.vendor_id) {
3273
+ case 0x10ec0215:
3274
+ case 0x10ec0225:
3275
+ case 0x10ec0285:
3276
+ case 0x10ec0287:
3277
+ case 0x10ec0295:
3278
+ case 0x10ec0289:
3279
+ case 0x10ec0299:
3280
+ alc_write_coef_idx(codec, 0x48, 0xd011);
3281
+ alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3282
+ alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
3283
+ break;
3284
+ case 0x10ec0230:
3285
+ case 0x10ec0236:
3286
+ case 0x10ec0256:
3287
+ case 0x19e58326:
3288
+ alc_write_coef_idx(codec, 0x48, 0xd011);
3289
+ alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
3290
+ break;
3291
+ }
3292
+}
3293
+
3294
+static void alc_fixup_headset_jack(struct hda_codec *codec,
3295
+ const struct hda_fixup *fix, int action)
3296
+{
3297
+ struct alc_spec *spec = codec->spec;
3298
+
3299
+ switch (action) {
3300
+ case HDA_FIXUP_ACT_PRE_PROBE:
3301
+ spec->has_hs_key = 1;
3302
+ snd_hda_jack_detect_enable_callback(codec, 0x55,
3303
+ alc_headset_btn_callback);
3304
+ snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false,
3305
+ SND_JACK_HEADSET, alc_headset_btn_keymap);
3306
+ break;
3307
+ case HDA_FIXUP_ACT_INIT:
3308
+ alc_enable_headset_jack_key(codec);
3309
+ break;
3310
+ }
3311
+}
3312
+
30883313 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
30893314 {
30903315 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0);
....@@ -3103,7 +3328,7 @@
31033328 alc_shutup_pins(codec);
31043329 }
31053330
3106
-static struct coef_fw alc282_coefs[] = {
3331
+static const struct coef_fw alc282_coefs[] = {
31073332 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
31083333 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
31093334 WRITE_COEF(0x07, 0x0200), /* DMIC control */
....@@ -3215,7 +3440,7 @@
32153440 alc_write_coef_idx(codec, 0x78, coef78);
32163441 }
32173442
3218
-static struct coef_fw alc283_coefs[] = {
3443
+static const struct coef_fw alc283_coefs[] = {
32193444 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
32203445 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
32213446 WRITE_COEF(0x07, 0x0200), /* DMIC control */
....@@ -3337,7 +3562,7 @@
33373562 bool hp_pin_sense;
33383563
33393564 if (!hp_pin)
3340
- return;
3565
+ hp_pin = 0x21;
33413566
33423567 msleep(30);
33433568
....@@ -3347,17 +3572,25 @@
33473572 msleep(2);
33483573
33493574 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3575
+ if (spec->ultra_low_power) {
3576
+ alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
3577
+ alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
3578
+ alc_update_coef_idx(codec, 0x08, 7<<4, 0);
3579
+ alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
3580
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3581
+ msleep(30);
3582
+ }
33503583
33513584 snd_hda_codec_write(codec, hp_pin, 0,
33523585 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
33533586
3354
- if (hp_pin_sense)
3587
+ if (hp_pin_sense || spec->ultra_low_power)
33553588 msleep(85);
33563589
33573590 snd_hda_codec_write(codec, hp_pin, 0,
33583591 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
33593592
3360
- if (hp_pin_sense)
3593
+ if (hp_pin_sense || spec->ultra_low_power)
33613594 msleep(100);
33623595
33633596 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
....@@ -3379,10 +3612,8 @@
33793612 hda_nid_t hp_pin = alc_get_hp_pin(spec);
33803613 bool hp_pin_sense;
33813614
3382
- if (!hp_pin) {
3383
- alc269_shutup(codec);
3384
- return;
3385
- }
3615
+ if (!hp_pin)
3616
+ hp_pin = 0x21;
33863617
33873618 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
33883619
....@@ -3392,7 +3623,7 @@
33923623 snd_hda_codec_write(codec, hp_pin, 0,
33933624 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
33943625
3395
- if (hp_pin_sense)
3626
+ if (hp_pin_sense || spec->ultra_low_power)
33963627 msleep(85);
33973628
33983629 /* 3k pull low control for Headset jack. */
....@@ -3400,19 +3631,28 @@
34003631 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
34013632 * when booting with headset plugged. So skip setting it for the codec alc257
34023633 */
3403
- if (spec->codec_variant != ALC269_TYPE_ALC257 &&
3404
- spec->codec_variant != ALC269_TYPE_ALC256)
3634
+ if (codec->core.vendor_id != 0x10ec0236 &&
3635
+ codec->core.vendor_id != 0x10ec0257)
34053636 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
34063637
34073638 if (!spec->no_shutup_pins)
34083639 snd_hda_codec_write(codec, hp_pin, 0,
34093640 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34103641
3411
- if (hp_pin_sense)
3642
+ if (hp_pin_sense || spec->ultra_low_power)
34123643 msleep(100);
34133644
34143645 alc_auto_setup_eapd(codec, false);
34153646 alc_shutup_pins(codec);
3647
+ if (spec->ultra_low_power) {
3648
+ msleep(50);
3649
+ alc_update_coef_idx(codec, 0x03, 1<<1, 0);
3650
+ alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4);
3651
+ alc_update_coef_idx(codec, 0x08, 3<<2, 0);
3652
+ alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15);
3653
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3654
+ msleep(30);
3655
+ }
34163656 }
34173657
34183658 static void alc225_init(struct hda_codec *codec)
....@@ -3422,8 +3662,7 @@
34223662 bool hp1_pin_sense, hp2_pin_sense;
34233663
34243664 if (!hp_pin)
3425
- return;
3426
-
3665
+ hp_pin = 0x21;
34273666 msleep(30);
34283667
34293668 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
....@@ -3433,25 +3672,31 @@
34333672 msleep(2);
34343673
34353674 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
3675
+ if (spec->ultra_low_power) {
3676
+ alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
3677
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
3678
+ alc_update_coef_idx(codec, 0x33, 1<<11, 0);
3679
+ msleep(30);
3680
+ }
34363681
3437
- if (hp1_pin_sense)
3682
+ if (hp1_pin_sense || spec->ultra_low_power)
34383683 snd_hda_codec_write(codec, hp_pin, 0,
34393684 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34403685 if (hp2_pin_sense)
34413686 snd_hda_codec_write(codec, 0x16, 0,
34423687 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34433688
3444
- if (hp1_pin_sense || hp2_pin_sense)
3689
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34453690 msleep(85);
34463691
3447
- if (hp1_pin_sense)
3692
+ if (hp1_pin_sense || spec->ultra_low_power)
34483693 snd_hda_codec_write(codec, hp_pin, 0,
34493694 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
34503695 if (hp2_pin_sense)
34513696 snd_hda_codec_write(codec, 0x16, 0,
34523697 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
34533698
3454
- if (hp1_pin_sense || hp2_pin_sense)
3699
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34553700 msleep(100);
34563701
34573702 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
....@@ -3464,11 +3709,10 @@
34643709 hda_nid_t hp_pin = alc_get_hp_pin(spec);
34653710 bool hp1_pin_sense, hp2_pin_sense;
34663711
3467
- if (!hp_pin) {
3468
- alc269_shutup(codec);
3469
- return;
3470
- }
3712
+ if (!hp_pin)
3713
+ hp_pin = 0x21;
34713714
3715
+ alc_disable_headset_jack_key(codec);
34723716 /* 3k pull low control for Headset jack. */
34733717 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);
34743718
....@@ -3478,28 +3722,39 @@
34783722 if (hp1_pin_sense || hp2_pin_sense)
34793723 msleep(2);
34803724
3481
- if (hp1_pin_sense)
3725
+ if (hp1_pin_sense || spec->ultra_low_power)
34823726 snd_hda_codec_write(codec, hp_pin, 0,
34833727 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34843728 if (hp2_pin_sense)
34853729 snd_hda_codec_write(codec, 0x16, 0,
34863730 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
34873731
3488
- if (hp1_pin_sense || hp2_pin_sense)
3732
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34893733 msleep(85);
34903734
3491
- if (hp1_pin_sense)
3735
+ if (hp1_pin_sense || spec->ultra_low_power)
34923736 snd_hda_codec_write(codec, hp_pin, 0,
34933737 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34943738 if (hp2_pin_sense)
34953739 snd_hda_codec_write(codec, 0x16, 0,
34963740 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
34973741
3498
- if (hp1_pin_sense || hp2_pin_sense)
3742
+ if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
34993743 msleep(100);
35003744
35013745 alc_auto_setup_eapd(codec, false);
35023746 alc_shutup_pins(codec);
3747
+ if (spec->ultra_low_power) {
3748
+ msleep(50);
3749
+ alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2);
3750
+ alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
3751
+ alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11);
3752
+ alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4);
3753
+ msleep(30);
3754
+ }
3755
+
3756
+ alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
3757
+ alc_enable_headset_jack_key(codec);
35033758 }
35043759
35053760 static void alc_default_init(struct hda_codec *codec)
....@@ -3694,8 +3949,8 @@
36943949 }
36953950
36963951 #ifdef HALT_REALTEK_ALC5505
3697
-#define alc5505_dsp_suspend(codec) /* NOP */
3698
-#define alc5505_dsp_resume(codec) /* NOP */
3952
+#define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
3953
+#define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
36993954 #else
37003955 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
37013956 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
....@@ -3731,7 +3986,7 @@
37313986 msleep(200);
37323987 }
37333988
3734
- regcache_sync(codec->core.regmap);
3989
+ snd_hda_regmap_sync(codec);
37353990 hda_call_check_power_status(codec, 0x01);
37363991
37373992 /* on some machine, the BIOS will clear the codec gpio data when enter
....@@ -3804,6 +4059,15 @@
38044059 snd_hda_sequence_write(codec, verbs);
38054060 }
38064061
4062
+/* Fix the speaker amp after resume, etc */
4063
+static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
4064
+ const struct hda_fixup *fix,
4065
+ int action)
4066
+{
4067
+ if (action == HDA_FIXUP_ACT_INIT)
4068
+ alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
4069
+}
4070
+
38074071 static void alc269_fixup_pcm_44k(struct hda_codec *codec,
38084072 const struct hda_fixup *fix, int action)
38094073 {
....@@ -3865,6 +4129,72 @@
38654129 vref);
38664130 }
38674131
4132
+/*
4133
+ * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
4134
+ */
4135
+struct hda_alc298_mbxinit {
4136
+ unsigned char value_0x23;
4137
+ unsigned char value_0x25;
4138
+};
4139
+
4140
+static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
4141
+ const struct hda_alc298_mbxinit *initval,
4142
+ bool first)
4143
+{
4144
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0);
4145
+ alc_write_coef_idx(codec, 0x26, 0xb000);
4146
+
4147
+ if (first)
4148
+ snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0);
4149
+
4150
+ snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4151
+ alc_write_coef_idx(codec, 0x26, 0xf000);
4152
+ alc_write_coef_idx(codec, 0x23, initval->value_0x23);
4153
+
4154
+ if (initval->value_0x23 != 0x1e)
4155
+ alc_write_coef_idx(codec, 0x25, initval->value_0x25);
4156
+
4157
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4158
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4159
+}
4160
+
4161
+static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
4162
+ const struct hda_fixup *fix,
4163
+ int action)
4164
+{
4165
+ /* Initialization magic */
4166
+ static const struct hda_alc298_mbxinit dac_init[] = {
4167
+ {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
4168
+ {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
4169
+ {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
4170
+ {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
4171
+ {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
4172
+ {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
4173
+ {0x2f, 0x00},
4174
+ {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
4175
+ {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
4176
+ {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
4177
+ {}
4178
+ };
4179
+ const struct hda_alc298_mbxinit *seq;
4180
+
4181
+ if (action != HDA_FIXUP_ACT_INIT)
4182
+ return;
4183
+
4184
+ /* Start */
4185
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00);
4186
+ snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
4187
+ alc_write_coef_idx(codec, 0x26, 0xf000);
4188
+ alc_write_coef_idx(codec, 0x22, 0x31);
4189
+ alc_write_coef_idx(codec, 0x23, 0x0b);
4190
+ alc_write_coef_idx(codec, 0x25, 0x00);
4191
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
4192
+ snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
4193
+
4194
+ for (seq = dac_init; seq->value_0x23; seq++)
4195
+ alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init);
4196
+}
4197
+
38684198 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
38694199 const struct hda_fixup *fix, int action)
38704200 {
....@@ -3875,25 +4205,34 @@
38754205 }
38764206 }
38774207
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)
4208
+static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
4209
+ bool polarity, bool on)
38814210 {
3882
- struct hda_codec *codec = private_data;
3883
- struct alc_spec *spec = codec->spec;
38844211 unsigned int pinval;
38854212
3886
- if (spec->mute_led_polarity)
3887
- enabled = !enabled;
3888
- pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
4213
+ if (!pin)
4214
+ return;
4215
+ if (polarity)
4216
+ on = !on;
4217
+ pinval = snd_hda_codec_get_pin_target(codec, pin);
38894218 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
- }
4219
+ pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
4220
+ /* temporarily power up/down for setting VREF */
4221
+ snd_hda_power_up_pm(codec);
4222
+ snd_hda_set_pin_ctl_cache(codec, pin, pinval);
4223
+ snd_hda_power_down_pm(codec);
4224
+}
4225
+
4226
+/* update mute-LED according to the speaker mute state via mic VREF pin */
4227
+static int vref_mute_led_set(struct led_classdev *led_cdev,
4228
+ enum led_brightness brightness)
4229
+{
4230
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4231
+ struct alc_spec *spec = codec->spec;
4232
+
4233
+ alc_update_vref_led(codec, spec->mute_led_nid,
4234
+ spec->mute_led_polarity, brightness);
4235
+ return 0;
38974236 }
38984237
38994238 /* Make sure the led works even in runtime suspend */
....@@ -3931,8 +4270,7 @@
39314270 break;
39324271 spec->mute_led_polarity = pol;
39334272 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;
4273
+ snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
39364274 codec->power_filter = led_power_filter;
39374275 codec_dbg(codec,
39384276 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
....@@ -3950,8 +4288,7 @@
39504288 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
39514289 spec->mute_led_polarity = 0;
39524290 spec->mute_led_nid = pin;
3953
- spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook;
3954
- spec->gen.vmaster_mute_enum = 1;
4291
+ snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
39554292 codec->power_filter = led_power_filter;
39564293 }
39574294 }
....@@ -3984,23 +4321,27 @@
39844321 }
39854322
39864323 /* turn on/off mute LED via GPIO per vmaster hook */
3987
-static void alc_fixup_gpio_mute_hook(void *private_data, int enabled)
4324
+static int gpio_mute_led_set(struct led_classdev *led_cdev,
4325
+ enum led_brightness brightness)
39884326 {
3989
- struct hda_codec *codec = private_data;
4327
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
39904328 struct alc_spec *spec = codec->spec;
39914329
39924330 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
3993
- spec->mute_led_polarity, enabled);
4331
+ spec->mute_led_polarity, !brightness);
4332
+ return 0;
39944333 }
39954334
39964335 /* turn on/off mic-mute LED via GPIO per capture hook */
3997
-static void alc_gpio_micmute_update(struct hda_codec *codec)
4336
+static int micmute_led_set(struct led_classdev *led_cdev,
4337
+ enum led_brightness brightness)
39984338 {
4339
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
39994340 struct alc_spec *spec = codec->spec;
40004341
40014342 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4002
- spec->micmute_led_polarity,
4003
- spec->gen.micmute_led.led_value);
4343
+ spec->micmute_led_polarity, !brightness);
4344
+ return 0;
40044345 }
40054346
40064347 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
....@@ -4017,12 +4358,18 @@
40174358 return;
40184359 if (mute_mask) {
40194360 spec->gpio_mute_led_mask = mute_mask;
4020
- spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
4361
+ snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set);
40214362 }
40224363 if (micmute_mask) {
40234364 spec->gpio_mic_led_mask = micmute_mask;
4024
- snd_hda_gen_add_micmute_led(codec, alc_gpio_micmute_update);
4365
+ snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set);
40254366 }
4367
+}
4368
+
4369
+static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
4370
+ const struct hda_fixup *fix, int action)
4371
+{
4372
+ alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
40264373 }
40274374
40284375 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
....@@ -4034,10 +4381,6 @@
40344381 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
40354382 const struct hda_fixup *fix, int action)
40364383 {
4037
- struct alc_spec *spec = codec->spec;
4038
-
4039
- spec->micmute_led_polarity = 1;
4040
-
40414384 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
40424385 }
40434386
....@@ -4047,21 +4390,32 @@
40474390 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20);
40484391 }
40494392
4050
-/* turn on/off mic-mute LED per capture hook */
4051
-static void alc_cap_micmute_update(struct hda_codec *codec)
4393
+static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
4394
+ const struct hda_fixup *fix, int action)
4395
+{
4396
+ alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
4397
+}
4398
+
4399
+static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
4400
+ const struct hda_fixup *fix, int action)
40524401 {
40534402 struct alc_spec *spec = codec->spec;
4054
- unsigned int pinval;
40554403
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);
4404
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
4405
+ spec->micmute_led_polarity = 1;
4406
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4407
+}
4408
+
4409
+/* turn on/off mic-mute LED per capture hook via VREF change */
4410
+static int vref_micmute_led_set(struct led_classdev *led_cdev,
4411
+ enum led_brightness brightness)
4412
+{
4413
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4414
+ struct alc_spec *spec = codec->spec;
4415
+
4416
+ alc_update_vref_led(codec, spec->cap_mute_led_nid,
4417
+ spec->micmute_led_polarity, brightness);
4418
+ return 0;
40654419 }
40664420
40674421 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
....@@ -4077,7 +4431,7 @@
40774431 spec->gpio_mask |= 0x10;
40784432 spec->gpio_dir |= 0x10;
40794433 spec->cap_mute_led_nid = 0x18;
4080
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4434
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
40814435 codec->power_filter = led_power_filter;
40824436 }
40834437 }
....@@ -4090,8 +4444,229 @@
40904444 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
40914445 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
40924446 spec->cap_mute_led_nid = 0x18;
4093
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4447
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
40944448 codec->power_filter = led_power_filter;
4449
+ }
4450
+}
4451
+
4452
+/* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
4453
+ * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
4454
+ */
4455
+static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
4456
+ const struct hda_fixup *fix, int action)
4457
+{
4458
+ struct alc_spec *spec = codec->spec;
4459
+
4460
+ switch (action) {
4461
+ case HDA_FIXUP_ACT_PRE_PROBE:
4462
+ spec->gpio_mask |= 0x01;
4463
+ spec->gpio_dir |= 0x01;
4464
+ break;
4465
+ case HDA_FIXUP_ACT_INIT:
4466
+ /* need to toggle GPIO to enable the amp */
4467
+ alc_update_gpio_data(codec, 0x01, true);
4468
+ msleep(100);
4469
+ alc_update_gpio_data(codec, 0x01, false);
4470
+ break;
4471
+ }
4472
+}
4473
+
4474
+/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4475
+static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
4476
+ struct hda_codec *codec,
4477
+ struct snd_pcm_substream *substream,
4478
+ int action)
4479
+{
4480
+ switch (action) {
4481
+ case HDA_GEN_PCM_ACT_PREPARE:
4482
+ alc_update_gpio_data(codec, 0x04, true);
4483
+ break;
4484
+ case HDA_GEN_PCM_ACT_CLEANUP:
4485
+ alc_update_gpio_data(codec, 0x04, false);
4486
+ break;
4487
+ }
4488
+}
4489
+
4490
+static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
4491
+ const struct hda_fixup *fix,
4492
+ int action)
4493
+{
4494
+ struct alc_spec *spec = codec->spec;
4495
+
4496
+ if (action == HDA_FIXUP_ACT_PROBE) {
4497
+ spec->gpio_mask |= 0x04;
4498
+ spec->gpio_dir |= 0x04;
4499
+ spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4500
+ }
4501
+}
4502
+
4503
+static void alc_update_coef_led(struct hda_codec *codec,
4504
+ struct alc_coef_led *led,
4505
+ bool polarity, bool on)
4506
+{
4507
+ if (polarity)
4508
+ on = !on;
4509
+ /* temporarily power up/down for setting COEF bit */
4510
+ alc_update_coef_idx(codec, led->idx, led->mask,
4511
+ on ? led->on : led->off);
4512
+}
4513
+
4514
+/* update mute-LED according to the speaker mute state via COEF bit */
4515
+static int coef_mute_led_set(struct led_classdev *led_cdev,
4516
+ enum led_brightness brightness)
4517
+{
4518
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4519
+ struct alc_spec *spec = codec->spec;
4520
+
4521
+ alc_update_coef_led(codec, &spec->mute_led_coef,
4522
+ spec->mute_led_polarity, brightness);
4523
+ return 0;
4524
+}
4525
+
4526
+static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4527
+ const struct hda_fixup *fix,
4528
+ int action)
4529
+{
4530
+ struct alc_spec *spec = codec->spec;
4531
+
4532
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4533
+ spec->mute_led_polarity = 0;
4534
+ spec->mute_led_coef.idx = 0x0b;
4535
+ spec->mute_led_coef.mask = 1 << 3;
4536
+ spec->mute_led_coef.on = 1 << 3;
4537
+ spec->mute_led_coef.off = 0;
4538
+ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4539
+ }
4540
+}
4541
+
4542
+static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
4543
+ const struct hda_fixup *fix,
4544
+ int action)
4545
+{
4546
+ struct alc_spec *spec = codec->spec;
4547
+
4548
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4549
+ spec->mute_led_polarity = 0;
4550
+ spec->mute_led_coef.idx = 0x34;
4551
+ spec->mute_led_coef.mask = 1 << 5;
4552
+ spec->mute_led_coef.on = 0;
4553
+ spec->mute_led_coef.off = 1 << 5;
4554
+ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4555
+ }
4556
+}
4557
+
4558
+/* turn on/off mic-mute LED per capture hook by coef bit */
4559
+static int coef_micmute_led_set(struct led_classdev *led_cdev,
4560
+ enum led_brightness brightness)
4561
+{
4562
+ struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4563
+ struct alc_spec *spec = codec->spec;
4564
+
4565
+ alc_update_coef_led(codec, &spec->mic_led_coef,
4566
+ spec->micmute_led_polarity, brightness);
4567
+ return 0;
4568
+}
4569
+
4570
+static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4571
+ const struct hda_fixup *fix, int action)
4572
+{
4573
+ struct alc_spec *spec = codec->spec;
4574
+
4575
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4576
+ spec->mic_led_coef.idx = 0x19;
4577
+ spec->mic_led_coef.mask = 1 << 13;
4578
+ spec->mic_led_coef.on = 1 << 13;
4579
+ spec->mic_led_coef.off = 0;
4580
+ snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4581
+ }
4582
+}
4583
+
4584
+static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
4585
+ const struct hda_fixup *fix, int action)
4586
+{
4587
+ struct alc_spec *spec = codec->spec;
4588
+
4589
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4590
+ spec->mic_led_coef.idx = 0x35;
4591
+ spec->mic_led_coef.mask = 3 << 2;
4592
+ spec->mic_led_coef.on = 2 << 2;
4593
+ spec->mic_led_coef.off = 1 << 2;
4594
+ snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
4595
+ }
4596
+}
4597
+
4598
+static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
4599
+ const struct hda_fixup *fix, int action)
4600
+{
4601
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4602
+ alc285_fixup_hp_coef_micmute_led(codec, fix, action);
4603
+}
4604
+
4605
+static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
4606
+ const struct hda_fixup *fix, int action)
4607
+{
4608
+ alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4609
+ alc236_fixup_hp_coef_micmute_led(codec, fix, action);
4610
+}
4611
+
4612
+static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
4613
+ const struct hda_fixup *fix, int action)
4614
+{
4615
+ struct alc_spec *spec = codec->spec;
4616
+
4617
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4618
+ spec->cap_mute_led_nid = 0x1a;
4619
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
4620
+ codec->power_filter = led_power_filter;
4621
+ }
4622
+}
4623
+
4624
+static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
4625
+ const struct hda_fixup *fix, int action)
4626
+{
4627
+ alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
4628
+ alc236_fixup_hp_micmute_led_vref(codec, fix, action);
4629
+}
4630
+
4631
+static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
4632
+ const unsigned short coefs[2])
4633
+{
4634
+ alc_write_coef_idx(codec, 0x23, coefs[0]);
4635
+ alc_write_coef_idx(codec, 0x25, coefs[1]);
4636
+ alc_write_coef_idx(codec, 0x26, 0xb011);
4637
+}
4638
+
4639
+struct alc298_samsung_amp_desc {
4640
+ unsigned char nid;
4641
+ unsigned short init_seq[2][2];
4642
+};
4643
+
4644
+static void alc298_fixup_samsung_amp(struct hda_codec *codec,
4645
+ const struct hda_fixup *fix, int action)
4646
+{
4647
+ int i, j;
4648
+ static const unsigned short init_seq[][2] = {
4649
+ { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
4650
+ { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
4651
+ { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
4652
+ { 0x41, 0x07 }, { 0x400, 0x1 }
4653
+ };
4654
+ static const struct alc298_samsung_amp_desc amps[] = {
4655
+ { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
4656
+ { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
4657
+ };
4658
+
4659
+ if (action != HDA_FIXUP_ACT_INIT)
4660
+ return;
4661
+
4662
+ for (i = 0; i < ARRAY_SIZE(amps); i++) {
4663
+ alc_write_coef_idx(codec, 0x22, amps[i].nid);
4664
+
4665
+ for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++)
4666
+ alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]);
4667
+
4668
+ for (j = 0; j < ARRAY_SIZE(init_seq); j++)
4669
+ alc298_samsung_write_coef_pack(codec, init_seq[j]);
40954670 }
40964671 }
40974672
....@@ -4184,7 +4759,6 @@
41844759 {
41854760 struct alc_spec *spec = codec->spec;
41864761
4187
- spec->micmute_led_polarity = 1;
41884762 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
41894763 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
41904764 spec->init_amp = ALC_INIT_DEFAULT;
....@@ -4218,11 +4792,11 @@
42184792 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a);
42194793 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
42204794 spec->cap_mute_led_nid = 0x18;
4221
- snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update);
4795
+ snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
42224796 }
42234797 }
42244798
4225
-static struct coef_fw alc225_pre_hsmode[] = {
4799
+static const struct coef_fw alc225_pre_hsmode[] = {
42264800 UPDATE_COEF(0x4a, 1<<8, 0),
42274801 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
42284802 UPDATE_COEF(0x63, 3<<14, 3<<14),
....@@ -4235,7 +4809,8 @@
42354809
42364810 static void alc_headset_mode_unplugged(struct hda_codec *codec)
42374811 {
4238
- static struct coef_fw coef0255[] = {
4812
+ struct alc_spec *spec = codec->spec;
4813
+ static const struct coef_fw coef0255[] = {
42394814 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
42404815 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
42414816 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
....@@ -4243,7 +4818,7 @@
42434818 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
42444819 {}
42454820 };
4246
- static struct coef_fw coef0256[] = {
4821
+ static const struct coef_fw coef0256[] = {
42474822 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
42484823 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
42494824 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
....@@ -4251,7 +4826,7 @@
42514826 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
42524827 {}
42534828 };
4254
- static struct coef_fw coef0233[] = {
4829
+ static const struct coef_fw coef0233[] = {
42554830 WRITE_COEF(0x1b, 0x0c0b),
42564831 WRITE_COEF(0x45, 0xc429),
42574832 UPDATE_COEF(0x35, 0x4000, 0),
....@@ -4261,7 +4836,7 @@
42614836 WRITE_COEF(0x32, 0x42a3),
42624837 {}
42634838 };
4264
- static struct coef_fw coef0288[] = {
4839
+ static const struct coef_fw coef0288[] = {
42654840 UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
42664841 UPDATE_COEF(0x50, 0x2000, 0x2000),
42674842 UPDATE_COEF(0x56, 0x0006, 0x0006),
....@@ -4269,18 +4844,18 @@
42694844 UPDATE_COEF(0x67, 0x2000, 0),
42704845 {}
42714846 };
4272
- static struct coef_fw coef0298[] = {
4847
+ static const struct coef_fw coef0298[] = {
42734848 UPDATE_COEF(0x19, 0x1300, 0x0300),
42744849 {}
42754850 };
4276
- static struct coef_fw coef0292[] = {
4851
+ static const struct coef_fw coef0292[] = {
42774852 WRITE_COEF(0x76, 0x000e),
42784853 WRITE_COEF(0x6c, 0x2400),
42794854 WRITE_COEF(0x18, 0x7308),
42804855 WRITE_COEF(0x6b, 0xc429),
42814856 {}
42824857 };
4283
- static struct coef_fw coef0293[] = {
4858
+ static const struct coef_fw coef0293[] = {
42844859 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
42854860 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
42864861 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
....@@ -4289,16 +4864,16 @@
42894864 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
42904865 {}
42914866 };
4292
- static struct coef_fw coef0668[] = {
4867
+ static const struct coef_fw coef0668[] = {
42934868 WRITE_COEF(0x15, 0x0d40),
42944869 WRITE_COEF(0xb7, 0x802b),
42954870 {}
42964871 };
4297
- static struct coef_fw coef0225[] = {
4872
+ static const struct coef_fw coef0225[] = {
42984873 UPDATE_COEF(0x63, 3<<14, 0),
42994874 {}
43004875 };
4301
- static struct coef_fw coef0274[] = {
4876
+ static const struct coef_fw coef0274[] = {
43024877 UPDATE_COEF(0x4a, 0x0100, 0),
43034878 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
43044879 UPDATE_COEF(0x6b, 0xf000, 0x5000),
....@@ -4309,12 +4884,19 @@
43094884 {}
43104885 };
43114886
4887
+ if (spec->no_internal_mic_pin) {
4888
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
4889
+ return;
4890
+ }
4891
+
43124892 switch (codec->core.vendor_id) {
43134893 case 0x10ec0255:
43144894 alc_process_coef_fw(codec, coef0255);
43154895 break;
4896
+ case 0x10ec0230:
43164897 case 0x10ec0236:
43174898 case 0x10ec0256:
4899
+ case 0x19e58326:
43184900 alc_process_coef_fw(codec, coef0256);
43194901 break;
43204902 case 0x10ec0234:
....@@ -4363,25 +4945,25 @@
43634945 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
43644946 hda_nid_t mic_pin)
43654947 {
4366
- static struct coef_fw coef0255[] = {
4948
+ static const struct coef_fw coef0255[] = {
43674949 WRITE_COEFEX(0x57, 0x03, 0x8aa6),
43684950 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
43694951 {}
43704952 };
4371
- static struct coef_fw coef0256[] = {
4953
+ static const struct coef_fw coef0256[] = {
43724954 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
43734955 WRITE_COEFEX(0x57, 0x03, 0x09a3),
43744956 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
43754957 {}
43764958 };
4377
- static struct coef_fw coef0233[] = {
4959
+ static const struct coef_fw coef0233[] = {
43784960 UPDATE_COEF(0x35, 0, 1<<14),
43794961 WRITE_COEF(0x06, 0x2100),
43804962 WRITE_COEF(0x1a, 0x0021),
43814963 WRITE_COEF(0x26, 0x008c),
43824964 {}
43834965 };
4384
- static struct coef_fw coef0288[] = {
4966
+ static const struct coef_fw coef0288[] = {
43854967 UPDATE_COEF(0x4f, 0x00c0, 0),
43864968 UPDATE_COEF(0x50, 0x2000, 0),
43874969 UPDATE_COEF(0x56, 0x0006, 0),
....@@ -4390,30 +4972,30 @@
43904972 UPDATE_COEF(0x67, 0x2000, 0x2000),
43914973 {}
43924974 };
4393
- static struct coef_fw coef0292[] = {
4975
+ static const struct coef_fw coef0292[] = {
43944976 WRITE_COEF(0x19, 0xa208),
43954977 WRITE_COEF(0x2e, 0xacf0),
43964978 {}
43974979 };
4398
- static struct coef_fw coef0293[] = {
4980
+ static const struct coef_fw coef0293[] = {
43994981 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
44004982 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
44014983 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
44024984 {}
44034985 };
4404
- static struct coef_fw coef0688[] = {
4986
+ static const struct coef_fw coef0688[] = {
44054987 WRITE_COEF(0xb7, 0x802b),
44064988 WRITE_COEF(0xb5, 0x1040),
44074989 UPDATE_COEF(0xc3, 0, 1<<12),
44084990 {}
44094991 };
4410
- static struct coef_fw coef0225[] = {
4992
+ static const struct coef_fw coef0225[] = {
44114993 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
44124994 UPDATE_COEF(0x4a, 3<<4, 2<<4),
44134995 UPDATE_COEF(0x63, 3<<14, 0),
44144996 {}
44154997 };
4416
- static struct coef_fw coef0274[] = {
4998
+ static const struct coef_fw coef0274[] = {
44174999 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
44185000 UPDATE_COEF(0x4a, 0x0010, 0),
44195001 UPDATE_COEF(0x6b, 0xf000, 0),
....@@ -4427,8 +5009,10 @@
44275009 alc_process_coef_fw(codec, coef0255);
44285010 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
44295011 break;
5012
+ case 0x10ec0230:
44305013 case 0x10ec0236:
44315014 case 0x10ec0256:
5015
+ case 0x19e58326:
44325016 alc_write_coef_idx(codec, 0x45, 0xc489);
44335017 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
44345018 alc_process_coef_fw(codec, coef0256);
....@@ -4469,7 +5053,7 @@
44695053 break;
44705054 case 0x10ec0867:
44715055 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14);
4472
- /* fallthru */
5056
+ fallthrough;
44735057 case 0x10ec0221:
44745058 case 0x10ec0662:
44755059 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
....@@ -4499,7 +5083,7 @@
44995083
45005084 static void alc_headset_mode_default(struct hda_codec *codec)
45015085 {
4502
- static struct coef_fw coef0225[] = {
5086
+ static const struct coef_fw coef0225[] = {
45035087 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
45045088 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
45055089 UPDATE_COEF(0x49, 3<<8, 0<<8),
....@@ -4508,14 +5092,14 @@
45085092 UPDATE_COEF(0x67, 0xf000, 0x3000),
45095093 {}
45105094 };
4511
- static struct coef_fw coef0255[] = {
5095
+ static const struct coef_fw coef0255[] = {
45125096 WRITE_COEF(0x45, 0xc089),
45135097 WRITE_COEF(0x45, 0xc489),
45145098 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
45155099 WRITE_COEF(0x49, 0x0049),
45165100 {}
45175101 };
4518
- static struct coef_fw coef0256[] = {
5102
+ static const struct coef_fw coef0256[] = {
45195103 WRITE_COEF(0x45, 0xc489),
45205104 WRITE_COEFEX(0x57, 0x03, 0x0da3),
45215105 WRITE_COEF(0x49, 0x0049),
....@@ -4523,12 +5107,12 @@
45235107 WRITE_COEF(0x06, 0x6100),
45245108 {}
45255109 };
4526
- static struct coef_fw coef0233[] = {
5110
+ static const struct coef_fw coef0233[] = {
45275111 WRITE_COEF(0x06, 0x2100),
45285112 WRITE_COEF(0x32, 0x4ea3),
45295113 {}
45305114 };
4531
- static struct coef_fw coef0288[] = {
5115
+ static const struct coef_fw coef0288[] = {
45325116 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
45335117 UPDATE_COEF(0x50, 0x2000, 0x2000),
45345118 UPDATE_COEF(0x56, 0x0006, 0x0006),
....@@ -4536,26 +5120,26 @@
45365120 UPDATE_COEF(0x67, 0x2000, 0),
45375121 {}
45385122 };
4539
- static struct coef_fw coef0292[] = {
5123
+ static const struct coef_fw coef0292[] = {
45405124 WRITE_COEF(0x76, 0x000e),
45415125 WRITE_COEF(0x6c, 0x2400),
45425126 WRITE_COEF(0x6b, 0xc429),
45435127 WRITE_COEF(0x18, 0x7308),
45445128 {}
45455129 };
4546
- static struct coef_fw coef0293[] = {
5130
+ static const struct coef_fw coef0293[] = {
45475131 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
45485132 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
45495133 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
45505134 {}
45515135 };
4552
- static struct coef_fw coef0688[] = {
5136
+ static const struct coef_fw coef0688[] = {
45535137 WRITE_COEF(0x11, 0x0041),
45545138 WRITE_COEF(0x15, 0x0d40),
45555139 WRITE_COEF(0xb7, 0x802b),
45565140 {}
45575141 };
4558
- static struct coef_fw coef0274[] = {
5142
+ static const struct coef_fw coef0274[] = {
45595143 WRITE_COEF(0x45, 0x4289),
45605144 UPDATE_COEF(0x4a, 0x0010, 0x0010),
45615145 UPDATE_COEF(0x6b, 0x0f00, 0),
....@@ -4576,8 +5160,10 @@
45765160 case 0x10ec0255:
45775161 alc_process_coef_fw(codec, coef0255);
45785162 break;
5163
+ case 0x10ec0230:
45795164 case 0x10ec0236:
45805165 case 0x10ec0256:
5166
+ case 0x19e58326:
45815167 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
45825168 alc_write_coef_idx(codec, 0x45, 0xc089);
45835169 msleep(50);
....@@ -4618,53 +5204,53 @@
46185204 {
46195205 int val;
46205206
4621
- static struct coef_fw coef0255[] = {
5207
+ static const struct coef_fw coef0255[] = {
46225208 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
46235209 WRITE_COEF(0x1b, 0x0c2b),
46245210 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
46255211 {}
46265212 };
4627
- static struct coef_fw coef0256[] = {
5213
+ static const struct coef_fw coef0256[] = {
46285214 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
46295215 WRITE_COEF(0x1b, 0x0e6b),
46305216 {}
46315217 };
4632
- static struct coef_fw coef0233[] = {
5218
+ static const struct coef_fw coef0233[] = {
46335219 WRITE_COEF(0x45, 0xd429),
46345220 WRITE_COEF(0x1b, 0x0c2b),
46355221 WRITE_COEF(0x32, 0x4ea3),
46365222 {}
46375223 };
4638
- static struct coef_fw coef0288[] = {
5224
+ static const struct coef_fw coef0288[] = {
46395225 UPDATE_COEF(0x50, 0x2000, 0x2000),
46405226 UPDATE_COEF(0x56, 0x0006, 0x0006),
46415227 UPDATE_COEF(0x66, 0x0008, 0),
46425228 UPDATE_COEF(0x67, 0x2000, 0),
46435229 {}
46445230 };
4645
- static struct coef_fw coef0292[] = {
5231
+ static const struct coef_fw coef0292[] = {
46465232 WRITE_COEF(0x6b, 0xd429),
46475233 WRITE_COEF(0x76, 0x0008),
46485234 WRITE_COEF(0x18, 0x7388),
46495235 {}
46505236 };
4651
- static struct coef_fw coef0293[] = {
5237
+ static const struct coef_fw coef0293[] = {
46525238 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
46535239 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
46545240 {}
46555241 };
4656
- static struct coef_fw coef0688[] = {
5242
+ static const struct coef_fw coef0688[] = {
46575243 WRITE_COEF(0x11, 0x0001),
46585244 WRITE_COEF(0x15, 0x0d60),
46595245 WRITE_COEF(0xc3, 0x0000),
46605246 {}
46615247 };
4662
- static struct coef_fw coef0225_1[] = {
5248
+ static const struct coef_fw coef0225_1[] = {
46635249 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
46645250 UPDATE_COEF(0x63, 3<<14, 2<<14),
46655251 {}
46665252 };
4667
- static struct coef_fw coef0225_2[] = {
5253
+ static const struct coef_fw coef0225_2[] = {
46685254 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
46695255 UPDATE_COEF(0x63, 3<<14, 1<<14),
46705256 {}
....@@ -4674,8 +5260,10 @@
46745260 case 0x10ec0255:
46755261 alc_process_coef_fw(codec, coef0255);
46765262 break;
5263
+ case 0x10ec0230:
46775264 case 0x10ec0236:
46785265 case 0x10ec0256:
5266
+ case 0x19e58326:
46795267 alc_process_coef_fw(codec, coef0256);
46805268 break;
46815269 case 0x10ec0234:
....@@ -4736,48 +5324,48 @@
47365324 /* Nokia type */
47375325 static void alc_headset_mode_omtp(struct hda_codec *codec)
47385326 {
4739
- static struct coef_fw coef0255[] = {
5327
+ static const struct coef_fw coef0255[] = {
47405328 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
47415329 WRITE_COEF(0x1b, 0x0c2b),
47425330 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
47435331 {}
47445332 };
4745
- static struct coef_fw coef0256[] = {
5333
+ static const struct coef_fw coef0256[] = {
47465334 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
47475335 WRITE_COEF(0x1b, 0x0e6b),
47485336 {}
47495337 };
4750
- static struct coef_fw coef0233[] = {
5338
+ static const struct coef_fw coef0233[] = {
47515339 WRITE_COEF(0x45, 0xe429),
47525340 WRITE_COEF(0x1b, 0x0c2b),
47535341 WRITE_COEF(0x32, 0x4ea3),
47545342 {}
47555343 };
4756
- static struct coef_fw coef0288[] = {
5344
+ static const struct coef_fw coef0288[] = {
47575345 UPDATE_COEF(0x50, 0x2000, 0x2000),
47585346 UPDATE_COEF(0x56, 0x0006, 0x0006),
47595347 UPDATE_COEF(0x66, 0x0008, 0),
47605348 UPDATE_COEF(0x67, 0x2000, 0),
47615349 {}
47625350 };
4763
- static struct coef_fw coef0292[] = {
5351
+ static const struct coef_fw coef0292[] = {
47645352 WRITE_COEF(0x6b, 0xe429),
47655353 WRITE_COEF(0x76, 0x0008),
47665354 WRITE_COEF(0x18, 0x7388),
47675355 {}
47685356 };
4769
- static struct coef_fw coef0293[] = {
5357
+ static const struct coef_fw coef0293[] = {
47705358 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
47715359 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
47725360 {}
47735361 };
4774
- static struct coef_fw coef0688[] = {
5362
+ static const struct coef_fw coef0688[] = {
47755363 WRITE_COEF(0x11, 0x0001),
47765364 WRITE_COEF(0x15, 0x0d50),
47775365 WRITE_COEF(0xc3, 0x0000),
47785366 {}
47795367 };
4780
- static struct coef_fw coef0225[] = {
5368
+ static const struct coef_fw coef0225[] = {
47815369 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
47825370 UPDATE_COEF(0x63, 3<<14, 2<<14),
47835371 {}
....@@ -4787,8 +5375,10 @@
47875375 case 0x10ec0255:
47885376 alc_process_coef_fw(codec, coef0255);
47895377 break;
5378
+ case 0x10ec0230:
47905379 case 0x10ec0236:
47915380 case 0x10ec0256:
5381
+ case 0x19e58326:
47925382 alc_process_coef_fw(codec, coef0256);
47935383 break;
47945384 case 0x10ec0234:
....@@ -4837,17 +5427,17 @@
48375427 int val;
48385428 bool is_ctia = false;
48395429 struct alc_spec *spec = codec->spec;
4840
- static struct coef_fw coef0255[] = {
5430
+ static const struct coef_fw coef0255[] = {
48415431 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
48425432 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
48435433 conteol) */
48445434 {}
48455435 };
4846
- static struct coef_fw coef0288[] = {
5436
+ static const struct coef_fw coef0288[] = {
48475437 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
48485438 {}
48495439 };
4850
- static struct coef_fw coef0298[] = {
5440
+ static const struct coef_fw coef0298[] = {
48515441 UPDATE_COEF(0x50, 0x2000, 0x2000),
48525442 UPDATE_COEF(0x56, 0x0006, 0x0006),
48535443 UPDATE_COEF(0x66, 0x0008, 0),
....@@ -4855,25 +5445,30 @@
48555445 UPDATE_COEF(0x19, 0x1300, 0x1300),
48565446 {}
48575447 };
4858
- static struct coef_fw coef0293[] = {
5448
+ static const struct coef_fw coef0293[] = {
48595449 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
48605450 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
48615451 {}
48625452 };
4863
- static struct coef_fw coef0688[] = {
5453
+ static const struct coef_fw coef0688[] = {
48645454 WRITE_COEF(0x11, 0x0001),
48655455 WRITE_COEF(0xb7, 0x802b),
48665456 WRITE_COEF(0x15, 0x0d60),
48675457 WRITE_COEF(0xc3, 0x0c00),
48685458 {}
48695459 };
4870
- static struct coef_fw coef0274[] = {
5460
+ static const struct coef_fw coef0274[] = {
48715461 UPDATE_COEF(0x4a, 0x0010, 0),
48725462 UPDATE_COEF(0x4a, 0x8000, 0),
48735463 WRITE_COEF(0x45, 0xd289),
48745464 UPDATE_COEF(0x49, 0x0300, 0x0300),
48755465 {}
48765466 };
5467
+
5468
+ if (spec->no_internal_mic_pin) {
5469
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
5470
+ return;
5471
+ }
48775472
48785473 switch (codec->core.vendor_id) {
48795474 case 0x10ec0255:
....@@ -4882,8 +5477,10 @@
48825477 val = alc_read_coef_idx(codec, 0x46);
48835478 is_ctia = (val & 0x0070) == 0x0070;
48845479 break;
5480
+ case 0x10ec0230:
48855481 case 0x10ec0236:
48865482 case 0x10ec0256:
5483
+ case 0x19e58326:
48875484 alc_write_coef_idx(codec, 0x1b, 0x0e4b);
48885485 alc_write_coef_idx(codec, 0x06, 0x6104);
48895486 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
....@@ -5051,6 +5648,8 @@
50515648 switch (new_headset_mode) {
50525649 case ALC_HEADSET_MODE_UNPLUGGED:
50535650 alc_headset_mode_unplugged(codec);
5651
+ spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5652
+ spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
50545653 spec->gen.hp_jack_present = false;
50555654 break;
50565655 case ALC_HEADSET_MODE_HEADSET:
....@@ -5093,8 +5692,6 @@
50935692 static void alc_update_headset_jack_cb(struct hda_codec *codec,
50945693 struct hda_jack_callback *jack)
50955694 {
5096
- struct alc_spec *spec = codec->spec;
5097
- spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
50985695 snd_hda_gen_hp_automute(codec, jack);
50995696 alc_update_headset_mode(codec);
51005697 }
....@@ -5132,7 +5729,10 @@
51325729 alc_probe_headset_mode(codec);
51335730 break;
51345731 case HDA_FIXUP_ACT_INIT:
5135
- spec->current_headset_mode = 0;
5732
+ if (is_s3_resume(codec) || is_s4_resume(codec)) {
5733
+ spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5734
+ spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5735
+ }
51365736 alc_update_headset_mode(codec);
51375737 break;
51385738 }
....@@ -5152,7 +5752,7 @@
51525752 static void alc255_set_default_jack_type(struct hda_codec *codec)
51535753 {
51545754 /* Set to iphone type */
5155
- static struct coef_fw alc255fw[] = {
5755
+ static const struct coef_fw alc255fw[] = {
51565756 WRITE_COEF(0x1b, 0x880b),
51575757 WRITE_COEF(0x45, 0xd089),
51585758 WRITE_COEF(0x1b, 0x080b),
....@@ -5160,7 +5760,7 @@
51605760 WRITE_COEF(0x1b, 0x0c0b),
51615761 {}
51625762 };
5163
- static struct coef_fw alc256fw[] = {
5763
+ static const struct coef_fw alc256fw[] = {
51645764 WRITE_COEF(0x1b, 0x884b),
51655765 WRITE_COEF(0x45, 0xd089),
51665766 WRITE_COEF(0x1b, 0x084b),
....@@ -5172,8 +5772,10 @@
51725772 case 0x10ec0255:
51735773 alc_process_coef_fw(codec, alc255fw);
51745774 break;
5775
+ case 0x10ec0230:
51755776 case 0x10ec0236:
51765777 case 0x10ec0256:
5778
+ case 0x19e58326:
51775779 alc_process_coef_fw(codec, alc256fw);
51785780 break;
51795781 }
....@@ -5301,9 +5903,21 @@
53015903 * the speaker output becomes too low by some reason on Thinkpads with
53025904 * ALC298 codec
53035905 */
5304
- static hda_nid_t preferred_pairs[] = {
5906
+ static const hda_nid_t preferred_pairs[] = {
53055907 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
53065908 0
5909
+ };
5910
+ struct alc_spec *spec = codec->spec;
5911
+
5912
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
5913
+ spec->gen.preferred_dacs = preferred_pairs;
5914
+}
5915
+
5916
+static void alc295_fixup_asus_dacs(struct hda_codec *codec,
5917
+ const struct hda_fixup *fix, int action)
5918
+{
5919
+ static const hda_nid_t preferred_pairs[] = {
5920
+ 0x17, 0x02, 0x21, 0x03, 0
53075921 };
53085922 struct alc_spec *spec = codec->spec;
53095923
....@@ -5552,9 +6166,9 @@
55526166 /* DAC node 0x03 is giving mono output. We therefore want to
55536167 make sure 0x14 (front speaker) and 0x15 (headphones) use the
55546168 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);
6169
+ static const hda_nid_t conn1[] = { 0x0c };
6170
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
6171
+ snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
55586172 }
55596173 }
55606174
....@@ -5569,8 +6183,8 @@
55696183 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
55706184 speaker's volume now. */
55716185
5572
- hda_nid_t conn1[1] = { 0x0c };
5573
- snd_hda_override_conn_list(codec, 0x17, 1, conn1);
6186
+ static const hda_nid_t conn1[] = { 0x0c };
6187
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
55746188 }
55756189 }
55766190
....@@ -5579,8 +6193,8 @@
55796193 const struct hda_fixup *fix, int action)
55806194 {
55816195 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);
6196
+ static const hda_nid_t conn[] = { 0x02, 0x03 };
6197
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
55846198 }
55856199 }
55866200
....@@ -5589,8 +6203,8 @@
55896203 const struct hda_fixup *fix, int action)
55906204 {
55916205 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5592
- hda_nid_t conn[1] = { 0x02 };
5593
- snd_hda_override_conn_list(codec, 0x17, 1, conn);
6206
+ static const hda_nid_t conn[] = { 0x02 };
6207
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
55946208 }
55956209 }
55966210
....@@ -5640,6 +6254,39 @@
56406254 }
56416255 }
56426256
6257
+/* Quirk for Thinkpad X1 7th and 8th Gen
6258
+ * The following fixed routing needed
6259
+ * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6260
+ * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6261
+ * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6262
+ */
6263
+static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
6264
+ const struct hda_fixup *fix, int action)
6265
+{
6266
+ static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
6267
+ static const hda_nid_t preferred_pairs[] = {
6268
+ 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
6269
+ };
6270
+ struct alc_spec *spec = codec->spec;
6271
+
6272
+ switch (action) {
6273
+ case HDA_FIXUP_ACT_PRE_PROBE:
6274
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6275
+ spec->gen.preferred_dacs = preferred_pairs;
6276
+ break;
6277
+ case HDA_FIXUP_ACT_BUILD:
6278
+ /* The generic parser creates somewhat unintuitive volume ctls
6279
+ * with the fixed routing above, and the shared DAC2 may be
6280
+ * confusing for PA.
6281
+ * Rename those to unique names so that PA doesn't touch them
6282
+ * and use only Master volume.
6283
+ */
6284
+ rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume");
6285
+ rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
6286
+ break;
6287
+ }
6288
+}
6289
+
56436290 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
56446291 const struct hda_fixup *fix,
56456292 int action)
....@@ -5678,7 +6325,7 @@
56786325 const struct hda_fixup *fix, int action)
56796326 {
56806327 struct alc_spec *spec = codec->spec;
5681
- static hda_nid_t preferred_pairs[] = {
6328
+ static const hda_nid_t preferred_pairs[] = {
56826329 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
56836330 0
56846331 };
....@@ -5691,6 +6338,21 @@
56916338 codec->power_save_node = 0;
56926339 }
56936340
6341
+/* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
6342
+static void alc289_fixup_asus_ga401(struct hda_codec *codec,
6343
+ const struct hda_fixup *fix, int action)
6344
+{
6345
+ static const hda_nid_t preferred_pairs[] = {
6346
+ 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6347
+ };
6348
+ struct alc_spec *spec = codec->spec;
6349
+
6350
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
6351
+ spec->gen.preferred_dacs = preferred_pairs;
6352
+ spec->gen.obey_preferred_dacs = 1;
6353
+ }
6354
+}
6355
+
56946356 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
56956357 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
56966358 const struct hda_fixup *fix, int action)
....@@ -5701,11 +6363,205 @@
57016363 snd_hda_override_wcaps(codec, 0x03, 0);
57026364 }
57036365
6366
+static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
6367
+{
6368
+ switch (codec->core.vendor_id) {
6369
+ case 0x10ec0274:
6370
+ case 0x10ec0294:
6371
+ case 0x10ec0225:
6372
+ case 0x10ec0295:
6373
+ case 0x10ec0299:
6374
+ alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
6375
+ alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
6376
+ break;
6377
+ case 0x10ec0230:
6378
+ case 0x10ec0235:
6379
+ case 0x10ec0236:
6380
+ case 0x10ec0255:
6381
+ case 0x10ec0256:
6382
+ case 0x19e58326:
6383
+ alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
6384
+ alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
6385
+ break;
6386
+ }
6387
+}
6388
+
6389
+static void alc295_fixup_chromebook(struct hda_codec *codec,
6390
+ const struct hda_fixup *fix, int action)
6391
+{
6392
+ struct alc_spec *spec = codec->spec;
6393
+
6394
+ switch (action) {
6395
+ case HDA_FIXUP_ACT_PRE_PROBE:
6396
+ spec->ultra_low_power = true;
6397
+ break;
6398
+ case HDA_FIXUP_ACT_INIT:
6399
+ alc_combo_jack_hp_jd_restart(codec);
6400
+ break;
6401
+ }
6402
+}
6403
+
57046404 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
57056405 const struct hda_fixup *fix, int action)
57066406 {
57076407 if (action == HDA_FIXUP_ACT_PRE_PROBE)
57086408 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
6409
+}
6410
+
6411
+
6412
+static void alc294_gx502_toggle_output(struct hda_codec *codec,
6413
+ struct hda_jack_callback *cb)
6414
+{
6415
+ /* The Windows driver sets the codec up in a very different way where
6416
+ * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
6417
+ */
6418
+ if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6419
+ alc_write_coef_idx(codec, 0x10, 0x8a20);
6420
+ else
6421
+ alc_write_coef_idx(codec, 0x10, 0x0a20);
6422
+}
6423
+
6424
+static void alc294_fixup_gx502_hp(struct hda_codec *codec,
6425
+ const struct hda_fixup *fix, int action)
6426
+{
6427
+ /* Pin 0x21: headphones/headset mic */
6428
+ if (!is_jack_detectable(codec, 0x21))
6429
+ return;
6430
+
6431
+ switch (action) {
6432
+ case HDA_FIXUP_ACT_PRE_PROBE:
6433
+ snd_hda_jack_detect_enable_callback(codec, 0x21,
6434
+ alc294_gx502_toggle_output);
6435
+ break;
6436
+ case HDA_FIXUP_ACT_INIT:
6437
+ /* Make sure to start in a correct state, i.e. if
6438
+ * headphones have been plugged in before powering up the system
6439
+ */
6440
+ alc294_gx502_toggle_output(codec, NULL);
6441
+ break;
6442
+ }
6443
+}
6444
+
6445
+static void alc294_gu502_toggle_output(struct hda_codec *codec,
6446
+ struct hda_jack_callback *cb)
6447
+{
6448
+ /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
6449
+ * responsible from changes between speakers and headphones
6450
+ */
6451
+ if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
6452
+ alc_write_coef_idx(codec, 0x10, 0x8420);
6453
+ else
6454
+ alc_write_coef_idx(codec, 0x10, 0x0a20);
6455
+}
6456
+
6457
+static void alc294_fixup_gu502_hp(struct hda_codec *codec,
6458
+ const struct hda_fixup *fix, int action)
6459
+{
6460
+ if (!is_jack_detectable(codec, 0x21))
6461
+ return;
6462
+
6463
+ switch (action) {
6464
+ case HDA_FIXUP_ACT_PRE_PROBE:
6465
+ snd_hda_jack_detect_enable_callback(codec, 0x21,
6466
+ alc294_gu502_toggle_output);
6467
+ break;
6468
+ case HDA_FIXUP_ACT_INIT:
6469
+ alc294_gu502_toggle_output(codec, NULL);
6470
+ break;
6471
+ }
6472
+}
6473
+
6474
+static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
6475
+ const struct hda_fixup *fix, int action)
6476
+{
6477
+ if (action != HDA_FIXUP_ACT_INIT)
6478
+ return;
6479
+
6480
+ msleep(100);
6481
+ alc_write_coef_idx(codec, 0x65, 0x0);
6482
+}
6483
+
6484
+static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
6485
+ const struct hda_fixup *fix, int action)
6486
+{
6487
+ switch (action) {
6488
+ case HDA_FIXUP_ACT_INIT:
6489
+ alc_combo_jack_hp_jd_restart(codec);
6490
+ break;
6491
+ }
6492
+}
6493
+
6494
+static void alc_fixup_no_int_mic(struct hda_codec *codec,
6495
+ const struct hda_fixup *fix, int action)
6496
+{
6497
+ struct alc_spec *spec = codec->spec;
6498
+
6499
+ switch (action) {
6500
+ case HDA_FIXUP_ACT_PRE_PROBE:
6501
+ /* Mic RING SLEEVE swap for combo jack */
6502
+ alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
6503
+ spec->no_internal_mic_pin = true;
6504
+ break;
6505
+ case HDA_FIXUP_ACT_INIT:
6506
+ alc_combo_jack_hp_jd_restart(codec);
6507
+ break;
6508
+ }
6509
+}
6510
+
6511
+/* GPIO1 = amplifier on/off
6512
+ * GPIO3 = mic mute LED
6513
+ */
6514
+static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
6515
+ const struct hda_fixup *fix, int action)
6516
+{
6517
+ static const hda_nid_t conn[] = { 0x02 };
6518
+
6519
+ struct alc_spec *spec = codec->spec;
6520
+ static const struct hda_pintbl pincfgs[] = {
6521
+ { 0x14, 0x90170110 }, /* front/high speakers */
6522
+ { 0x17, 0x90170130 }, /* back/bass speakers */
6523
+ { }
6524
+ };
6525
+
6526
+ //enable micmute led
6527
+ alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
6528
+
6529
+ switch (action) {
6530
+ case HDA_FIXUP_ACT_PRE_PROBE:
6531
+ spec->micmute_led_polarity = 1;
6532
+ /* needed for amp of back speakers */
6533
+ spec->gpio_mask |= 0x01;
6534
+ spec->gpio_dir |= 0x01;
6535
+ snd_hda_apply_pincfgs(codec, pincfgs);
6536
+ /* share DAC to have unified volume control */
6537
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6538
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6539
+ break;
6540
+ case HDA_FIXUP_ACT_INIT:
6541
+ /* need to toggle GPIO to enable the amp of back speakers */
6542
+ alc_update_gpio_data(codec, 0x01, true);
6543
+ msleep(100);
6544
+ alc_update_gpio_data(codec, 0x01, false);
6545
+ break;
6546
+ }
6547
+}
6548
+
6549
+static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
6550
+ const struct hda_fixup *fix, int action)
6551
+{
6552
+ static const hda_nid_t conn[] = { 0x02 };
6553
+ static const struct hda_pintbl pincfgs[] = {
6554
+ { 0x14, 0x90170110 }, /* rear speaker */
6555
+ { }
6556
+ };
6557
+
6558
+ switch (action) {
6559
+ case HDA_FIXUP_ACT_PRE_PROBE:
6560
+ snd_hda_apply_pincfgs(codec, pincfgs);
6561
+ /* force front speaker to DAC1 */
6562
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6563
+ break;
6564
+ }
57096565 }
57106566
57116567 /* for hda_fixup_thinkpad_acpi() */
....@@ -5718,11 +6574,85 @@
57186574 hda_fixup_thinkpad_acpi(codec, fix, action);
57196575 }
57206576
5721
-/* for dell wmi mic mute led */
5722
-#include "dell_wmi_helper.c"
6577
+/* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6578
+static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
6579
+ const struct hda_fixup *fix,
6580
+ int action)
6581
+{
6582
+ struct alc_spec *spec = codec->spec;
6583
+
6584
+ switch (action) {
6585
+ case HDA_FIXUP_ACT_PRE_PROBE:
6586
+ spec->gen.suppress_auto_mute = 1;
6587
+ break;
6588
+ }
6589
+}
57236590
57246591 /* for alc295_fixup_hp_top_speakers */
57256592 #include "hp_x360_helper.c"
6593
+
6594
+/* for alc285_fixup_ideapad_s740_coef() */
6595
+#include "ideapad_s740_helper.c"
6596
+
6597
+static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = {
6598
+ WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
6599
+ WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
6600
+ WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
6601
+ {}
6602
+};
6603
+
6604
+static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
6605
+ const struct hda_fixup *fix,
6606
+ int action)
6607
+{
6608
+ /*
6609
+ * A certain other OS sets these coeffs to different values. On at least
6610
+ * one TongFang barebone these settings might survive even a cold
6611
+ * reboot. So to restore a clean slate the values are explicitly reset
6612
+ * to default here. Without this, the external microphone is always in a
6613
+ * plugged-in state, while the internal microphone is always in an
6614
+ * unplugged state, breaking the ability to use the internal microphone.
6615
+ */
6616
+ alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs);
6617
+}
6618
+
6619
+static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = {
6620
+ WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
6621
+ WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
6622
+ WRITE_COEF(0x49, 0x0149),
6623
+ {}
6624
+};
6625
+
6626
+static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
6627
+ const struct hda_fixup *fix,
6628
+ int action)
6629
+{
6630
+ /*
6631
+ * The audio jack input and output is not detected on the ASRock NUC Box
6632
+ * 1100 series when cold booting without this fix. Warm rebooting from a
6633
+ * certain other OS makes the audio functional, as COEF settings are
6634
+ * preserved in this case. This fix sets these altered COEF values as
6635
+ * the default.
6636
+ */
6637
+ alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
6638
+}
6639
+
6640
+static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
6641
+ const struct hda_fixup *fix,
6642
+ int action)
6643
+{
6644
+ /*
6645
+ * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
6646
+ * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
6647
+ * needs an additional quirk for sound working after suspend and resume.
6648
+ */
6649
+ if (codec->core.vendor_id == 0x10ec0256) {
6650
+ alc_update_coef_idx(codec, 0x10, 1<<9, 0);
6651
+ snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120);
6652
+ } else {
6653
+ snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c);
6654
+ }
6655
+}
57266656
57276657 enum {
57286658 ALC269_FIXUP_GPIO2,
....@@ -5778,6 +6708,7 @@
57786708 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
57796709 ALC269VB_FIXUP_ASUS_ZENBOOK,
57806710 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
6711
+ ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
57816712 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
57826713 ALC269VB_FIXUP_ORDISSIMO_EVE2,
57836714 ALC283_FIXUP_CHROME_BOOK,
....@@ -5800,21 +6731,26 @@
58006731 ALC292_FIXUP_TPT440_DOCK,
58016732 ALC292_FIXUP_TPT440,
58026733 ALC283_FIXUP_HEADSET_MIC,
5803
- ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
6734
+ ALC255_FIXUP_MIC_MUTE_LED,
58046735 ALC282_FIXUP_ASPIRE_V5_PINS,
6736
+ ALC269VB_FIXUP_ASPIRE_E1_COEF,
58056737 ALC280_FIXUP_HP_GPIO4,
58066738 ALC286_FIXUP_HP_GPIO_LED,
58076739 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
58086740 ALC280_FIXUP_HP_DOCK_PINS,
58096741 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
58106742 ALC280_FIXUP_HP_9480M,
6743
+ ALC245_FIXUP_HP_X360_AMP,
6744
+ ALC285_FIXUP_HP_SPECTRE_X360_EB1,
58116745 ALC288_FIXUP_DELL_HEADSET_MODE,
58126746 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
58136747 ALC288_FIXUP_DELL_XPS_13,
58146748 ALC288_FIXUP_DISABLE_AAMIX,
6749
+ ALC292_FIXUP_DELL_E7X_AAMIX,
58156750 ALC292_FIXUP_DELL_E7X,
58166751 ALC292_FIXUP_DISABLE_AAMIX,
58176752 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
6753
+ ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
58186754 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
58196755 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
58206756 ALC275_FIXUP_DELL_XPS,
....@@ -5832,6 +6768,7 @@
58326768 ALC298_FIXUP_LENOVO_SPK_VOLUME,
58336769 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
58346770 ALC269_FIXUP_ATIV_BOOK_8,
6771
+ ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
58356772 ALC221_FIXUP_HP_MIC_NO_PRESENCE,
58366773 ALC256_FIXUP_ASUS_HEADSET_MODE,
58376774 ALC256_FIXUP_ASUS_MIC,
....@@ -5850,7 +6787,8 @@
58506787 ALC298_FIXUP_TPT470_DOCK,
58516788 ALC255_FIXUP_DUMMY_LINEOUT_VERB,
58526789 ALC255_FIXUP_DELL_HEADSET_MIC,
5853
- ALC256_FIXUP_HUAWEI_MBXP_PINS,
6790
+ ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
6791
+ ALC298_FIXUP_HUAWEI_MBX_STEREO,
58546792 ALC295_FIXUP_HP_X360,
58556793 ALC221_FIXUP_HP_HEADSET_MIC,
58566794 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
....@@ -5862,6 +6800,8 @@
58626800 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
58636801 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
58646802 ALC255_FIXUP_ACER_HEADSET_MIC,
6803
+ ALC295_FIXUP_CHROME_BOOK,
6804
+ ALC225_FIXUP_HEADSET_JACK,
58656805 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
58666806 ALC225_FIXUP_WYSE_AUTO_MUTE,
58676807 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
....@@ -5874,9 +6814,94 @@
58746814 ALC289_FIXUP_DUAL_SPK,
58756815 ALC294_FIXUP_SPK2_TO_DAC1,
58766816 ALC294_FIXUP_ASUS_DUAL_SPK,
6817
+ ALC285_FIXUP_THINKPAD_X1_GEN7,
6818
+ ALC285_FIXUP_THINKPAD_HEADSET_JACK,
58776819 ALC294_FIXUP_ASUS_HPE,
6820
+ ALC294_FIXUP_ASUS_COEF_1B,
6821
+ ALC294_FIXUP_ASUS_GX502_HP,
6822
+ ALC294_FIXUP_ASUS_GX502_PINS,
6823
+ ALC294_FIXUP_ASUS_GX502_VERBS,
6824
+ ALC294_FIXUP_ASUS_GU502_HP,
6825
+ ALC294_FIXUP_ASUS_GU502_PINS,
6826
+ ALC294_FIXUP_ASUS_GU502_VERBS,
6827
+ ALC294_FIXUP_ASUS_G513_PINS,
6828
+ ALC285_FIXUP_ASUS_G533Z_PINS,
58786829 ALC285_FIXUP_HP_GPIO_LED,
6830
+ ALC285_FIXUP_HP_MUTE_LED,
6831
+ ALC236_FIXUP_HP_GPIO_LED,
6832
+ ALC236_FIXUP_HP_MUTE_LED,
6833
+ ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
6834
+ ALC298_FIXUP_SAMSUNG_AMP,
6835
+ ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
6836
+ ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
6837
+ ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
6838
+ ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
6839
+ ALC269VC_FIXUP_ACER_HEADSET_MIC,
6840
+ ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
6841
+ ALC289_FIXUP_ASUS_GA401,
6842
+ ALC289_FIXUP_ASUS_GA502,
6843
+ ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
6844
+ ALC285_FIXUP_HP_GPIO_AMP_INIT,
6845
+ ALC269_FIXUP_CZC_B20,
6846
+ ALC269_FIXUP_CZC_TMI,
6847
+ ALC269_FIXUP_CZC_L101,
6848
+ ALC269_FIXUP_LEMOTE_A1802,
6849
+ ALC269_FIXUP_LEMOTE_A190X,
6850
+ ALC256_FIXUP_INTEL_NUC8_RUGGED,
6851
+ ALC233_FIXUP_INTEL_NUC8_DMIC,
6852
+ ALC233_FIXUP_INTEL_NUC8_BOOST,
6853
+ ALC256_FIXUP_INTEL_NUC10,
6854
+ ALC255_FIXUP_XIAOMI_HEADSET_MIC,
6855
+ ALC274_FIXUP_HP_MIC,
6856
+ ALC274_FIXUP_HP_HEADSET_MIC,
6857
+ ALC274_FIXUP_HP_ENVY_GPIO,
6858
+ ALC256_FIXUP_ASUS_HPE,
6859
+ ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6860
+ ALC287_FIXUP_HP_GPIO_LED,
6861
+ ALC256_FIXUP_HP_HEADSET_MIC,
6862
+ ALC245_FIXUP_HP_GPIO_LED,
6863
+ ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
6864
+ ALC282_FIXUP_ACER_DISABLE_LINEOUT,
6865
+ ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
6866
+ ALC256_FIXUP_ACER_HEADSET_MIC,
6867
+ ALC285_FIXUP_IDEAPAD_S740_COEF,
6868
+ ALC295_FIXUP_ASUS_DACS,
6869
+ ALC295_FIXUP_HP_OMEN,
6870
+ ALC285_FIXUP_HP_SPECTRE_X360,
6871
+ ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
6872
+ ALC623_FIXUP_LENOVO_THINKSTATION_P340,
6873
+ ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
6874
+ ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
6875
+ ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
6876
+ ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
6877
+ ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
6878
+ ALC298_FIXUP_LENOVO_C940_DUET7,
6879
+ ALC287_FIXUP_13S_GEN2_SPEAKERS,
6880
+ ALC256_FIXUP_SET_COEF_DEFAULTS,
6881
+ ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
6882
+ ALC233_FIXUP_NO_AUDIO_JACK,
6883
+ ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
6884
+ ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
6885
+ ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
6886
+ ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
58796887 };
6888
+
6889
+/* A special fixup for Lenovo C940 and Yoga Duet 7;
6890
+ * both have the very same PCI SSID, and we need to apply different fixups
6891
+ * depending on the codec ID
6892
+ */
6893
+static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
6894
+ const struct hda_fixup *fix,
6895
+ int action)
6896
+{
6897
+ int id;
6898
+
6899
+ if (codec->core.vendor_id == 0x10ec0298)
6900
+ id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
6901
+ else
6902
+ id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
6903
+ __snd_hda_apply_fixup(codec, id, action, 0);
6904
+}
58806905
58816906 static const struct hda_fixup alc269_fixups[] = {
58826907 [ALC269_FIXUP_GPIO2] = {
....@@ -6133,7 +7158,7 @@
61337158 .type = HDA_FIXUP_FUNC,
61347159 .v.func = alc_fixup_headset_mode,
61357160 .chained = true,
6136
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7161
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
61377162 },
61387163 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
61397164 .type = HDA_FIXUP_FUNC,
....@@ -6157,7 +7182,7 @@
61577182 .chained = true,
61587183 .chain_id = ALC269_FIXUP_HEADSET_MIC
61597184 },
6160
- [ALC256_FIXUP_HUAWEI_MBXP_PINS] = {
7185
+ [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
61617186 .type = HDA_FIXUP_PINS,
61627187 .v.pins = (const struct hda_pintbl[]) {
61637188 {0x12, 0x90a60130},
....@@ -6172,6 +7197,14 @@
61727197 {0x21, 0x04211020},
61737198 { }
61747199 },
7200
+ .chained = true,
7201
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
7202
+ },
7203
+ [ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
7204
+ .type = HDA_FIXUP_FUNC,
7205
+ .v.func = alc298_fixup_huawei_mbx_stereo,
7206
+ .chained = true,
7207
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
61757208 },
61767209 [ALC269_FIXUP_ASUS_X101_FUNC] = {
61777210 .type = HDA_FIXUP_FUNC,
....@@ -6254,6 +7287,15 @@
62547287 },
62557288 .chained = true,
62567289 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
7290
+ },
7291
+ [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
7292
+ .type = HDA_FIXUP_PINS,
7293
+ .v.pins = (const struct hda_pintbl[]) {
7294
+ { 0x18, 0x01a110f0 }, /* use as headset mic */
7295
+ { }
7296
+ },
7297
+ .chained = true,
7298
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
62577299 },
62587300 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
62597301 .type = HDA_FIXUP_FUNC,
....@@ -6375,7 +7417,7 @@
63757417 .type = HDA_FIXUP_FUNC,
63767418 .v.func = alc_fixup_headset_mode_alc255,
63777419 .chained = true,
6378
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7420
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
63797421 },
63807422 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
63817423 .type = HDA_FIXUP_FUNC,
....@@ -6410,9 +7452,9 @@
64107452 { },
64117453 },
64127454 },
6413
- [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = {
7455
+ [ALC255_FIXUP_MIC_MUTE_LED] = {
64147456 .type = HDA_FIXUP_FUNC,
6415
- .v.func = alc_fixup_dell_wmi,
7457
+ .v.func = alc_fixup_micmute_led,
64167458 },
64177459 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
64187460 .type = HDA_FIXUP_PINS,
....@@ -6429,6 +7471,10 @@
64297471 { 0x21, 0x0321101f },
64307472 { },
64317473 },
7474
+ },
7475
+ [ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
7476
+ .type = HDA_FIXUP_FUNC,
7477
+ .v.func = alc269vb_fixup_aspire_e1_coef,
64327478 },
64337479 [ALC280_FIXUP_HP_GPIO4] = {
64347480 .type = HDA_FIXUP_FUNC,
....@@ -6467,11 +7513,17 @@
64677513 .type = HDA_FIXUP_FUNC,
64687514 .v.func = alc280_fixup_hp_9480m,
64697515 },
7516
+ [ALC245_FIXUP_HP_X360_AMP] = {
7517
+ .type = HDA_FIXUP_FUNC,
7518
+ .v.func = alc245_fixup_hp_x360_amp,
7519
+ .chained = true,
7520
+ .chain_id = ALC245_FIXUP_HP_GPIO_LED
7521
+ },
64707522 [ALC288_FIXUP_DELL_HEADSET_MODE] = {
64717523 .type = HDA_FIXUP_FUNC,
64727524 .v.func = alc_fixup_headset_mode_dell_alc288,
64737525 .chained = true,
6474
- .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
7526
+ .chain_id = ALC255_FIXUP_MIC_MUTE_LED
64757527 },
64767528 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
64777529 .type = HDA_FIXUP_PINS,
....@@ -6507,11 +7559,27 @@
65077559 .chained = true,
65087560 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
65097561 },
6510
- [ALC292_FIXUP_DELL_E7X] = {
7562
+ [ALC292_FIXUP_DELL_E7X_AAMIX] = {
65117563 .type = HDA_FIXUP_FUNC,
65127564 .v.func = alc_fixup_dell_xps13,
65137565 .chained = true,
65147566 .chain_id = ALC292_FIXUP_DISABLE_AAMIX
7567
+ },
7568
+ [ALC292_FIXUP_DELL_E7X] = {
7569
+ .type = HDA_FIXUP_FUNC,
7570
+ .v.func = alc_fixup_micmute_led,
7571
+ /* micmute fixup must be applied at last */
7572
+ .chained_before = true,
7573
+ .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
7574
+ },
7575
+ [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
7576
+ .type = HDA_FIXUP_PINS,
7577
+ .v.pins = (const struct hda_pintbl[]) {
7578
+ { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
7579
+ { }
7580
+ },
7581
+ .chained_before = true,
7582
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
65157583 },
65167584 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
65177585 .type = HDA_FIXUP_PINS,
....@@ -6552,6 +7620,16 @@
65527620 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
65537621 .type = HDA_FIXUP_FUNC,
65547622 .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
7623
+ },
7624
+ [ALC233_FIXUP_INTEL_NUC8_DMIC] = {
7625
+ .type = HDA_FIXUP_FUNC,
7626
+ .v.func = alc_fixup_inv_dmic,
7627
+ .chained = true,
7628
+ .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST,
7629
+ },
7630
+ [ALC233_FIXUP_INTEL_NUC8_BOOST] = {
7631
+ .type = HDA_FIXUP_FUNC,
7632
+ .v.func = alc269_fixup_limit_int_mic_boost
65557633 },
65567634 [ALC255_FIXUP_DELL_SPK_NOISE] = {
65577635 .type = HDA_FIXUP_FUNC,
....@@ -6629,6 +7707,16 @@
66297707 .v.func = alc_fixup_auto_mute_via_amp,
66307708 .chained = true,
66317709 .chain_id = ALC269_FIXUP_NO_SHUTUP
7710
+ },
7711
+ [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
7712
+ .type = HDA_FIXUP_PINS,
7713
+ .v.pins = (const struct hda_pintbl[]) {
7714
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7715
+ { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
7716
+ { }
7717
+ },
7718
+ .chained = true,
7719
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
66327720 },
66337721 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
66347722 .type = HDA_FIXUP_PINS,
....@@ -6851,6 +7939,16 @@
68517939 .chained = true,
68527940 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
68537941 },
7942
+ [ALC295_FIXUP_CHROME_BOOK] = {
7943
+ .type = HDA_FIXUP_FUNC,
7944
+ .v.func = alc295_fixup_chromebook,
7945
+ .chained = true,
7946
+ .chain_id = ALC225_FIXUP_HEADSET_JACK
7947
+ },
7948
+ [ALC225_FIXUP_HEADSET_JACK] = {
7949
+ .type = HDA_FIXUP_FUNC,
7950
+ .v.func = alc_fixup_headset_jack,
7951
+ },
68547952 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
68557953 .type = HDA_FIXUP_PINS,
68567954 .v.pins = (const struct hda_pintbl[]) {
....@@ -6976,6 +8074,18 @@
69768074 .chained = true,
69778075 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1
69788076 },
8077
+ [ALC285_FIXUP_THINKPAD_X1_GEN7] = {
8078
+ .type = HDA_FIXUP_FUNC,
8079
+ .v.func = alc285_fixup_thinkpad_x1_gen7,
8080
+ .chained = true,
8081
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8082
+ },
8083
+ [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
8084
+ .type = HDA_FIXUP_FUNC,
8085
+ .v.func = alc_fixup_headset_jack,
8086
+ .chained = true,
8087
+ .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
8088
+ },
69798089 [ALC294_FIXUP_ASUS_HPE] = {
69808090 .type = HDA_FIXUP_VERBS,
69818091 .v.verbs = (const struct hda_verb[]) {
....@@ -6987,9 +8097,612 @@
69878097 .chained = true,
69888098 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
69898099 },
8100
+ [ALC294_FIXUP_ASUS_GX502_PINS] = {
8101
+ .type = HDA_FIXUP_PINS,
8102
+ .v.pins = (const struct hda_pintbl[]) {
8103
+ { 0x19, 0x03a11050 }, /* front HP mic */
8104
+ { 0x1a, 0x01a11830 }, /* rear external mic */
8105
+ { 0x21, 0x03211020 }, /* front HP out */
8106
+ { }
8107
+ },
8108
+ .chained = true,
8109
+ .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
8110
+ },
8111
+ [ALC294_FIXUP_ASUS_GX502_VERBS] = {
8112
+ .type = HDA_FIXUP_VERBS,
8113
+ .v.verbs = (const struct hda_verb[]) {
8114
+ /* set 0x15 to HP-OUT ctrl */
8115
+ { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8116
+ /* unmute the 0x15 amp */
8117
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8118
+ { }
8119
+ },
8120
+ .chained = true,
8121
+ .chain_id = ALC294_FIXUP_ASUS_GX502_HP
8122
+ },
8123
+ [ALC294_FIXUP_ASUS_GX502_HP] = {
8124
+ .type = HDA_FIXUP_FUNC,
8125
+ .v.func = alc294_fixup_gx502_hp,
8126
+ },
8127
+ [ALC294_FIXUP_ASUS_GU502_PINS] = {
8128
+ .type = HDA_FIXUP_PINS,
8129
+ .v.pins = (const struct hda_pintbl[]) {
8130
+ { 0x19, 0x01a11050 }, /* rear HP mic */
8131
+ { 0x1a, 0x01a11830 }, /* rear external mic */
8132
+ { 0x21, 0x012110f0 }, /* rear HP out */
8133
+ { }
8134
+ },
8135
+ .chained = true,
8136
+ .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
8137
+ },
8138
+ [ALC294_FIXUP_ASUS_GU502_VERBS] = {
8139
+ .type = HDA_FIXUP_VERBS,
8140
+ .v.verbs = (const struct hda_verb[]) {
8141
+ /* set 0x15 to HP-OUT ctrl */
8142
+ { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
8143
+ /* unmute the 0x15 amp */
8144
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
8145
+ /* set 0x1b to HP-OUT */
8146
+ { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
8147
+ { }
8148
+ },
8149
+ .chained = true,
8150
+ .chain_id = ALC294_FIXUP_ASUS_GU502_HP
8151
+ },
8152
+ [ALC294_FIXUP_ASUS_GU502_HP] = {
8153
+ .type = HDA_FIXUP_FUNC,
8154
+ .v.func = alc294_fixup_gu502_hp,
8155
+ },
8156
+ [ALC294_FIXUP_ASUS_G513_PINS] = {
8157
+ .type = HDA_FIXUP_PINS,
8158
+ .v.pins = (const struct hda_pintbl[]) {
8159
+ { 0x19, 0x03a11050 }, /* front HP mic */
8160
+ { 0x1a, 0x03a11c30 }, /* rear external mic */
8161
+ { 0x21, 0x03211420 }, /* front HP out */
8162
+ { }
8163
+ },
8164
+ },
8165
+ [ALC285_FIXUP_ASUS_G533Z_PINS] = {
8166
+ .type = HDA_FIXUP_PINS,
8167
+ .v.pins = (const struct hda_pintbl[]) {
8168
+ { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
8169
+ { 0x19, 0x03a19020 }, /* Mic Boost Volume */
8170
+ { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
8171
+ { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
8172
+ { 0x21, 0x03211420 },
8173
+ { }
8174
+ },
8175
+ },
8176
+ [ALC294_FIXUP_ASUS_COEF_1B] = {
8177
+ .type = HDA_FIXUP_VERBS,
8178
+ .v.verbs = (const struct hda_verb[]) {
8179
+ /* Set bit 10 to correct noisy output after reboot from
8180
+ * Windows 10 (due to pop noise reduction?)
8181
+ */
8182
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
8183
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
8184
+ { }
8185
+ },
8186
+ .chained = true,
8187
+ .chain_id = ALC289_FIXUP_ASUS_GA401,
8188
+ },
69908189 [ALC285_FIXUP_HP_GPIO_LED] = {
69918190 .type = HDA_FIXUP_FUNC,
69928191 .v.func = alc285_fixup_hp_gpio_led,
8192
+ },
8193
+ [ALC285_FIXUP_HP_MUTE_LED] = {
8194
+ .type = HDA_FIXUP_FUNC,
8195
+ .v.func = alc285_fixup_hp_mute_led,
8196
+ },
8197
+ [ALC236_FIXUP_HP_GPIO_LED] = {
8198
+ .type = HDA_FIXUP_FUNC,
8199
+ .v.func = alc236_fixup_hp_gpio_led,
8200
+ },
8201
+ [ALC236_FIXUP_HP_MUTE_LED] = {
8202
+ .type = HDA_FIXUP_FUNC,
8203
+ .v.func = alc236_fixup_hp_mute_led,
8204
+ },
8205
+ [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
8206
+ .type = HDA_FIXUP_FUNC,
8207
+ .v.func = alc236_fixup_hp_mute_led_micmute_vref,
8208
+ },
8209
+ [ALC298_FIXUP_SAMSUNG_AMP] = {
8210
+ .type = HDA_FIXUP_FUNC,
8211
+ .v.func = alc298_fixup_samsung_amp,
8212
+ .chained = true,
8213
+ .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
8214
+ },
8215
+ [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8216
+ .type = HDA_FIXUP_VERBS,
8217
+ .v.verbs = (const struct hda_verb[]) {
8218
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
8219
+ { }
8220
+ },
8221
+ },
8222
+ [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
8223
+ .type = HDA_FIXUP_VERBS,
8224
+ .v.verbs = (const struct hda_verb[]) {
8225
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
8226
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
8227
+ { }
8228
+ },
8229
+ },
8230
+ [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
8231
+ .type = HDA_FIXUP_PINS,
8232
+ .v.pins = (const struct hda_pintbl[]) {
8233
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8234
+ { }
8235
+ },
8236
+ .chained = true,
8237
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8238
+ },
8239
+ [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
8240
+ .type = HDA_FIXUP_PINS,
8241
+ .v.pins = (const struct hda_pintbl[]) {
8242
+ { 0x14, 0x90100120 }, /* use as internal speaker */
8243
+ { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
8244
+ { 0x1a, 0x01011020 }, /* use as line out */
8245
+ { },
8246
+ },
8247
+ .chained = true,
8248
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8249
+ },
8250
+ [ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
8251
+ .type = HDA_FIXUP_PINS,
8252
+ .v.pins = (const struct hda_pintbl[]) {
8253
+ { 0x18, 0x02a11030 }, /* use as headset mic */
8254
+ { }
8255
+ },
8256
+ .chained = true,
8257
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8258
+ },
8259
+ [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
8260
+ .type = HDA_FIXUP_PINS,
8261
+ .v.pins = (const struct hda_pintbl[]) {
8262
+ { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
8263
+ { }
8264
+ },
8265
+ .chained = true,
8266
+ .chain_id = ALC269_FIXUP_HEADSET_MIC
8267
+ },
8268
+ [ALC289_FIXUP_ASUS_GA401] = {
8269
+ .type = HDA_FIXUP_FUNC,
8270
+ .v.func = alc289_fixup_asus_ga401,
8271
+ .chained = true,
8272
+ .chain_id = ALC289_FIXUP_ASUS_GA502,
8273
+ },
8274
+ [ALC289_FIXUP_ASUS_GA502] = {
8275
+ .type = HDA_FIXUP_PINS,
8276
+ .v.pins = (const struct hda_pintbl[]) {
8277
+ { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8278
+ { }
8279
+ },
8280
+ },
8281
+ [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
8282
+ .type = HDA_FIXUP_PINS,
8283
+ .v.pins = (const struct hda_pintbl[]) {
8284
+ { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
8285
+ { }
8286
+ },
8287
+ .chained = true,
8288
+ .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
8289
+ },
8290
+ [ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
8291
+ .type = HDA_FIXUP_FUNC,
8292
+ .v.func = alc285_fixup_hp_gpio_amp_init,
8293
+ .chained = true,
8294
+ .chain_id = ALC285_FIXUP_HP_GPIO_LED
8295
+ },
8296
+ [ALC269_FIXUP_CZC_B20] = {
8297
+ .type = HDA_FIXUP_PINS,
8298
+ .v.pins = (const struct hda_pintbl[]) {
8299
+ { 0x12, 0x411111f0 },
8300
+ { 0x14, 0x90170110 }, /* speaker */
8301
+ { 0x15, 0x032f1020 }, /* HP out */
8302
+ { 0x17, 0x411111f0 },
8303
+ { 0x18, 0x03ab1040 }, /* mic */
8304
+ { 0x19, 0xb7a7013f },
8305
+ { 0x1a, 0x0181305f },
8306
+ { 0x1b, 0x411111f0 },
8307
+ { 0x1d, 0x411111f0 },
8308
+ { 0x1e, 0x411111f0 },
8309
+ { }
8310
+ },
8311
+ .chain_id = ALC269_FIXUP_DMIC,
8312
+ },
8313
+ [ALC269_FIXUP_CZC_TMI] = {
8314
+ .type = HDA_FIXUP_PINS,
8315
+ .v.pins = (const struct hda_pintbl[]) {
8316
+ { 0x12, 0x4000c000 },
8317
+ { 0x14, 0x90170110 }, /* speaker */
8318
+ { 0x15, 0x0421401f }, /* HP out */
8319
+ { 0x17, 0x411111f0 },
8320
+ { 0x18, 0x04a19020 }, /* mic */
8321
+ { 0x19, 0x411111f0 },
8322
+ { 0x1a, 0x411111f0 },
8323
+ { 0x1b, 0x411111f0 },
8324
+ { 0x1d, 0x40448505 },
8325
+ { 0x1e, 0x411111f0 },
8326
+ { 0x20, 0x8000ffff },
8327
+ { }
8328
+ },
8329
+ .chain_id = ALC269_FIXUP_DMIC,
8330
+ },
8331
+ [ALC269_FIXUP_CZC_L101] = {
8332
+ .type = HDA_FIXUP_PINS,
8333
+ .v.pins = (const struct hda_pintbl[]) {
8334
+ { 0x12, 0x40000000 },
8335
+ { 0x14, 0x01014010 }, /* speaker */
8336
+ { 0x15, 0x411111f0 }, /* HP out */
8337
+ { 0x16, 0x411111f0 },
8338
+ { 0x18, 0x01a19020 }, /* mic */
8339
+ { 0x19, 0x02a19021 },
8340
+ { 0x1a, 0x0181302f },
8341
+ { 0x1b, 0x0221401f },
8342
+ { 0x1c, 0x411111f0 },
8343
+ { 0x1d, 0x4044c601 },
8344
+ { 0x1e, 0x411111f0 },
8345
+ { }
8346
+ },
8347
+ .chain_id = ALC269_FIXUP_DMIC,
8348
+ },
8349
+ [ALC269_FIXUP_LEMOTE_A1802] = {
8350
+ .type = HDA_FIXUP_PINS,
8351
+ .v.pins = (const struct hda_pintbl[]) {
8352
+ { 0x12, 0x40000000 },
8353
+ { 0x14, 0x90170110 }, /* speaker */
8354
+ { 0x17, 0x411111f0 },
8355
+ { 0x18, 0x03a19040 }, /* mic1 */
8356
+ { 0x19, 0x90a70130 }, /* mic2 */
8357
+ { 0x1a, 0x411111f0 },
8358
+ { 0x1b, 0x411111f0 },
8359
+ { 0x1d, 0x40489d2d },
8360
+ { 0x1e, 0x411111f0 },
8361
+ { 0x20, 0x0003ffff },
8362
+ { 0x21, 0x03214020 },
8363
+ { }
8364
+ },
8365
+ .chain_id = ALC269_FIXUP_DMIC,
8366
+ },
8367
+ [ALC269_FIXUP_LEMOTE_A190X] = {
8368
+ .type = HDA_FIXUP_PINS,
8369
+ .v.pins = (const struct hda_pintbl[]) {
8370
+ { 0x14, 0x99130110 }, /* speaker */
8371
+ { 0x15, 0x0121401f }, /* HP out */
8372
+ { 0x18, 0x01a19c20 }, /* rear mic */
8373
+ { 0x19, 0x99a3092f }, /* front mic */
8374
+ { 0x1b, 0x0201401f }, /* front lineout */
8375
+ { }
8376
+ },
8377
+ .chain_id = ALC269_FIXUP_DMIC,
8378
+ },
8379
+ [ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
8380
+ .type = HDA_FIXUP_PINS,
8381
+ .v.pins = (const struct hda_pintbl[]) {
8382
+ { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8383
+ { }
8384
+ },
8385
+ .chained = true,
8386
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8387
+ },
8388
+ [ALC256_FIXUP_INTEL_NUC10] = {
8389
+ .type = HDA_FIXUP_PINS,
8390
+ .v.pins = (const struct hda_pintbl[]) {
8391
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8392
+ { }
8393
+ },
8394
+ .chained = true,
8395
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8396
+ },
8397
+ [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
8398
+ .type = HDA_FIXUP_VERBS,
8399
+ .v.verbs = (const struct hda_verb[]) {
8400
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8401
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8402
+ { }
8403
+ },
8404
+ .chained = true,
8405
+ .chain_id = ALC289_FIXUP_ASUS_GA502
8406
+ },
8407
+ [ALC274_FIXUP_HP_MIC] = {
8408
+ .type = HDA_FIXUP_VERBS,
8409
+ .v.verbs = (const struct hda_verb[]) {
8410
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
8411
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
8412
+ { }
8413
+ },
8414
+ },
8415
+ [ALC274_FIXUP_HP_HEADSET_MIC] = {
8416
+ .type = HDA_FIXUP_FUNC,
8417
+ .v.func = alc274_fixup_hp_headset_mic,
8418
+ .chained = true,
8419
+ .chain_id = ALC274_FIXUP_HP_MIC
8420
+ },
8421
+ [ALC274_FIXUP_HP_ENVY_GPIO] = {
8422
+ .type = HDA_FIXUP_FUNC,
8423
+ .v.func = alc274_fixup_hp_envy_gpio,
8424
+ },
8425
+ [ALC256_FIXUP_ASUS_HPE] = {
8426
+ .type = HDA_FIXUP_VERBS,
8427
+ .v.verbs = (const struct hda_verb[]) {
8428
+ /* Set EAPD high */
8429
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
8430
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
8431
+ { }
8432
+ },
8433
+ .chained = true,
8434
+ .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
8435
+ },
8436
+ [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
8437
+ .type = HDA_FIXUP_FUNC,
8438
+ .v.func = alc_fixup_headset_jack,
8439
+ .chained = true,
8440
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI
8441
+ },
8442
+ [ALC287_FIXUP_HP_GPIO_LED] = {
8443
+ .type = HDA_FIXUP_FUNC,
8444
+ .v.func = alc287_fixup_hp_gpio_led,
8445
+ },
8446
+ [ALC256_FIXUP_HP_HEADSET_MIC] = {
8447
+ .type = HDA_FIXUP_FUNC,
8448
+ .v.func = alc274_fixup_hp_headset_mic,
8449
+ },
8450
+ [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
8451
+ .type = HDA_FIXUP_FUNC,
8452
+ .v.func = alc_fixup_no_int_mic,
8453
+ .chained = true,
8454
+ .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
8455
+ },
8456
+ [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
8457
+ .type = HDA_FIXUP_PINS,
8458
+ .v.pins = (const struct hda_pintbl[]) {
8459
+ { 0x1b, 0x411111f0 },
8460
+ { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8461
+ { },
8462
+ },
8463
+ .chained = true,
8464
+ .chain_id = ALC269_FIXUP_HEADSET_MODE
8465
+ },
8466
+ [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
8467
+ .type = HDA_FIXUP_FUNC,
8468
+ .v.func = alc269_fixup_limit_int_mic_boost,
8469
+ .chained = true,
8470
+ .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
8471
+ },
8472
+ [ALC256_FIXUP_ACER_HEADSET_MIC] = {
8473
+ .type = HDA_FIXUP_PINS,
8474
+ .v.pins = (const struct hda_pintbl[]) {
8475
+ { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
8476
+ { 0x1a, 0x90a1092f }, /* use as internal mic */
8477
+ { }
8478
+ },
8479
+ .chained = true,
8480
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8481
+ },
8482
+ [ALC285_FIXUP_IDEAPAD_S740_COEF] = {
8483
+ .type = HDA_FIXUP_FUNC,
8484
+ .v.func = alc285_fixup_ideapad_s740_coef,
8485
+ .chained = true,
8486
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
8487
+ },
8488
+ [ALC295_FIXUP_ASUS_DACS] = {
8489
+ .type = HDA_FIXUP_FUNC,
8490
+ .v.func = alc295_fixup_asus_dacs,
8491
+ },
8492
+ [ALC295_FIXUP_HP_OMEN] = {
8493
+ .type = HDA_FIXUP_PINS,
8494
+ .v.pins = (const struct hda_pintbl[]) {
8495
+ { 0x12, 0xb7a60130 },
8496
+ { 0x13, 0x40000000 },
8497
+ { 0x14, 0x411111f0 },
8498
+ { 0x16, 0x411111f0 },
8499
+ { 0x17, 0x90170110 },
8500
+ { 0x18, 0x411111f0 },
8501
+ { 0x19, 0x02a11030 },
8502
+ { 0x1a, 0x411111f0 },
8503
+ { 0x1b, 0x04a19030 },
8504
+ { 0x1d, 0x40600001 },
8505
+ { 0x1e, 0x411111f0 },
8506
+ { 0x21, 0x03211020 },
8507
+ {}
8508
+ },
8509
+ .chained = true,
8510
+ .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
8511
+ },
8512
+ [ALC285_FIXUP_HP_SPECTRE_X360] = {
8513
+ .type = HDA_FIXUP_FUNC,
8514
+ .v.func = alc285_fixup_hp_spectre_x360,
8515
+ },
8516
+ [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
8517
+ .type = HDA_FIXUP_FUNC,
8518
+ .v.func = alc285_fixup_hp_spectre_x360_eb1
8519
+ },
8520
+ [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
8521
+ .type = HDA_FIXUP_FUNC,
8522
+ .v.func = alc285_fixup_ideapad_s740_coef,
8523
+ .chained = true,
8524
+ .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
8525
+ },
8526
+ [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
8527
+ .type = HDA_FIXUP_FUNC,
8528
+ .v.func = alc_fixup_no_shutup,
8529
+ .chained = true,
8530
+ .chain_id = ALC283_FIXUP_HEADSET_MIC,
8531
+ },
8532
+ [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
8533
+ .type = HDA_FIXUP_PINS,
8534
+ .v.pins = (const struct hda_pintbl[]) {
8535
+ { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
8536
+ { }
8537
+ },
8538
+ .chained = true,
8539
+ .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
8540
+ },
8541
+ [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
8542
+ .type = HDA_FIXUP_FUNC,
8543
+ .v.func = alc269_fixup_limit_int_mic_boost,
8544
+ .chained = true,
8545
+ .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
8546
+ },
8547
+ [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
8548
+ .type = HDA_FIXUP_FUNC,
8549
+ .v.func = alc285_fixup_ideapad_s740_coef,
8550
+ .chained = true,
8551
+ .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
8552
+ },
8553
+ [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
8554
+ .type = HDA_FIXUP_FUNC,
8555
+ .v.func = alc287_fixup_legion_15imhg05_speakers,
8556
+ .chained = true,
8557
+ .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
8558
+ },
8559
+ [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
8560
+ .type = HDA_FIXUP_VERBS,
8561
+ //.v.verbs = legion_15imhg05_coefs,
8562
+ .v.verbs = (const struct hda_verb[]) {
8563
+ // set left speaker Legion 7i.
8564
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8565
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8566
+
8567
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8568
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8569
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8570
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8571
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8572
+
8573
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8574
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8575
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8576
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8577
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8578
+
8579
+ // set right speaker Legion 7i.
8580
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8581
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8582
+
8583
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8584
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8585
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8586
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8587
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8588
+
8589
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8590
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8591
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8592
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8593
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8594
+ {}
8595
+ },
8596
+ .chained = true,
8597
+ .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
8598
+ },
8599
+ [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
8600
+ .type = HDA_FIXUP_FUNC,
8601
+ .v.func = alc287_fixup_legion_15imhg05_speakers,
8602
+ .chained = true,
8603
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8604
+ },
8605
+ [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
8606
+ .type = HDA_FIXUP_VERBS,
8607
+ .v.verbs = (const struct hda_verb[]) {
8608
+ // set left speaker Yoga 7i.
8609
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8610
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8611
+
8612
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8613
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8614
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8615
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8616
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8617
+
8618
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8619
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8620
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8621
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8622
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8623
+
8624
+ // set right speaker Yoga 7i.
8625
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8626
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
8627
+
8628
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8629
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8630
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8631
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8632
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8633
+
8634
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8635
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8636
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8637
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8638
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8639
+ {}
8640
+ },
8641
+ .chained = true,
8642
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8643
+ },
8644
+ [ALC298_FIXUP_LENOVO_C940_DUET7] = {
8645
+ .type = HDA_FIXUP_FUNC,
8646
+ .v.func = alc298_fixup_lenovo_c940_duet7,
8647
+ },
8648
+ [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
8649
+ .type = HDA_FIXUP_VERBS,
8650
+ .v.verbs = (const struct hda_verb[]) {
8651
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8652
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8653
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8654
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8655
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8656
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8657
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8658
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8659
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8660
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8661
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8662
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8663
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8664
+ { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8665
+ {}
8666
+ },
8667
+ .chained = true,
8668
+ .chain_id = ALC269_FIXUP_HEADSET_MODE,
8669
+ },
8670
+ [ALC256_FIXUP_SET_COEF_DEFAULTS] = {
8671
+ .type = HDA_FIXUP_FUNC,
8672
+ .v.func = alc256_fixup_set_coef_defaults,
8673
+ },
8674
+ [ALC245_FIXUP_HP_GPIO_LED] = {
8675
+ .type = HDA_FIXUP_FUNC,
8676
+ .v.func = alc245_fixup_hp_gpio_led,
8677
+ },
8678
+ [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
8679
+ .type = HDA_FIXUP_PINS,
8680
+ .v.pins = (const struct hda_pintbl[]) {
8681
+ { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
8682
+ { }
8683
+ },
8684
+ .chained = true,
8685
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
8686
+ },
8687
+ [ALC233_FIXUP_NO_AUDIO_JACK] = {
8688
+ .type = HDA_FIXUP_FUNC,
8689
+ .v.func = alc233_fixup_no_audio_jack,
8690
+ },
8691
+ [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
8692
+ .type = HDA_FIXUP_FUNC,
8693
+ .v.func = alc256_fixup_mic_no_presence_and_resume,
8694
+ .chained = true,
8695
+ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
8696
+ },
8697
+ [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
8698
+ .type = HDA_FIXUP_VERBS,
8699
+ .v.verbs = (const struct hda_verb[]) {
8700
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
8701
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
8702
+ { }
8703
+ },
8704
+ .chained = true,
8705
+ .chain_id = ALC285_FIXUP_HP_MUTE_LED,
69938706 },
69948707 };
69958708
....@@ -6999,24 +8712,41 @@
69998712 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
70008713 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
70018714 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),
70038715 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
70048716 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
70058717 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
70068718 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
70078719 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
8720
+ SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
8721
+ SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
8722
+ SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
70088723 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
8724
+ SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
70098725 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
8726
+ SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
70108727 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
70118728 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8729
+ SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
8730
+ SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
70128731 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
8732
+ SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
8733
+ SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
8734
+ SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
70138735 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70148736 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70158737 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
8738
+ SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
8739
+ SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8740
+ SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
70168741 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
70178742 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
70188743 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
8744
+ SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8745
+ SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
8746
+ SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
8747
+ SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
70198748 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
8749
+ SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
70208750 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
70218751 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
70228752 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
....@@ -7064,6 +8794,15 @@
70648794 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
70658795 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
70668796 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
8797
+ SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8798
+ SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
8799
+ SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
8800
+ SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
8801
+ SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
8802
+ SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8803
+ SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8804
+ SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
8805
+ SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
70678806 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
70688807 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
70698808 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
....@@ -7123,8 +8862,11 @@
71238862 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
71248863 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
71258864 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
8865
+ SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
71268866 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
71278867 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
8868
+ SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
8869
+ SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
71288870 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
71298871 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
71308872 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
....@@ -7134,8 +8876,59 @@
71348876 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
71358877 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
71368878 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8879
+ SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
71378880 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),
8881
+ SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
8882
+ SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8883
+ SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8884
+ SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8885
+ SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
8886
+ SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8887
+ SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8888
+ SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8889
+ SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8890
+ SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
8891
+ SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
8892
+ SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
8893
+ SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8894
+ SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
8895
+ SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8896
+ SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
8897
+ SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
8898
+ SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8899
+ SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
8900
+ ALC285_FIXUP_HP_GPIO_AMP_INIT),
8901
+ SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
8902
+ ALC285_FIXUP_HP_GPIO_AMP_INIT),
8903
+ SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
8904
+ SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
8905
+ SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
8906
+ SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
8907
+ SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8908
+ SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8909
+ SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8910
+ SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8911
+ SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
8912
+ SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
8913
+ SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
8914
+ SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
8915
+ SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
8916
+ SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8917
+ SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8918
+ SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8919
+ SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8920
+ SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8921
+ SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8922
+ SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8923
+ SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
8924
+ SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
8925
+ SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8926
+ SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8927
+ SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
8928
+ SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
8929
+ SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
8930
+ SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
8931
+ SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
71398932 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
71408933 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
71418934 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
....@@ -7144,25 +8937,46 @@
71448937 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71458938 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
71468939 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
8940
+ SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71478941 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
71488942 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
71498943 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),
71518944 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
8945
+ SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
8946
+ SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
71528947 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
71538948 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
71548949 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
8950
+ SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
8951
+ SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
71558952 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
8953
+ SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
71568954 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
8955
+ SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
71578956 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
8957
+ SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
8958
+ SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
8959
+ SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
8960
+ SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
71588961 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
8962
+ SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
71598963 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
71608964 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
8965
+ SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
71618966 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
71628967 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
71638968 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),
8969
+ SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
71658970 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
8971
+ SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
8972
+ SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
8973
+ SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
8974
+ SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
8975
+ SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
8976
+ SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
8977
+ SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
8978
+ SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
8979
+ SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
71668980 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
71678981 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
71688982 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
....@@ -7178,13 +8992,27 @@
71788992 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
71798993 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
71808994 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),
71828995 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
8996
+ SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
71838997 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
71848998 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
8999
+ SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
9000
+ SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9001
+ SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9002
+ SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
9003
+ SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
71859004 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
71869005 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
9006
+ SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9007
+ SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
9008
+ SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
9009
+ SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9010
+ SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
9011
+ SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
71879012 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
9013
+ SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
9014
+ SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
9015
+ SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
71889016 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
71899017 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
71909018 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
....@@ -7198,14 +9026,19 @@
71989026 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
71999027 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72009028 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9029
+ SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72019030 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72029031 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72039032 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9033
+ SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9034
+ SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72049035 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72059036 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72069037 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72079038 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72089039 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9040
+ SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9041
+ SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72099042 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72109043 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72119044 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7220,6 +9053,9 @@
72209053 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72219054 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72229055 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9056
+ SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9057
+ SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9058
+ SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72239059 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72249060 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72259061 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7231,8 +9067,11 @@
72319067 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
72329068 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
72339069 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9070
+ SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9071
+ SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9072
+ SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72349073 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),
9074
+ SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
72369075 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72379076 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72389077 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
....@@ -7249,7 +9088,7 @@
72499088 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72509089 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
72519090 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
7252
- SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
9091
+ SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
72539092 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
72549093 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
72559094 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
....@@ -7283,8 +9122,10 @@
72839122 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
72849123 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
72859124 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),
9125
+ SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
9126
+ SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
9127
+ SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
9128
+ SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
72889129 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
72899130 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
72909131 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
....@@ -7295,7 +9136,20 @@
72959136 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
72969137 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
72979138 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7298
- SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
9139
+ SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
9140
+ SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9141
+ SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
9142
+ SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
9143
+ SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
9144
+ SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9145
+ SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
9146
+ SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
9147
+ SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9148
+ SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
9149
+ SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
9150
+ SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9151
+ SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
9152
+ SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
72999153 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
73009154 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
73019155 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
....@@ -7315,14 +9169,38 @@
73159169 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73169170 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73179171 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
9172
+ SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
73189173 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
73199174 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73209175 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
73219176 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
7322
- SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS),
9177
+ SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
9178
+ SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
9179
+ SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
9180
+ SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
9181
+ SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
9182
+ SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
9183
+ SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
73239184 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
9185
+ SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
9186
+ SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
9187
+ SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
9188
+ SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
9189
+ SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
9190
+ SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9191
+ SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9192
+ SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
9193
+ SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
9194
+ SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
9195
+ SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
9196
+ SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
9197
+ SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
73249198 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),
9199
+ SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
9200
+ SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
9201
+ SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
9202
+ SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
9203
+ SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
73269204
73279205 #if 0
73289206 /* Below is a quirk table taken from the old code.
....@@ -7380,6 +9258,7 @@
73809258 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
73819259 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
73829260 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI),
9261
+ SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
73839262 {}
73849263 };
73859264
....@@ -7449,8 +9328,9 @@
74499328 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
74509329 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
74519330 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
7452
- {.id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, .name = "alc255-dell-mute"},
9331
+ {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
74539332 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
9333
+ {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
74549334 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
74559335 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
74569336 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
....@@ -7488,8 +9368,23 @@
74889368 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
74899369 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
74909370 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
9371
+ {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
9372
+ {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
74919373 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
9374
+ {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
74929375 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
9376
+ {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
9377
+ {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
9378
+ {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
9379
+ {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
9380
+ {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
9381
+ {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
9382
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
9383
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
9384
+ {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
9385
+ {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
9386
+ {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
9387
+ {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
74939388 {}
74949389 };
74959390 #define ALC225_STANDARD_PINS \
....@@ -7584,20 +9479,12 @@
75849479 {0x19, 0x02a11020},
75859480 {0x1a, 0x02a11030},
75869481 {0x21, 0x0221101f}),
7587
- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
7588
- {0x12, 0x90a60140},
9482
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
9483
+ {0x21, 0x02211010}),
9484
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
75899485 {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}),
9486
+ {0x19, 0x02a11020},
9487
+ {0x21, 0x02211030}),
76019488 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
76029489 {0x14, 0x90170110},
76039490 {0x21, 0x02211020}),
....@@ -7680,38 +9567,6 @@
76809567 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
76819568 {0x1b, 0x01011020},
76829569 {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}),
77159570 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
77169571 {0x14, 0x90170110},
77179572 {0x1b, 0x90a70130},
....@@ -7732,11 +9587,14 @@
77329587 {0x1a, 0x90a70130},
77339588 {0x1b, 0x90170110},
77349589 {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}),
9590
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
9591
+ {0x14, 0x90170110},
9592
+ {0x19, 0x02a11020},
9593
+ {0x21, 0x0221101f}),
9594
+ SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
9595
+ {0x17, 0x90170110},
9596
+ {0x19, 0x03a11030},
9597
+ {0x21, 0x03211020}),
77409598 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
77419599 {0x12, 0x90a60130},
77429600 {0x14, 0x90170110},
....@@ -7774,6 +9632,22 @@
77749632 {0x12, 0x90a60140},
77759633 {0x19, 0x04a11030},
77769634 {0x21, 0x04211020}),
9635
+ SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9636
+ ALC282_STANDARD_PINS,
9637
+ {0x12, 0x90a609c0},
9638
+ {0x18, 0x03a11830},
9639
+ {0x19, 0x04a19831},
9640
+ {0x1a, 0x0481303f},
9641
+ {0x1b, 0x04211020},
9642
+ {0x21, 0x0321101f}),
9643
+ SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
9644
+ ALC282_STANDARD_PINS,
9645
+ {0x12, 0x90a60940},
9646
+ {0x18, 0x03a11830},
9647
+ {0x19, 0x04a19831},
9648
+ {0x1a, 0x0481303f},
9649
+ {0x1b, 0x04211020},
9650
+ {0x21, 0x0321101f}),
77779651 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
77789652 ALC282_STANDARD_PINS,
77799653 {0x12, 0x90a60130},
....@@ -7792,6 +9666,20 @@
77929666 {0x14, 0x90170110},
77939667 {0x19, 0x04a11040},
77949668 {0x21, 0x04211020}),
9669
+ SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
9670
+ {0x14, 0x90170110},
9671
+ {0x19, 0x04a11040},
9672
+ {0x1d, 0x40600001},
9673
+ {0x21, 0x04211020}),
9674
+ SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
9675
+ {0x14, 0x90170110},
9676
+ {0x19, 0x04a11040},
9677
+ {0x21, 0x04211020}),
9678
+ SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
9679
+ {0x14, 0x90170110},
9680
+ {0x17, 0x90170111},
9681
+ {0x19, 0x03a11030},
9682
+ {0x21, 0x03211020}),
77959683 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
77969684 {0x12, 0x90a60130},
77979685 {0x17, 0x90170110},
....@@ -7800,10 +9688,6 @@
78009688 {0x12, 0x90a60120},
78019689 {0x14, 0x90170110},
78029690 {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}),
78079691 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
78089692 ALC290_STANDARD_PINS,
78099693 {0x15, 0x04211040},
....@@ -7878,6 +9762,18 @@
78789762 {0x12, 0x90a60130},
78799763 {0x17, 0x90170110},
78809764 {0x21, 0x03211020}),
9765
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9766
+ {0x12, 0x90a60120},
9767
+ {0x17, 0x90170110},
9768
+ {0x21, 0x04211030}),
9769
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9770
+ {0x12, 0x90a60130},
9771
+ {0x17, 0x90170110},
9772
+ {0x21, 0x03211020}),
9773
+ SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
9774
+ {0x12, 0x90a60130},
9775
+ {0x17, 0x90170110},
9776
+ {0x21, 0x03211020}),
78819777 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
78829778 {0x14, 0x90170110},
78839779 {0x21, 0x04211020}),
....@@ -7909,6 +9805,11 @@
79099805 {0x17, 0x90170110},
79109806 {0x1a, 0x03011020},
79119807 {0x21, 0x03211030}),
9808
+ SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
9809
+ {0x12, 0xb7a60140},
9810
+ {0x17, 0x90170110},
9811
+ {0x1a, 0x03a11030},
9812
+ {0x21, 0x03211020}),
79129813 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
79139814 ALC225_STANDARD_PINS,
79149815 {0x12, 0xb7a60130},
....@@ -7919,6 +9820,28 @@
79199820 {0x18, 0x02a11030},
79209821 {0x19, 0x02a1103f},
79219822 {0x21, 0x0221101f}),
9823
+ {}
9824
+};
9825
+
9826
+/* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
9827
+ * more machines, don't need to match all valid pins, just need to match
9828
+ * all the pins defined in the tbl. Just because of this reason, it is possible
9829
+ * that a single machine matches multiple tbls, so there is one limitation:
9830
+ * at most one tbl is allowed to define for the same vendor and same codec
9831
+ */
9832
+static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
9833
+ SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
9834
+ {0x19, 0x40000000},
9835
+ {0x1b, 0x40000000}),
9836
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9837
+ {0x19, 0x40000000},
9838
+ {0x1a, 0x40000000}),
9839
+ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
9840
+ {0x19, 0x40000000},
9841
+ {0x1a, 0x40000000}),
9842
+ SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
9843
+ {0x19, 0x40000000},
9844
+ {0x1a, 0x40000000}),
79229845 {}
79239846 };
79249847
....@@ -8050,8 +9973,10 @@
80509973 spec->shutup = alc256_shutup;
80519974 spec->init_hook = alc256_init;
80529975 break;
9976
+ case 0x10ec0230:
80539977 case 0x10ec0236:
80549978 case 0x10ec0256:
9979
+ case 0x19e58326:
80559980 spec->codec_variant = ALC269_TYPE_ALC256;
80569981 spec->shutup = alc256_shutup;
80579982 spec->init_hook = alc256_init;
....@@ -8113,9 +10038,22 @@
811310038 spec->init_hook = alc5505_dsp_init;
811410039 }
811510040
10041
+ alc_pre_init(codec);
10042
+
811610043 snd_hda_pick_fixup(codec, alc269_fixup_models,
811710044 alc269_fixup_tbl, alc269_fixups);
8118
- snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups);
10045
+ /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
10046
+ * the quirk breaks the latter (bko#214101).
10047
+ * Clear the wrong entry.
10048
+ */
10049
+ if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
10050
+ codec->core.vendor_id == 0x10ec0294) {
10051
+ codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
10052
+ codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
10053
+ }
10054
+
10055
+ snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
10056
+ snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
811910057 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
812010058 alc269_fixups);
812110059 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8248,11 +10186,14 @@
824810186 return err;
824910187
825010188 spec = codec->spec;
8251
- spec->gen.beep_nid = 0x23;
10189
+ if (has_cdefine_beep(codec))
10190
+ spec->gen.beep_nid = 0x23;
825210191
825310192 #ifdef CONFIG_PM
825410193 spec->power_hook = alc_power_eapd;
825510194 #endif
10195
+
10196
+ alc_pre_init(codec);
825610197
825710198 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups);
825810199 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8347,9 +10288,12 @@
834710288 return err;
834810289
834910290 spec = codec->spec;
8350
- spec->gen.beep_nid = 0x23;
10291
+ if (has_cdefine_beep(codec))
10292
+ spec->gen.beep_nid = 0x23;
835110293
835210294 spec->shutup = alc_eapd_shutup;
10295
+
10296
+ alc_pre_init(codec);
835310297
835410298 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups);
835510299 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
....@@ -8485,7 +10429,92 @@
848510429 }
848610430 }
848710431
8488
-static struct coef_fw alc668_coefs[] = {
10432
+static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec,
10433
+ struct hda_jack_callback *cb)
10434
+{
10435
+ /* surround speakers at 0x1b already get muted automatically when
10436
+ * headphones are plugged in, but we have to mute/unmute the remaining
10437
+ * channels manually:
10438
+ * 0x15 - front left/front right
10439
+ * 0x18 - front center/ LFE
10440
+ */
10441
+ if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) {
10442
+ snd_hda_set_pin_ctl_cache(codec, 0x15, 0);
10443
+ snd_hda_set_pin_ctl_cache(codec, 0x18, 0);
10444
+ } else {
10445
+ snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT);
10446
+ snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT);
10447
+ }
10448
+}
10449
+
10450
+static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
10451
+ const struct hda_fixup *fix, int action)
10452
+{
10453
+ /* Pin 0x1b: shared headphones jack and surround speakers */
10454
+ if (!is_jack_detectable(codec, 0x1b))
10455
+ return;
10456
+
10457
+ switch (action) {
10458
+ case HDA_FIXUP_ACT_PRE_PROBE:
10459
+ snd_hda_jack_detect_enable_callback(codec, 0x1b,
10460
+ alc662_aspire_ethos_mute_speakers);
10461
+ /* subwoofer needs an extra GPIO setting to become audible */
10462
+ alc_setup_gpio(codec, 0x02);
10463
+ break;
10464
+ case HDA_FIXUP_ACT_INIT:
10465
+ /* Make sure to start in a correct state, i.e. if
10466
+ * headphones have been plugged in before powering up the system
10467
+ */
10468
+ alc662_aspire_ethos_mute_speakers(codec, NULL);
10469
+ break;
10470
+ }
10471
+}
10472
+
10473
+static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
10474
+ const struct hda_fixup *fix, int action)
10475
+{
10476
+ struct alc_spec *spec = codec->spec;
10477
+
10478
+ static const struct hda_pintbl pincfgs[] = {
10479
+ { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
10480
+ { 0x1b, 0x0181304f },
10481
+ { }
10482
+ };
10483
+
10484
+ switch (action) {
10485
+ case HDA_FIXUP_ACT_PRE_PROBE:
10486
+ spec->gen.mixer_nid = 0;
10487
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10488
+ snd_hda_apply_pincfgs(codec, pincfgs);
10489
+ break;
10490
+ case HDA_FIXUP_ACT_INIT:
10491
+ alc_write_coef_idx(codec, 0x19, 0xa054);
10492
+ break;
10493
+ }
10494
+}
10495
+
10496
+static void alc897_hp_automute_hook(struct hda_codec *codec,
10497
+ struct hda_jack_callback *jack)
10498
+{
10499
+ struct alc_spec *spec = codec->spec;
10500
+ int vref;
10501
+
10502
+ snd_hda_gen_hp_automute(codec, jack);
10503
+ vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
10504
+ snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
10505
+ vref);
10506
+}
10507
+
10508
+static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
10509
+ const struct hda_fixup *fix, int action)
10510
+{
10511
+ struct alc_spec *spec = codec->spec;
10512
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
10513
+ spec->gen.hp_automute_hook = alc897_hp_automute_hook;
10514
+ }
10515
+}
10516
+
10517
+static const struct coef_fw alc668_coefs[] = {
848910518 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
849010519 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
849110520 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
....@@ -8519,6 +10548,7 @@
851910548 ALC662_FIXUP_LED_GPIO1,
852010549 ALC662_FIXUP_IDEAPAD,
852110550 ALC272_FIXUP_MARIO,
10551
+ ALC662_FIXUP_CZC_ET26,
852210552 ALC662_FIXUP_CZC_P10T,
852310553 ALC662_FIXUP_SKU_IGNORE,
852410554 ALC662_FIXUP_HP_RP5800,
....@@ -8556,6 +10586,17 @@
855610586 ALC662_FIXUP_USI_FUNC,
855710587 ALC662_FIXUP_USI_HEADSET_MODE,
855810588 ALC662_FIXUP_LENOVO_MULTI_CODECS,
10589
+ ALC669_FIXUP_ACER_ASPIRE_ETHOS,
10590
+ ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET,
10591
+ ALC671_FIXUP_HP_HEADSET_MIC2,
10592
+ ALC662_FIXUP_ACER_X2660G_HEADSET_MODE,
10593
+ ALC662_FIXUP_ACER_NITRO_HEADSET_MODE,
10594
+ ALC668_FIXUP_ASUS_NO_HEADSET_MIC,
10595
+ ALC668_FIXUP_HEADSET_MIC,
10596
+ ALC668_FIXUP_MIC_DET_COEF,
10597
+ ALC897_FIXUP_LENOVO_HEADSET_MIC,
10598
+ ALC897_FIXUP_HEADSET_MIC_PIN,
10599
+ ALC897_FIXUP_HP_HSMIC_VERB,
855910600 };
856010601
856110602 static const struct hda_fixup alc662_fixups[] = {
....@@ -8582,6 +10623,25 @@
858210623 [ALC272_FIXUP_MARIO] = {
858310624 .type = HDA_FIXUP_FUNC,
858410625 .v.func = alc272_fixup_mario,
10626
+ },
10627
+ [ALC662_FIXUP_CZC_ET26] = {
10628
+ .type = HDA_FIXUP_PINS,
10629
+ .v.pins = (const struct hda_pintbl[]) {
10630
+ {0x12, 0x403cc000},
10631
+ {0x14, 0x90170110}, /* speaker */
10632
+ {0x15, 0x411111f0},
10633
+ {0x16, 0x411111f0},
10634
+ {0x18, 0x01a19030}, /* mic */
10635
+ {0x19, 0x90a7013f}, /* int-mic */
10636
+ {0x1a, 0x01014020},
10637
+ {0x1b, 0x0121401f},
10638
+ {0x1c, 0x411111f0},
10639
+ {0x1d, 0x411111f0},
10640
+ {0x1e, 0x40478e35},
10641
+ {}
10642
+ },
10643
+ .chained = true,
10644
+ .chain_id = ALC662_FIXUP_SKU_IGNORE
858510645 },
858610646 [ALC662_FIXUP_CZC_P10T] = {
858710647 .type = HDA_FIXUP_VERBS,
....@@ -8882,6 +10942,87 @@
888210942 .type = HDA_FIXUP_FUNC,
888310943 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
888410944 },
10945
+ [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = {
10946
+ .type = HDA_FIXUP_FUNC,
10947
+ .v.func = alc662_fixup_aspire_ethos_hp,
10948
+ },
10949
+ [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = {
10950
+ .type = HDA_FIXUP_PINS,
10951
+ .v.pins = (const struct hda_pintbl[]) {
10952
+ { 0x15, 0x92130110 }, /* front speakers */
10953
+ { 0x18, 0x99130111 }, /* center/subwoofer */
10954
+ { 0x1b, 0x11130012 }, /* surround plus jack for HP */
10955
+ { }
10956
+ },
10957
+ .chained = true,
10958
+ .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
10959
+ },
10960
+ [ALC671_FIXUP_HP_HEADSET_MIC2] = {
10961
+ .type = HDA_FIXUP_FUNC,
10962
+ .v.func = alc671_fixup_hp_headset_mic2,
10963
+ },
10964
+ [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = {
10965
+ .type = HDA_FIXUP_PINS,
10966
+ .v.pins = (const struct hda_pintbl[]) {
10967
+ { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
10968
+ { }
10969
+ },
10970
+ .chained = true,
10971
+ .chain_id = ALC662_FIXUP_USI_FUNC
10972
+ },
10973
+ [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = {
10974
+ .type = HDA_FIXUP_PINS,
10975
+ .v.pins = (const struct hda_pintbl[]) {
10976
+ { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
10977
+ { 0x1b, 0x0221144f },
10978
+ { }
10979
+ },
10980
+ .chained = true,
10981
+ .chain_id = ALC662_FIXUP_USI_FUNC
10982
+ },
10983
+ [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = {
10984
+ .type = HDA_FIXUP_PINS,
10985
+ .v.pins = (const struct hda_pintbl[]) {
10986
+ { 0x1b, 0x04a1112c },
10987
+ { }
10988
+ },
10989
+ .chained = true,
10990
+ .chain_id = ALC668_FIXUP_HEADSET_MIC
10991
+ },
10992
+ [ALC668_FIXUP_HEADSET_MIC] = {
10993
+ .type = HDA_FIXUP_FUNC,
10994
+ .v.func = alc269_fixup_headset_mic,
10995
+ .chained = true,
10996
+ .chain_id = ALC668_FIXUP_MIC_DET_COEF
10997
+ },
10998
+ [ALC668_FIXUP_MIC_DET_COEF] = {
10999
+ .type = HDA_FIXUP_VERBS,
11000
+ .v.verbs = (const struct hda_verb[]) {
11001
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 },
11002
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 },
11003
+ {}
11004
+ },
11005
+ },
11006
+ [ALC897_FIXUP_LENOVO_HEADSET_MIC] = {
11007
+ .type = HDA_FIXUP_FUNC,
11008
+ .v.func = alc897_fixup_lenovo_headset_mic,
11009
+ },
11010
+ [ALC897_FIXUP_HEADSET_MIC_PIN] = {
11011
+ .type = HDA_FIXUP_PINS,
11012
+ .v.pins = (const struct hda_pintbl[]) {
11013
+ { 0x1a, 0x03a11050 },
11014
+ { }
11015
+ },
11016
+ .chained = true,
11017
+ .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC
11018
+ },
11019
+ [ALC897_FIXUP_HP_HSMIC_VERB] = {
11020
+ .type = HDA_FIXUP_PINS,
11021
+ .v.pins = (const struct hda_pintbl[]) {
11022
+ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
11023
+ { }
11024
+ },
11025
+ },
888511026 };
888611027
888711028 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
....@@ -8893,6 +11034,9 @@
889311034 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
889411035 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC),
889511036 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
11037
+ SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS),
11038
+ SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
11039
+ SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE),
889611040 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
889711041 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
889811042 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13),
....@@ -8904,15 +11048,20 @@
890411048 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
890511049 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
890611050 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
11051
+ SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
11052
+ SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
11053
+ SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
11054
+ SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
890711055 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
890811056 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),
8909
- SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
891011057 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50),
891111058 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751),
11059
+ SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
891211060 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
891311061 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16),
891411062 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
891511063 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51),
11064
+ SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC),
891611065 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8),
891711066 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
891811067 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
....@@ -8921,11 +11070,17 @@
892111070 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
892211071 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
892311072 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
11073
+ SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN),
11074
+ SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN),
11075
+ SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
11076
+ SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
11077
+ SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
892411078 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
892511079 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
892611080 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
892711081 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
892811082 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
11083
+ SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
892911084 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
893011085
893111086 #if 0
....@@ -9013,12 +11168,14 @@
901311168 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
901411169 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
901511170 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
11171
+ {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
901611172 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
901711173 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
901811174 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
901911175 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
902011176 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
902111177 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
11178
+ {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
902211179 {}
902311180 };
902411181
....@@ -9061,6 +11218,23 @@
906111218 {0x12, 0x90a60130},
906211219 {0x14, 0x90170110},
906311220 {0x15, 0x0321101f}),
11221
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11222
+ {0x14, 0x01014010},
11223
+ {0x17, 0x90170150},
11224
+ {0x19, 0x02a11060},
11225
+ {0x1b, 0x01813030},
11226
+ {0x21, 0x02211020}),
11227
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11228
+ {0x14, 0x01014010},
11229
+ {0x18, 0x01a19040},
11230
+ {0x1b, 0x01813030},
11231
+ {0x21, 0x02211020}),
11232
+ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
11233
+ {0x14, 0x01014020},
11234
+ {0x17, 0x90170110},
11235
+ {0x18, 0x01a19050},
11236
+ {0x1b, 0x01813040},
11237
+ {0x21, 0x02211030}),
906411238 {}
906511239 };
906611240
....@@ -9090,9 +11264,11 @@
909011264 break;
909111265 }
909211266
11267
+ alc_pre_init(codec);
11268
+
909311269 snd_hda_pick_fixup(codec, alc662_fixup_models,
909411270 alc662_fixup_tbl, alc662_fixups);
9095
- snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups);
11271
+ snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true);
909611272 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
909711273
909811274 alc_auto_parse_customize_define(codec);
....@@ -9179,6 +11355,7 @@
917911355 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
918011356 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
918111357 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
11358
+ HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269),
918211359 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
918311360 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
918411361 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
....@@ -9252,6 +11429,7 @@
925211429 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
925311430 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
925411431 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
11432
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
925511433 {} /* terminator */
925611434 };
925711435 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);