1 // SPDX-License-Identifier: GPL-2.0-or-later
2 //
3 // Realtek ALC269 and compatible codecs
4 //
5
6 #include <linux/init.h>
7 #include <linux/module.h>
8 #include "realtek.h"
9
10 /* keep halting ALC5505 DSP, for power saving */
11 #define HALT_REALTEK_ALC5505
12
13 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = {
14 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
15 };
16
17 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = {
18 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
19 };
20
21 /* different alc269-variants */
22 enum {
23 ALC269_TYPE_ALC269VA,
24 ALC269_TYPE_ALC269VB,
25 ALC269_TYPE_ALC269VC,
26 ALC269_TYPE_ALC269VD,
27 ALC269_TYPE_ALC280,
28 ALC269_TYPE_ALC282,
29 ALC269_TYPE_ALC283,
30 ALC269_TYPE_ALC284,
31 ALC269_TYPE_ALC293,
32 ALC269_TYPE_ALC286,
33 ALC269_TYPE_ALC298,
34 ALC269_TYPE_ALC255,
35 ALC269_TYPE_ALC256,
36 ALC269_TYPE_ALC257,
37 ALC269_TYPE_ALC215,
38 ALC269_TYPE_ALC225,
39 ALC269_TYPE_ALC245,
40 ALC269_TYPE_ALC287,
41 ALC269_TYPE_ALC294,
42 ALC269_TYPE_ALC300,
43 ALC269_TYPE_ALC623,
44 ALC269_TYPE_ALC700,
45 };
46
47 /*
48 * BIOS auto configuration
49 */
alc269_parse_auto_config(struct hda_codec * codec)50 static int alc269_parse_auto_config(struct hda_codec *codec)
51 {
52 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 };
53 static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 };
54 static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 };
55 struct alc_spec *spec = codec->spec;
56 const hda_nid_t *ssids;
57
58 switch (spec->codec_variant) {
59 case ALC269_TYPE_ALC269VA:
60 case ALC269_TYPE_ALC269VC:
61 case ALC269_TYPE_ALC280:
62 case ALC269_TYPE_ALC284:
63 case ALC269_TYPE_ALC293:
64 ssids = alc269va_ssids;
65 break;
66 case ALC269_TYPE_ALC269VB:
67 case ALC269_TYPE_ALC269VD:
68 case ALC269_TYPE_ALC282:
69 case ALC269_TYPE_ALC283:
70 case ALC269_TYPE_ALC286:
71 case ALC269_TYPE_ALC298:
72 case ALC269_TYPE_ALC255:
73 case ALC269_TYPE_ALC256:
74 case ALC269_TYPE_ALC257:
75 case ALC269_TYPE_ALC215:
76 case ALC269_TYPE_ALC225:
77 case ALC269_TYPE_ALC245:
78 case ALC269_TYPE_ALC287:
79 case ALC269_TYPE_ALC294:
80 case ALC269_TYPE_ALC300:
81 case ALC269_TYPE_ALC623:
82 case ALC269_TYPE_ALC700:
83 ssids = alc269_ssids;
84 break;
85 default:
86 ssids = alc269_ssids;
87 break;
88 }
89
90 return alc_parse_auto_config(codec, alc269_ignore, ssids);
91 }
92
93 static const struct hda_jack_keymap alc_headset_btn_keymap[] = {
94 { SND_JACK_BTN_0, KEY_PLAYPAUSE },
95 { SND_JACK_BTN_1, KEY_VOICECOMMAND },
96 { SND_JACK_BTN_2, KEY_VOLUMEUP },
97 { SND_JACK_BTN_3, KEY_VOLUMEDOWN },
98 {}
99 };
100
alc_headset_btn_callback(struct hda_codec * codec,struct hda_jack_callback * jack)101 static void alc_headset_btn_callback(struct hda_codec *codec,
102 struct hda_jack_callback *jack)
103 {
104 int report = 0;
105
106 if (jack->unsol_res & (7 << 13))
107 report |= SND_JACK_BTN_0;
108
109 if (jack->unsol_res & (1 << 16 | 3 << 8))
110 report |= SND_JACK_BTN_1;
111
112 /* Volume up key */
113 if (jack->unsol_res & (7 << 23))
114 report |= SND_JACK_BTN_2;
115
116 /* Volume down key */
117 if (jack->unsol_res & (7 << 10))
118 report |= SND_JACK_BTN_3;
119
120 snd_hda_jack_set_button_state(codec, jack->nid, report);
121 }
122
alc_disable_headset_jack_key(struct hda_codec * codec)123 static void alc_disable_headset_jack_key(struct hda_codec *codec)
124 {
125 struct alc_spec *spec = codec->spec;
126
127 if (!spec->has_hs_key)
128 return;
129
130 switch (codec->core.vendor_id) {
131 case 0x10ec0215:
132 case 0x10ec0225:
133 case 0x10ec0285:
134 case 0x10ec0287:
135 case 0x10ec0295:
136 case 0x10ec0289:
137 case 0x10ec0299:
138 alc_write_coef_idx(codec, 0x48, 0x0);
139 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
140 alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
141 break;
142 case 0x10ec0230:
143 case 0x10ec0236:
144 case 0x10ec0256:
145 case 0x10ec0257:
146 case 0x19e58326:
147 alc_write_coef_idx(codec, 0x48, 0x0);
148 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
149 break;
150 }
151 }
152
alc_enable_headset_jack_key(struct hda_codec * codec)153 static void alc_enable_headset_jack_key(struct hda_codec *codec)
154 {
155 struct alc_spec *spec = codec->spec;
156
157 if (!spec->has_hs_key)
158 return;
159
160 switch (codec->core.vendor_id) {
161 case 0x10ec0215:
162 case 0x10ec0225:
163 case 0x10ec0285:
164 case 0x10ec0287:
165 case 0x10ec0295:
166 case 0x10ec0289:
167 case 0x10ec0299:
168 alc_write_coef_idx(codec, 0x48, 0xd011);
169 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
170 alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
171 break;
172 case 0x10ec0230:
173 case 0x10ec0236:
174 case 0x10ec0256:
175 case 0x10ec0257:
176 case 0x19e58326:
177 alc_write_coef_idx(codec, 0x48, 0xd011);
178 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
179 break;
180 }
181 }
182
alc_fixup_headset_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)183 static void alc_fixup_headset_jack(struct hda_codec *codec,
184 const struct hda_fixup *fix, int action)
185 {
186 struct alc_spec *spec = codec->spec;
187 hda_nid_t hp_pin;
188
189 switch (action) {
190 case HDA_FIXUP_ACT_PRE_PROBE:
191 spec->has_hs_key = 1;
192 snd_hda_jack_detect_enable_callback(codec, 0x55,
193 alc_headset_btn_callback);
194 break;
195 case HDA_FIXUP_ACT_BUILD:
196 hp_pin = alc_get_hp_pin(spec);
197 if (!hp_pin || snd_hda_jack_bind_keymap(codec, 0x55,
198 alc_headset_btn_keymap,
199 hp_pin))
200 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack",
201 false, SND_JACK_HEADSET,
202 alc_headset_btn_keymap);
203
204 alc_enable_headset_jack_key(codec);
205 break;
206 }
207 }
208
alc269vb_toggle_power_output(struct hda_codec * codec,int power_up)209 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
210 {
211 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0);
212 }
213
alc269_shutup(struct hda_codec * codec)214 static void alc269_shutup(struct hda_codec *codec)
215 {
216 struct alc_spec *spec = codec->spec;
217
218 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
219 alc269vb_toggle_power_output(codec, 0);
220 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
221 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
222 msleep(150);
223 }
224 alc_shutup_pins(codec);
225 }
226
227 static const struct coef_fw alc282_coefs[] = {
228 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
229 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
230 WRITE_COEF(0x07, 0x0200), /* DMIC control */
231 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
232 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
233 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
234 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
235 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */
236 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
237 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
238 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */
239 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */
240 WRITE_COEF(0x34, 0xa0c0), /* ANC */
241 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */
242 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
243 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
244 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
245 WRITE_COEF(0x63, 0x2902), /* PLL */
246 WRITE_COEF(0x68, 0xa080), /* capless control 2 */
247 WRITE_COEF(0x69, 0x3400), /* capless control 3 */
248 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */
249 WRITE_COEF(0x6b, 0x0), /* capless control 5 */
250 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */
251 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */
252 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */
253 WRITE_COEF(0x71, 0x0014), /* class D test 6 */
254 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */
255 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */
256 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */
257 {}
258 };
259
alc282_restore_default_value(struct hda_codec * codec)260 static void alc282_restore_default_value(struct hda_codec *codec)
261 {
262 alc_process_coef_fw(codec, alc282_coefs);
263 }
264
alc282_init(struct hda_codec * codec)265 static void alc282_init(struct hda_codec *codec)
266 {
267 struct alc_spec *spec = codec->spec;
268 hda_nid_t hp_pin = alc_get_hp_pin(spec);
269 bool hp_pin_sense;
270 int coef78;
271
272 alc282_restore_default_value(codec);
273
274 if (!hp_pin)
275 return;
276 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
277 coef78 = alc_read_coef_idx(codec, 0x78);
278
279 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */
280 /* Headphone capless set to high power mode */
281 alc_write_coef_idx(codec, 0x78, 0x9004);
282
283 if (hp_pin_sense)
284 msleep(2);
285
286 snd_hda_codec_write(codec, hp_pin, 0,
287 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
288
289 if (hp_pin_sense)
290 msleep(85);
291
292 snd_hda_codec_write(codec, hp_pin, 0,
293 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
294
295 if (hp_pin_sense)
296 msleep(100);
297
298 /* Headphone capless set to normal mode */
299 alc_write_coef_idx(codec, 0x78, coef78);
300 }
301
alc282_shutup(struct hda_codec * codec)302 static void alc282_shutup(struct hda_codec *codec)
303 {
304 struct alc_spec *spec = codec->spec;
305 hda_nid_t hp_pin = alc_get_hp_pin(spec);
306 bool hp_pin_sense;
307 int coef78;
308
309 if (!hp_pin) {
310 alc269_shutup(codec);
311 return;
312 }
313
314 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
315 coef78 = alc_read_coef_idx(codec, 0x78);
316 alc_write_coef_idx(codec, 0x78, 0x9004);
317
318 if (hp_pin_sense)
319 msleep(2);
320
321 snd_hda_codec_write(codec, hp_pin, 0,
322 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
323
324 if (hp_pin_sense)
325 msleep(85);
326
327 if (!spec->no_shutup_pins)
328 snd_hda_codec_write(codec, hp_pin, 0,
329 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
330
331 if (hp_pin_sense)
332 msleep(100);
333
334 alc_auto_setup_eapd(codec, false);
335 alc_shutup_pins(codec);
336 alc_write_coef_idx(codec, 0x78, coef78);
337 }
338
339 static const struct coef_fw alc283_coefs[] = {
340 WRITE_COEF(0x03, 0x0002), /* Power Down Control */
341 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
342 WRITE_COEF(0x07, 0x0200), /* DMIC control */
343 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */
344 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */
345 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */
346 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */
347 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */
348 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */
349 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */
350 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */
351 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */
352 WRITE_COEF(0x22, 0xa0c0), /* ANC */
353 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */
354 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */
355 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */
356 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */
357 WRITE_COEF(0x2e, 0x2902), /* PLL */
358 WRITE_COEF(0x33, 0xa080), /* capless control 2 */
359 WRITE_COEF(0x34, 0x3400), /* capless control 3 */
360 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */
361 WRITE_COEF(0x36, 0x0), /* capless control 5 */
362 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */
363 WRITE_COEF(0x39, 0x110a), /* class D test 3 */
364 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */
365 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */
366 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */
367 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */
368 WRITE_COEF(0x49, 0x0), /* test mode */
369 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */
370 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */
371 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */
372 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */
373 {}
374 };
375
alc283_restore_default_value(struct hda_codec * codec)376 static void alc283_restore_default_value(struct hda_codec *codec)
377 {
378 alc_process_coef_fw(codec, alc283_coefs);
379 }
380
alc283_init(struct hda_codec * codec)381 static void alc283_init(struct hda_codec *codec)
382 {
383 struct alc_spec *spec = codec->spec;
384 hda_nid_t hp_pin = alc_get_hp_pin(spec);
385 bool hp_pin_sense;
386
387 alc283_restore_default_value(codec);
388
389 if (!hp_pin)
390 return;
391
392 msleep(30);
393 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
394
395 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */
396 /* Headphone capless set to high power mode */
397 alc_write_coef_idx(codec, 0x43, 0x9004);
398
399 snd_hda_codec_write(codec, hp_pin, 0,
400 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
401
402 if (hp_pin_sense)
403 msleep(85);
404
405 snd_hda_codec_write(codec, hp_pin, 0,
406 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
407
408 if (hp_pin_sense)
409 msleep(85);
410 /* Index 0x46 Combo jack auto switch control 2 */
411 /* 3k pull low control for Headset jack. */
412 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
413 /* Headphone capless set to normal mode */
414 alc_write_coef_idx(codec, 0x43, 0x9614);
415 }
416
alc283_shutup(struct hda_codec * codec)417 static void alc283_shutup(struct hda_codec *codec)
418 {
419 struct alc_spec *spec = codec->spec;
420 hda_nid_t hp_pin = alc_get_hp_pin(spec);
421 bool hp_pin_sense;
422
423 if (!hp_pin) {
424 alc269_shutup(codec);
425 return;
426 }
427
428 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
429
430 alc_write_coef_idx(codec, 0x43, 0x9004);
431
432 /*depop hp during suspend*/
433 alc_write_coef_idx(codec, 0x06, 0x2100);
434
435 snd_hda_codec_write(codec, hp_pin, 0,
436 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
437
438 if (hp_pin_sense)
439 msleep(100);
440
441 if (!spec->no_shutup_pins)
442 snd_hda_codec_write(codec, hp_pin, 0,
443 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
444
445 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
446
447 if (hp_pin_sense)
448 msleep(100);
449 alc_auto_setup_eapd(codec, false);
450 alc_shutup_pins(codec);
451 alc_write_coef_idx(codec, 0x43, 0x9614);
452 }
453
alc256_init(struct hda_codec * codec)454 static void alc256_init(struct hda_codec *codec)
455 {
456 struct alc_spec *spec = codec->spec;
457 hda_nid_t hp_pin = alc_get_hp_pin(spec);
458 bool hp_pin_sense;
459
460 if (spec->ultra_low_power) {
461 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1);
462 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2);
463 alc_update_coef_idx(codec, 0x08, 7<<4, 0);
464 alc_update_coef_idx(codec, 0x3b, 1<<15, 0);
465 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
466 msleep(30);
467 }
468
469 if (!hp_pin)
470 hp_pin = 0x21;
471
472 msleep(30);
473
474 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
475
476 if (hp_pin_sense) {
477 msleep(2);
478 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
479
480 snd_hda_codec_write(codec, hp_pin, 0,
481 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
482
483 msleep(75);
484
485 snd_hda_codec_write(codec, hp_pin, 0,
486 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
487
488 msleep(75);
489 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
490 }
491 alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
492 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
493 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15);
494 /*
495 * Expose headphone mic (or possibly Line In on some machines) instead
496 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See
497 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
498 * this register.
499 */
500 alc_write_coef_idx(codec, 0x36, 0x5757);
501 }
502
alc256_shutup(struct hda_codec * codec)503 static void alc256_shutup(struct hda_codec *codec)
504 {
505 struct alc_spec *spec = codec->spec;
506 hda_nid_t hp_pin = alc_get_hp_pin(spec);
507 bool hp_pin_sense;
508
509 if (!hp_pin)
510 hp_pin = 0x21;
511
512 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
513
514 /* 3k pull low control for Headset jack. */
515 /* NOTE: call this before clearing the pin, otherwise codec stalls */
516 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
517 * when booting with headset plugged. So skip setting it for the codec alc257
518 */
519 if (spec->en_3kpull_low)
520 alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
521
522 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
523
524 if (hp_pin_sense) {
525 msleep(2);
526
527 snd_hda_codec_write(codec, hp_pin, 0,
528 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
529
530 msleep(75);
531
532 if (!spec->no_shutup_pins)
533 snd_hda_codec_write(codec, hp_pin, 0,
534 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
535
536 msleep(75);
537 }
538
539 alc_auto_setup_eapd(codec, false);
540 alc_shutup_pins(codec);
541 if (spec->ultra_low_power) {
542 msleep(50);
543 alc_update_coef_idx(codec, 0x03, 1<<1, 0);
544 alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4);
545 alc_update_coef_idx(codec, 0x08, 3<<2, 0);
546 alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15);
547 alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
548 msleep(30);
549 }
550 }
551
alc285_hp_init(struct hda_codec * codec)552 static void alc285_hp_init(struct hda_codec *codec)
553 {
554 struct alc_spec *spec = codec->spec;
555 hda_nid_t hp_pin = alc_get_hp_pin(spec);
556 int i, val;
557 int coef38, coef0d, coef36;
558
559 alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */
560 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
561 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */
562 coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */
563 coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */
564 alc_update_coef_idx(codec, 0x38, 1<<4, 0x0);
565 alc_update_coef_idx(codec, 0x0d, 0x110, 0x0);
566
567 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
568
569 if (hp_pin)
570 snd_hda_codec_write(codec, hp_pin, 0,
571 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
572
573 msleep(130);
574 alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14);
575 alc_update_coef_idx(codec, 0x36, 1<<13, 0x0);
576
577 if (hp_pin)
578 snd_hda_codec_write(codec, hp_pin, 0,
579 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
580 msleep(10);
581 alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */
582 alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880);
583 alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049);
584 alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0);
585
586 alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */
587 val = alc_read_coefex_idx(codec, 0x58, 0x00);
588 for (i = 0; i < 20 && val & 0x8000; i++) {
589 msleep(50);
590 val = alc_read_coefex_idx(codec, 0x58, 0x00);
591 } /* Wait for depop procedure finish */
592
593 alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */
594 alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
595 alc_update_coef_idx(codec, 0x0d, 0x110, coef0d);
596 alc_update_coef_idx(codec, 0x36, 3<<13, coef36);
597
598 msleep(50);
599 alc_update_coef_idx(codec, 0x4a, 1<<15, 0);
600 }
601
alc225_init(struct hda_codec * codec)602 static void alc225_init(struct hda_codec *codec)
603 {
604 struct alc_spec *spec = codec->spec;
605 hda_nid_t hp_pin = alc_get_hp_pin(spec);
606 bool hp1_pin_sense, hp2_pin_sense;
607
608 if (spec->ultra_low_power) {
609 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2);
610 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6);
611 alc_update_coef_idx(codec, 0x33, 1<<11, 0);
612 msleep(30);
613 }
614
615 if (spec->codec_variant != ALC269_TYPE_ALC287 &&
616 spec->codec_variant != ALC269_TYPE_ALC245)
617 /* required only at boot or S3 and S4 resume time */
618 if (!spec->done_hp_init ||
619 is_s3_resume(codec) ||
620 is_s4_resume(codec)) {
621 alc285_hp_init(codec);
622 spec->done_hp_init = true;
623 }
624
625 if (!hp_pin)
626 hp_pin = 0x21;
627 msleep(30);
628
629 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
630 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
631
632 if (hp1_pin_sense || hp2_pin_sense) {
633 msleep(2);
634 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
635
636 if (hp1_pin_sense)
637 snd_hda_codec_write(codec, hp_pin, 0,
638 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
639 if (hp2_pin_sense)
640 snd_hda_codec_write(codec, 0x16, 0,
641 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
642 msleep(75);
643
644 if (hp1_pin_sense)
645 snd_hda_codec_write(codec, hp_pin, 0,
646 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
647 if (hp2_pin_sense)
648 snd_hda_codec_write(codec, 0x16, 0,
649 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
650
651 msleep(75);
652 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
653 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
654 }
655 }
656
alc225_shutup(struct hda_codec * codec)657 static void alc225_shutup(struct hda_codec *codec)
658 {
659 struct alc_spec *spec = codec->spec;
660 hda_nid_t hp_pin = alc_get_hp_pin(spec);
661 bool hp1_pin_sense, hp2_pin_sense;
662
663 if (!hp_pin)
664 hp_pin = 0x21;
665
666 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
667 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16);
668
669 if (hp1_pin_sense || hp2_pin_sense) {
670 alc_disable_headset_jack_key(codec);
671 /* 3k pull low control for Headset jack. */
672 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);
673 msleep(2);
674
675 if (hp1_pin_sense)
676 snd_hda_codec_write(codec, hp_pin, 0,
677 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
678 if (hp2_pin_sense)
679 snd_hda_codec_write(codec, 0x16, 0,
680 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
681
682 msleep(75);
683
684 if (hp1_pin_sense)
685 snd_hda_codec_write(codec, hp_pin, 0,
686 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
687 if (hp2_pin_sense)
688 snd_hda_codec_write(codec, 0x16, 0,
689 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
690
691 msleep(75);
692 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
693 alc_enable_headset_jack_key(codec);
694 }
695 alc_auto_setup_eapd(codec, false);
696 alc_shutup_pins(codec);
697 if (spec->ultra_low_power) {
698 msleep(50);
699 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2);
700 alc_update_coef_idx(codec, 0x0e, 7<<6, 0);
701 alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11);
702 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4);
703 msleep(30);
704 }
705 }
706
alc222_init(struct hda_codec * codec)707 static void alc222_init(struct hda_codec *codec)
708 {
709 struct alc_spec *spec = codec->spec;
710 hda_nid_t hp_pin = alc_get_hp_pin(spec);
711 bool hp1_pin_sense, hp2_pin_sense;
712
713 if (!hp_pin)
714 return;
715
716 msleep(30);
717
718 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
719 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14);
720
721 if (hp1_pin_sense || hp2_pin_sense) {
722 msleep(2);
723
724 if (hp1_pin_sense)
725 snd_hda_codec_write(codec, hp_pin, 0,
726 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
727 if (hp2_pin_sense)
728 snd_hda_codec_write(codec, 0x14, 0,
729 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
730 msleep(75);
731
732 if (hp1_pin_sense)
733 snd_hda_codec_write(codec, hp_pin, 0,
734 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
735 if (hp2_pin_sense)
736 snd_hda_codec_write(codec, 0x14, 0,
737 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
738
739 msleep(75);
740 }
741 }
742
alc222_shutup(struct hda_codec * codec)743 static void alc222_shutup(struct hda_codec *codec)
744 {
745 struct alc_spec *spec = codec->spec;
746 hda_nid_t hp_pin = alc_get_hp_pin(spec);
747 bool hp1_pin_sense, hp2_pin_sense;
748
749 if (!hp_pin)
750 hp_pin = 0x21;
751
752 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin);
753 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14);
754
755 if (hp1_pin_sense || hp2_pin_sense) {
756 msleep(2);
757
758 if (hp1_pin_sense)
759 snd_hda_codec_write(codec, hp_pin, 0,
760 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
761 if (hp2_pin_sense)
762 snd_hda_codec_write(codec, 0x14, 0,
763 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
764
765 msleep(75);
766
767 if (hp1_pin_sense)
768 snd_hda_codec_write(codec, hp_pin, 0,
769 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
770 if (hp2_pin_sense)
771 snd_hda_codec_write(codec, 0x14, 0,
772 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
773
774 msleep(75);
775 }
776 alc_auto_setup_eapd(codec, false);
777 alc_shutup_pins(codec);
778 }
779
alc_default_init(struct hda_codec * codec)780 static void alc_default_init(struct hda_codec *codec)
781 {
782 struct alc_spec *spec = codec->spec;
783 hda_nid_t hp_pin = alc_get_hp_pin(spec);
784 bool hp_pin_sense;
785
786 if (!hp_pin)
787 return;
788
789 msleep(30);
790
791 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
792
793 if (hp_pin_sense) {
794 msleep(2);
795
796 snd_hda_codec_write(codec, hp_pin, 0,
797 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
798
799 msleep(75);
800
801 snd_hda_codec_write(codec, hp_pin, 0,
802 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
803 msleep(75);
804 }
805 }
806
alc_default_shutup(struct hda_codec * codec)807 static void alc_default_shutup(struct hda_codec *codec)
808 {
809 struct alc_spec *spec = codec->spec;
810 hda_nid_t hp_pin = alc_get_hp_pin(spec);
811 bool hp_pin_sense;
812
813 if (!hp_pin) {
814 alc269_shutup(codec);
815 return;
816 }
817
818 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
819
820 if (hp_pin_sense) {
821 msleep(2);
822
823 snd_hda_codec_write(codec, hp_pin, 0,
824 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
825
826 msleep(75);
827
828 if (!spec->no_shutup_pins)
829 snd_hda_codec_write(codec, hp_pin, 0,
830 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
831
832 msleep(75);
833 }
834 alc_auto_setup_eapd(codec, false);
835 alc_shutup_pins(codec);
836 }
837
alc294_hp_init(struct hda_codec * codec)838 static void alc294_hp_init(struct hda_codec *codec)
839 {
840 struct alc_spec *spec = codec->spec;
841 hda_nid_t hp_pin = alc_get_hp_pin(spec);
842 int i, val;
843
844 if (!hp_pin)
845 return;
846
847 snd_hda_codec_write(codec, hp_pin, 0,
848 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
849
850 msleep(100);
851
852 if (!spec->no_shutup_pins)
853 snd_hda_codec_write(codec, hp_pin, 0,
854 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
855
856 alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
857 alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
858
859 /* Wait for depop procedure finish */
860 val = alc_read_coefex_idx(codec, 0x58, 0x01);
861 for (i = 0; i < 20 && val & 0x0080; i++) {
862 msleep(50);
863 val = alc_read_coefex_idx(codec, 0x58, 0x01);
864 }
865 /* Set HP depop to auto mode */
866 alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
867 msleep(50);
868 }
869
alc294_init(struct hda_codec * codec)870 static void alc294_init(struct hda_codec *codec)
871 {
872 struct alc_spec *spec = codec->spec;
873
874 /* required only at boot or S4 resume time */
875 if (!spec->done_hp_init || is_s4_resume(codec)) {
876 alc294_hp_init(codec);
877 spec->done_hp_init = true;
878 }
879 alc_default_init(codec);
880 }
881
alc5505_coef_set(struct hda_codec * codec,unsigned int index_reg,unsigned int val)882 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,
883 unsigned int val)
884 {
885 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
886 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */
887 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */
888 }
889
alc5505_coef_get(struct hda_codec * codec,unsigned int index_reg)890 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg)
891 {
892 unsigned int val;
893
894 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
895 val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
896 & 0xffff;
897 val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0)
898 << 16;
899 return val;
900 }
901
alc5505_dsp_halt(struct hda_codec * codec)902 static void alc5505_dsp_halt(struct hda_codec *codec)
903 {
904 unsigned int val;
905
906 alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */
907 alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */
908 alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */
909 alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */
910 alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */
911 alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */
912 alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */
913 val = alc5505_coef_get(codec, 0x6220);
914 alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */
915 }
916
alc5505_dsp_back_from_halt(struct hda_codec * codec)917 static void alc5505_dsp_back_from_halt(struct hda_codec *codec)
918 {
919 alc5505_coef_set(codec, 0x61b8, 0x04133302);
920 alc5505_coef_set(codec, 0x61b0, 0x00005b16);
921 alc5505_coef_set(codec, 0x61b4, 0x040a2b02);
922 alc5505_coef_set(codec, 0x6230, 0xf80d4011);
923 alc5505_coef_set(codec, 0x6220, 0x2002010f);
924 alc5505_coef_set(codec, 0x880c, 0x00000004);
925 }
926
alc5505_dsp_init(struct hda_codec * codec)927 static void alc5505_dsp_init(struct hda_codec *codec)
928 {
929 unsigned int val;
930
931 alc5505_dsp_halt(codec);
932 alc5505_dsp_back_from_halt(codec);
933 alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */
934 alc5505_coef_set(codec, 0x61b0, 0x5b16);
935 alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */
936 alc5505_coef_set(codec, 0x61b4, 0x04132b02);
937 alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/
938 alc5505_coef_set(codec, 0x61b8, 0x041f3302);
939 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */
940 alc5505_coef_set(codec, 0x61b8, 0x041b3302);
941 alc5505_coef_set(codec, 0x61b8, 0x04173302);
942 alc5505_coef_set(codec, 0x61b8, 0x04163302);
943 alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */
944 alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */
945 alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */
946
947 val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */
948 if (val <= 3)
949 alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */
950 else
951 alc5505_coef_set(codec, 0x6220, 0x6002018f);
952
953 alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/
954 alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */
955 alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */
956 alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */
957 alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */
958 alc5505_coef_set(codec, 0x880c, 0x00000003);
959 alc5505_coef_set(codec, 0x880c, 0x00000010);
960
961 #ifdef HALT_REALTEK_ALC5505
962 alc5505_dsp_halt(codec);
963 #endif
964 }
965
966 #ifdef HALT_REALTEK_ALC5505
967 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */
968 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */
969 #else
970 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec)
971 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
972 #endif
973
alc269_suspend(struct hda_codec * codec)974 static int alc269_suspend(struct hda_codec *codec)
975 {
976 struct alc_spec *spec = codec->spec;
977
978 if (spec->has_alc5505_dsp)
979 alc5505_dsp_suspend(codec);
980
981 return alc_suspend(codec);
982 }
983
alc269_resume(struct hda_codec * codec)984 static int alc269_resume(struct hda_codec *codec)
985 {
986 struct alc_spec *spec = codec->spec;
987
988 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
989 alc269vb_toggle_power_output(codec, 0);
990 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
991 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
992 msleep(150);
993 }
994
995 snd_hda_codec_init(codec);
996
997 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
998 alc269vb_toggle_power_output(codec, 1);
999 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
1000 (alc_get_coef0(codec) & 0x00ff) == 0x017) {
1001 msleep(200);
1002 }
1003
1004 snd_hda_regmap_sync(codec);
1005 hda_call_check_power_status(codec, 0x01);
1006
1007 if (spec->has_alc5505_dsp)
1008 alc5505_dsp_resume(codec);
1009
1010 return 0;
1011 }
1012
1013 #define ALC233_STARFIGHTER_SPK_PIN 0x1b
1014 #define ALC233_STARFIGHTER_GPIO2 0x04
1015
alc233_starfighter_update_amp(struct hda_codec * codec,bool on)1016 static void alc233_starfighter_update_amp(struct hda_codec *codec, bool on)
1017 {
1018 snd_hda_codec_write(codec, ALC233_STARFIGHTER_SPK_PIN, 0,
1019 AC_VERB_SET_EAPD_BTLENABLE,
1020 on ? AC_EAPDBTL_EAPD : 0);
1021 alc_update_gpio_data(codec, ALC233_STARFIGHTER_GPIO2, on);
1022 }
1023
alc233_starfighter_pcm_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)1024 static void alc233_starfighter_pcm_hook(struct hda_pcm_stream *hinfo,
1025 struct hda_codec *codec,
1026 struct snd_pcm_substream *substream,
1027 int action)
1028 {
1029 switch (action) {
1030 case HDA_GEN_PCM_ACT_PREPARE:
1031 alc233_starfighter_update_amp(codec, true);
1032 break;
1033 case HDA_GEN_PCM_ACT_CLEANUP:
1034 alc233_starfighter_update_amp(codec, false);
1035 break;
1036 }
1037 }
1038
alc233_fixup_starlabs_starfighter(struct hda_codec * codec,const struct hda_fixup * fix,int action)1039 static void alc233_fixup_starlabs_starfighter(struct hda_codec *codec,
1040 const struct hda_fixup *fix,
1041 int action)
1042 {
1043 struct alc_spec *spec = codec->spec;
1044
1045 switch (action) {
1046 case HDA_FIXUP_ACT_PRE_PROBE:
1047 spec->gpio_mask |= ALC233_STARFIGHTER_GPIO2;
1048 spec->gpio_dir |= ALC233_STARFIGHTER_GPIO2;
1049 spec->gpio_data &= ~ALC233_STARFIGHTER_GPIO2;
1050 break;
1051 case HDA_FIXUP_ACT_PROBE:
1052 spec->gen.pcm_playback_hook = alc233_starfighter_pcm_hook;
1053 break;
1054 }
1055 }
1056
alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec * codec,const struct hda_fixup * fix,int action)1057 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
1058 const struct hda_fixup *fix, int action)
1059 {
1060 struct alc_spec *spec = codec->spec;
1061
1062 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1063 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
1064 }
1065
alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1066 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
1067 const struct hda_fixup *fix,
1068 int action)
1069 {
1070 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
1071 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
1072
1073 if (cfg_headphone && cfg_headset_mic == 0x411111f0)
1074 snd_hda_codec_set_pincfg(codec, 0x19,
1075 (cfg_headphone & ~AC_DEFCFG_DEVICE) |
1076 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
1077 }
1078
alc269_fixup_hweq(struct hda_codec * codec,const struct hda_fixup * fix,int action)1079 static void alc269_fixup_hweq(struct hda_codec *codec,
1080 const struct hda_fixup *fix, int action)
1081 {
1082 if (action == HDA_FIXUP_ACT_INIT)
1083 alc_update_coef_idx(codec, 0x1e, 0, 0x80);
1084 }
1085
alc271_fixup_dmic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1086 static void alc271_fixup_dmic(struct hda_codec *codec,
1087 const struct hda_fixup *fix, int action)
1088 {
1089 static const struct hda_verb verbs[] = {
1090 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
1091 {0x20, AC_VERB_SET_PROC_COEF, 0x4000},
1092 {}
1093 };
1094 unsigned int cfg;
1095
1096 if (strcmp(codec->core.chip_name, "ALC271X") &&
1097 strcmp(codec->core.chip_name, "ALC269VB"))
1098 return;
1099 cfg = snd_hda_codec_get_pincfg(codec, 0x12);
1100 if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
1101 snd_hda_sequence_write(codec, verbs);
1102 }
1103
1104 /* Fix the speaker amp after resume, etc */
alc269vb_fixup_aspire_e1_coef(struct hda_codec * codec,const struct hda_fixup * fix,int action)1105 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
1106 const struct hda_fixup *fix,
1107 int action)
1108 {
1109 if (action == HDA_FIXUP_ACT_INIT)
1110 alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
1111 }
1112
alc269_fixup_pcm_44k(struct hda_codec * codec,const struct hda_fixup * fix,int action)1113 static void alc269_fixup_pcm_44k(struct hda_codec *codec,
1114 const struct hda_fixup *fix, int action)
1115 {
1116 struct alc_spec *spec = codec->spec;
1117
1118 if (action != HDA_FIXUP_ACT_PROBE)
1119 return;
1120
1121 /* Due to a hardware problem on Lenovo Ideadpad, we need to
1122 * fix the sample rate of analog I/O to 44.1kHz
1123 */
1124 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
1125 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
1126 }
1127
alc269_fixup_stereo_dmic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1128 static void alc269_fixup_stereo_dmic(struct hda_codec *codec,
1129 const struct hda_fixup *fix, int action)
1130 {
1131 /* The digital-mic unit sends PDM (differential signal) instead of
1132 * the standard PCM, thus you can't record a valid mono stream as is.
1133 * Below is a workaround specific to ALC269 to control the dmic
1134 * signal source as mono.
1135 */
1136 if (action == HDA_FIXUP_ACT_INIT)
1137 alc_update_coef_idx(codec, 0x07, 0, 0x80);
1138 }
1139
alc269_quanta_automute(struct hda_codec * codec)1140 static void alc269_quanta_automute(struct hda_codec *codec)
1141 {
1142 snd_hda_gen_update_outputs(codec);
1143
1144 alc_write_coef_idx(codec, 0x0c, 0x680);
1145 alc_write_coef_idx(codec, 0x0c, 0x480);
1146 }
1147
alc269_fixup_quanta_mute(struct hda_codec * codec,const struct hda_fixup * fix,int action)1148 static void alc269_fixup_quanta_mute(struct hda_codec *codec,
1149 const struct hda_fixup *fix, int action)
1150 {
1151 struct alc_spec *spec = codec->spec;
1152 if (action != HDA_FIXUP_ACT_PROBE)
1153 return;
1154 spec->gen.automute_hook = alc269_quanta_automute;
1155 }
1156
alc269_x101_hp_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)1157 static void alc269_x101_hp_automute_hook(struct hda_codec *codec,
1158 struct hda_jack_callback *jack)
1159 {
1160 struct alc_spec *spec = codec->spec;
1161 int vref;
1162 msleep(200);
1163 snd_hda_gen_hp_automute(codec, jack);
1164
1165 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
1166 msleep(100);
1167 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1168 vref);
1169 msleep(500);
1170 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1171 vref);
1172 }
1173
1174 /*
1175 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801)
1176 */
1177 struct hda_alc298_mbxinit {
1178 unsigned char value_0x23;
1179 unsigned char value_0x25;
1180 };
1181
alc298_huawei_mbx_stereo_seq(struct hda_codec * codec,const struct hda_alc298_mbxinit * initval,bool first)1182 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
1183 const struct hda_alc298_mbxinit *initval,
1184 bool first)
1185 {
1186 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0);
1187 alc_write_coef_idx(codec, 0x26, 0xb000);
1188
1189 if (first)
1190 snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0);
1191
1192 snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
1193 alc_write_coef_idx(codec, 0x26, 0xf000);
1194 alc_write_coef_idx(codec, 0x23, initval->value_0x23);
1195
1196 if (initval->value_0x23 != 0x1e)
1197 alc_write_coef_idx(codec, 0x25, initval->value_0x25);
1198
1199 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
1200 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
1201 }
1202
alc298_fixup_huawei_mbx_stereo(struct hda_codec * codec,const struct hda_fixup * fix,int action)1203 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
1204 const struct hda_fixup *fix,
1205 int action)
1206 {
1207 /* Initialization magic */
1208 static const struct hda_alc298_mbxinit dac_init[] = {
1209 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00},
1210 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00},
1211 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00},
1212 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24},
1213 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f},
1214 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00},
1215 {0x2f, 0x00},
1216 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00},
1217 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c},
1218 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80},
1219 {}
1220 };
1221 const struct hda_alc298_mbxinit *seq;
1222
1223 if (action != HDA_FIXUP_ACT_INIT)
1224 return;
1225
1226 /* Start */
1227 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00);
1228 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80);
1229 alc_write_coef_idx(codec, 0x26, 0xf000);
1230 alc_write_coef_idx(codec, 0x22, 0x31);
1231 alc_write_coef_idx(codec, 0x23, 0x0b);
1232 alc_write_coef_idx(codec, 0x25, 0x00);
1233 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26);
1234 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010);
1235
1236 for (seq = dac_init; seq->value_0x23; seq++)
1237 alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init);
1238 }
1239
alc269_fixup_x101_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)1240 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
1241 const struct hda_fixup *fix, int action)
1242 {
1243 struct alc_spec *spec = codec->spec;
1244 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1245 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
1246 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
1247 }
1248 }
1249
alc_update_vref_led(struct hda_codec * codec,hda_nid_t pin,bool polarity,bool on)1250 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
1251 bool polarity, bool on)
1252 {
1253 unsigned int pinval;
1254
1255 if (!pin)
1256 return;
1257 if (polarity)
1258 on = !on;
1259 pinval = snd_hda_codec_get_pin_target(codec, pin);
1260 pinval &= ~AC_PINCTL_VREFEN;
1261 pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
1262 /* temporarily power up/down for setting VREF */
1263 CLASS(snd_hda_power_pm, pm)(codec);
1264 snd_hda_set_pin_ctl_cache(codec, pin, pinval);
1265 }
1266
1267 /* update mute-LED according to the speaker mute state via mic VREF pin */
vref_mute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1268 static int vref_mute_led_set(struct led_classdev *led_cdev,
1269 enum led_brightness brightness)
1270 {
1271 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1272 struct alc_spec *spec = codec->spec;
1273
1274 alc_update_vref_led(codec, spec->mute_led_nid,
1275 spec->mute_led_polarity, brightness);
1276 return 0;
1277 }
1278
1279 /* Make sure the led works even in runtime suspend */
led_power_filter(struct hda_codec * codec,hda_nid_t nid,unsigned int power_state)1280 static unsigned int led_power_filter(struct hda_codec *codec,
1281 hda_nid_t nid,
1282 unsigned int power_state)
1283 {
1284 struct alc_spec *spec = codec->spec;
1285
1286 if (power_state != AC_PWRST_D3 || nid == 0 ||
1287 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
1288 return power_state;
1289
1290 /* Set pin ctl again, it might have just been set to 0 */
1291 snd_hda_set_pin_ctl(codec, nid,
1292 snd_hda_codec_get_pin_target(codec, nid));
1293
1294 return snd_hda_gen_path_power_filter(codec, nid, power_state);
1295 }
1296
alc269_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1297 static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
1298 const struct hda_fixup *fix, int action)
1299 {
1300 struct alc_spec *spec = codec->spec;
1301 const struct dmi_device *dev = NULL;
1302
1303 if (action != HDA_FIXUP_ACT_PRE_PROBE)
1304 return;
1305
1306 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
1307 int pol, pin;
1308 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2)
1309 continue;
1310 if (pin < 0x0a || pin >= 0x10)
1311 break;
1312 spec->mute_led_polarity = pol;
1313 spec->mute_led_nid = pin - 0x0a + 0x18;
1314 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
1315 codec->power_filter = led_power_filter;
1316 codec_dbg(codec,
1317 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
1318 spec->mute_led_polarity);
1319 break;
1320 }
1321 }
1322
alc269_fixup_hp_mute_led_micx(struct hda_codec * codec,const struct hda_fixup * fix,int action,hda_nid_t pin)1323 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec,
1324 const struct hda_fixup *fix,
1325 int action, hda_nid_t pin)
1326 {
1327 struct alc_spec *spec = codec->spec;
1328
1329 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1330 spec->mute_led_polarity = 0;
1331 spec->mute_led_nid = pin;
1332 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set);
1333 codec->power_filter = led_power_filter;
1334 }
1335 }
1336
alc269_fixup_hp_mute_led_mic1(struct hda_codec * codec,const struct hda_fixup * fix,int action)1337 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec,
1338 const struct hda_fixup *fix, int action)
1339 {
1340 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18);
1341 }
1342
alc269_fixup_hp_mute_led_mic2(struct hda_codec * codec,const struct hda_fixup * fix,int action)1343 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
1344 const struct hda_fixup *fix, int action)
1345 {
1346 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19);
1347 }
1348
alc269_fixup_hp_mute_led_mic3(struct hda_codec * codec,const struct hda_fixup * fix,int action)1349 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec,
1350 const struct hda_fixup *fix, int action)
1351 {
1352 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b);
1353 }
1354
alc236_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1355 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
1356 const struct hda_fixup *fix, int action)
1357 {
1358 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
1359 }
1360
alc269_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1361 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
1362 const struct hda_fixup *fix, int action)
1363 {
1364 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
1365 }
1366
alc285_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1367 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
1368 const struct hda_fixup *fix, int action)
1369 {
1370 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
1371 }
1372
alc286_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1373 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
1374 const struct hda_fixup *fix, int action)
1375 {
1376 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20);
1377 }
1378
alc287_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1379 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
1380 const struct hda_fixup *fix, int action)
1381 {
1382 alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
1383 }
1384
alc245_fixup_hp_gpio_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1385 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
1386 const struct hda_fixup *fix, int action)
1387 {
1388 struct alc_spec *spec = codec->spec;
1389
1390 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1391 spec->micmute_led_polarity = 1;
1392 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
1393 }
1394
1395 /* turn on/off mic-mute LED per capture hook via VREF change */
vref_micmute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1396 static int vref_micmute_led_set(struct led_classdev *led_cdev,
1397 enum led_brightness brightness)
1398 {
1399 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1400 struct alc_spec *spec = codec->spec;
1401
1402 alc_update_vref_led(codec, spec->cap_mute_led_nid,
1403 spec->micmute_led_polarity, brightness);
1404 return 0;
1405 }
1406
alc269_fixup_hp_gpio_mic1_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1407 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
1408 const struct hda_fixup *fix, int action)
1409 {
1410 struct alc_spec *spec = codec->spec;
1411
1412 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
1413 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1414 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to
1415 * enable headphone amp
1416 */
1417 spec->gpio_mask |= 0x10;
1418 spec->gpio_dir |= 0x10;
1419 spec->cap_mute_led_nid = 0x18;
1420 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1421 codec->power_filter = led_power_filter;
1422 }
1423 }
1424
alc280_fixup_hp_gpio4(struct hda_codec * codec,const struct hda_fixup * fix,int action)1425 static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
1426 const struct hda_fixup *fix, int action)
1427 {
1428 struct alc_spec *spec = codec->spec;
1429
1430 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
1431 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1432 spec->cap_mute_led_nid = 0x18;
1433 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1434 codec->power_filter = led_power_filter;
1435 }
1436 }
1437
1438 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
1439 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
1440 */
alc245_fixup_hp_x360_amp(struct hda_codec * codec,const struct hda_fixup * fix,int action)1441 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
1442 const struct hda_fixup *fix, int action)
1443 {
1444 struct alc_spec *spec = codec->spec;
1445
1446 switch (action) {
1447 case HDA_FIXUP_ACT_PRE_PROBE:
1448 spec->gpio_mask |= 0x01;
1449 spec->gpio_dir |= 0x01;
1450 break;
1451 case HDA_FIXUP_ACT_INIT:
1452 /* need to toggle GPIO to enable the amp */
1453 alc_update_gpio_data(codec, 0x01, true);
1454 msleep(100);
1455 alc_update_gpio_data(codec, 0x01, false);
1456 break;
1457 }
1458 }
1459
1460 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
alc274_hp_envy_pcm_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)1461 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
1462 struct hda_codec *codec,
1463 struct snd_pcm_substream *substream,
1464 int action)
1465 {
1466 switch (action) {
1467 case HDA_GEN_PCM_ACT_PREPARE:
1468 alc_update_gpio_data(codec, 0x04, true);
1469 break;
1470 case HDA_GEN_PCM_ACT_CLEANUP:
1471 alc_update_gpio_data(codec, 0x04, false);
1472 break;
1473 }
1474 }
1475
alc274_fixup_hp_envy_gpio(struct hda_codec * codec,const struct hda_fixup * fix,int action)1476 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
1477 const struct hda_fixup *fix,
1478 int action)
1479 {
1480 struct alc_spec *spec = codec->spec;
1481
1482 if (action == HDA_FIXUP_ACT_PROBE) {
1483 spec->gpio_mask |= 0x04;
1484 spec->gpio_dir |= 0x04;
1485 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
1486 }
1487 }
1488
alc_update_coef_led(struct hda_codec * codec,struct alc_coef_led * led,bool polarity,bool on)1489 static void alc_update_coef_led(struct hda_codec *codec,
1490 struct alc_coef_led *led,
1491 bool polarity, bool on)
1492 {
1493 if (polarity)
1494 on = !on;
1495 /* temporarily power up/down for setting COEF bit */
1496 alc_update_coef_idx(codec, led->idx, led->mask,
1497 on ? led->on : led->off);
1498 }
1499
1500 /* update mute-LED according to the speaker mute state via COEF bit */
coef_mute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1501 static int coef_mute_led_set(struct led_classdev *led_cdev,
1502 enum led_brightness brightness)
1503 {
1504 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1505 struct alc_spec *spec = codec->spec;
1506
1507 alc_update_coef_led(codec, &spec->mute_led_coef,
1508 spec->mute_led_polarity, brightness);
1509 return 0;
1510 }
1511
alc285_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1512 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1513 const struct hda_fixup *fix,
1514 int action)
1515 {
1516 struct alc_spec *spec = codec->spec;
1517
1518 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1519 spec->mute_led_polarity = 0;
1520 spec->mute_led_coef.idx = 0x0b;
1521 spec->mute_led_coef.mask = 1 << 3;
1522 spec->mute_led_coef.on = 1 << 3;
1523 spec->mute_led_coef.off = 0;
1524 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1525 }
1526 }
1527
alc236_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1528 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1529 const struct hda_fixup *fix,
1530 int action)
1531 {
1532 struct alc_spec *spec = codec->spec;
1533
1534 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1535 spec->mute_led_polarity = 0;
1536 spec->mute_led_coef.idx = 0x34;
1537 spec->mute_led_coef.mask = 1 << 5;
1538 spec->mute_led_coef.on = 0;
1539 spec->mute_led_coef.off = 1 << 5;
1540 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1541 }
1542 }
1543
alc236_fixup_hp_mute_led_coefbit2(struct hda_codec * codec,const struct hda_fixup * fix,int action)1544 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
1545 const struct hda_fixup *fix, int action)
1546 {
1547 struct alc_spec *spec = codec->spec;
1548
1549 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1550 spec->mute_led_polarity = 0;
1551 spec->mute_led_coef.idx = 0x07;
1552 spec->mute_led_coef.mask = 1;
1553 spec->mute_led_coef.on = 1;
1554 spec->mute_led_coef.off = 0;
1555 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1556 }
1557 }
1558
alc245_fixup_hp_mute_led_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1559 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
1560 const struct hda_fixup *fix,
1561 int action)
1562 {
1563 struct alc_spec *spec = codec->spec;
1564
1565 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1566 spec->mute_led_polarity = 0;
1567 spec->mute_led_coef.idx = 0x0b;
1568 spec->mute_led_coef.mask = 3 << 2;
1569 spec->mute_led_coef.on = 2 << 2;
1570 spec->mute_led_coef.off = 1 << 2;
1571 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1572 }
1573 }
1574
alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1575 static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
1576 const struct hda_fixup *fix,
1577 int action)
1578 {
1579 struct alc_spec *spec = codec->spec;
1580
1581 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1582 spec->mute_led_polarity = 0;
1583 spec->mute_led_coef.idx = 0x0b;
1584 spec->mute_led_coef.mask = 3 << 2;
1585 spec->mute_led_coef.on = 1 << 3;
1586 spec->mute_led_coef.off = 0;
1587 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1588 }
1589 }
1590
alc245_fixup_hp_mute_led_v2_coefbit(struct hda_codec * codec,const struct hda_fixup * fix,int action)1591 static void alc245_fixup_hp_mute_led_v2_coefbit(struct hda_codec *codec,
1592 const struct hda_fixup *fix,
1593 int action)
1594 {
1595 struct alc_spec *spec = codec->spec;
1596
1597 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1598 spec->mute_led_polarity = 0;
1599 spec->mute_led_coef.idx = 0x0b;
1600 spec->mute_led_coef.mask = 1 << 3;
1601 spec->mute_led_coef.on = 1 << 3;
1602 spec->mute_led_coef.off = 0;
1603 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1604 }
1605 }
1606
1607 /* turn on/off mic-mute LED per capture hook by coef bit */
coef_micmute_led_set(struct led_classdev * led_cdev,enum led_brightness brightness)1608 static int coef_micmute_led_set(struct led_classdev *led_cdev,
1609 enum led_brightness brightness)
1610 {
1611 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
1612 struct alc_spec *spec = codec->spec;
1613
1614 alc_update_coef_led(codec, &spec->mic_led_coef,
1615 spec->micmute_led_polarity, brightness);
1616 return 0;
1617 }
1618
alc285_fixup_hp_coef_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1619 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
1620 const struct hda_fixup *fix, int action)
1621 {
1622 struct alc_spec *spec = codec->spec;
1623
1624 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1625 spec->mic_led_coef.idx = 0x19;
1626 spec->mic_led_coef.mask = 1 << 13;
1627 spec->mic_led_coef.on = 1 << 13;
1628 spec->mic_led_coef.off = 0;
1629 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
1630 }
1631 }
1632
alc285_fixup_hp_gpio_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1633 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
1634 const struct hda_fixup *fix, int action)
1635 {
1636 struct alc_spec *spec = codec->spec;
1637
1638 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1639 spec->micmute_led_polarity = 1;
1640 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
1641 }
1642
alc236_fixup_hp_coef_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1643 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
1644 const struct hda_fixup *fix, int action)
1645 {
1646 struct alc_spec *spec = codec->spec;
1647
1648 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1649 spec->mic_led_coef.idx = 0x35;
1650 spec->mic_led_coef.mask = 3 << 2;
1651 spec->mic_led_coef.on = 2 << 2;
1652 spec->mic_led_coef.off = 1 << 2;
1653 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
1654 }
1655 }
1656
alc295_fixup_hp_mute_led_coefbit11(struct hda_codec * codec,const struct hda_fixup * fix,int action)1657 static void alc295_fixup_hp_mute_led_coefbit11(struct hda_codec *codec,
1658 const struct hda_fixup *fix, int action)
1659 {
1660 struct alc_spec *spec = codec->spec;
1661
1662 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1663 spec->mute_led_polarity = 0;
1664 spec->mute_led_coef.idx = 0xb;
1665 spec->mute_led_coef.mask = 3 << 3;
1666 spec->mute_led_coef.on = 1 << 3;
1667 spec->mute_led_coef.off = 1 << 4;
1668 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
1669 }
1670 }
1671
1672 /* Override wrong pin to NID 0x1b (F.32 BIOS reports 0x18 via DMI OEM string)
1673 * on HP pavilion 15-cs1xxx laptops
1674 */
alc295_fixup_hp_pavilion_mute_led_1b(struct hda_codec * codec,const struct hda_fixup * fix,int action)1675 static void alc295_fixup_hp_pavilion_mute_led_1b(struct hda_codec *codec,
1676 const struct hda_fixup *fix,
1677 int action)
1678 {
1679 struct alc_spec *spec = codec->spec;
1680
1681 alc269_fixup_hp_mute_led(codec, fix, action);
1682
1683 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1684 spec->mute_led_nid = 0x1b;
1685 }
1686
alc233_fixup_lenovo_coef_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1687 static void alc233_fixup_lenovo_coef_micmute_led(struct hda_codec *codec,
1688 const struct hda_fixup *fix, int action)
1689 {
1690 struct alc_spec *spec = codec->spec;
1691
1692 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1693 spec->mic_led_coef.idx = 0x10;
1694 spec->mic_led_coef.mask = 1 << 13;
1695 spec->mic_led_coef.on = 0;
1696 spec->mic_led_coef.off = 1 << 13;
1697 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set);
1698 }
1699 }
1700
alc285_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1701 static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
1702 const struct hda_fixup *fix, int action)
1703 {
1704 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
1705 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
1706 }
1707
alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1708 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
1709 const struct hda_fixup *fix, int action)
1710 {
1711 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
1712 alc285_fixup_hp_gpio_micmute_led(codec, fix, action);
1713 }
1714
alc245_fixup_hp_envy_x360_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1715 static void alc245_fixup_hp_envy_x360_mute_led(struct hda_codec *codec,
1716 const struct hda_fixup *fix, int action)
1717 {
1718 alc245_fixup_hp_mute_led_v1_coefbit(codec, fix, action);
1719 alc245_fixup_hp_gpio_led(codec, fix, action);
1720 }
1721
alc236_fixup_hp_mute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)1722 static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
1723 const struct hda_fixup *fix, int action)
1724 {
1725 alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
1726 alc236_fixup_hp_coef_micmute_led(codec, fix, action);
1727 }
1728
alc236_fixup_hp_micmute_led_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)1729 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
1730 const struct hda_fixup *fix, int action)
1731 {
1732 struct alc_spec *spec = codec->spec;
1733
1734 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1735 spec->cap_mute_led_nid = 0x1a;
1736 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
1737 codec->power_filter = led_power_filter;
1738 }
1739 }
1740
alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)1741 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
1742 const struct hda_fixup *fix, int action)
1743 {
1744 alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
1745 alc236_fixup_hp_micmute_led_vref(codec, fix, action);
1746 }
1747
alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec * codec,const struct hda_fixup * fix,int action)1748 static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
1749 const struct hda_fixup *fix, int action)
1750 {
1751 struct alc_spec *spec = codec->spec;
1752
1753 if (action == HDA_FIXUP_ACT_PRE_PROBE)
1754 spec->micmute_led_polarity = 1;
1755
1756 alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
1757 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01);
1758 }
1759
alc298_samsung_write_coef_pack(struct hda_codec * codec,const unsigned short coefs[2])1760 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
1761 const unsigned short coefs[2])
1762 {
1763 alc_write_coef_idx(codec, 0x23, coefs[0]);
1764 alc_write_coef_idx(codec, 0x25, coefs[1]);
1765 alc_write_coef_idx(codec, 0x26, 0xb011);
1766 }
1767
1768 struct alc298_samsung_amp_desc {
1769 unsigned char nid;
1770 unsigned short init_seq[2][2];
1771 };
1772
alc298_fixup_samsung_amp(struct hda_codec * codec,const struct hda_fixup * fix,int action)1773 static void alc298_fixup_samsung_amp(struct hda_codec *codec,
1774 const struct hda_fixup *fix, int action)
1775 {
1776 int i, j;
1777 static const unsigned short init_seq[][2] = {
1778 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 },
1779 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 },
1780 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e },
1781 { 0x41, 0x07 }, { 0x400, 0x1 }
1782 };
1783 static const struct alc298_samsung_amp_desc amps[] = {
1784 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } },
1785 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } }
1786 };
1787
1788 if (action != HDA_FIXUP_ACT_INIT)
1789 return;
1790
1791 for (i = 0; i < ARRAY_SIZE(amps); i++) {
1792 alc_write_coef_idx(codec, 0x22, amps[i].nid);
1793
1794 for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++)
1795 alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]);
1796
1797 for (j = 0; j < ARRAY_SIZE(init_seq); j++)
1798 alc298_samsung_write_coef_pack(codec, init_seq[j]);
1799 }
1800 }
1801
1802 struct alc298_samsung_v2_amp_desc {
1803 unsigned short nid;
1804 int init_seq_size;
1805 unsigned short init_seq[18][2];
1806 };
1807
1808 static const struct alc298_samsung_v2_amp_desc
1809 alc298_samsung_v2_amp_desc_tbl[] = {
1810 { 0x38, 18, {
1811 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1812 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe },
1813 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1814 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1815 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 },
1816 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 }
1817 }},
1818 { 0x39, 18, {
1819 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1820 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd },
1821 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1822 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1823 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 },
1824 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 }
1825 }},
1826 { 0x3c, 15, {
1827 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1828 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe },
1829 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1830 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1831 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d }
1832 }},
1833 { 0x3d, 15, {
1834 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 },
1835 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd },
1836 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 },
1837 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e },
1838 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d }
1839 }}
1840 };
1841
alc298_samsung_v2_enable_amps(struct hda_codec * codec)1842 static void alc298_samsung_v2_enable_amps(struct hda_codec *codec)
1843 {
1844 struct alc_spec *spec = codec->spec;
1845 static const unsigned short enable_seq[][2] = {
1846 { 0x203a, 0x0081 }, { 0x23ff, 0x0001 },
1847 };
1848 int i, j;
1849
1850 for (i = 0; i < spec->num_speaker_amps; i++) {
1851 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1852 for (j = 0; j < ARRAY_SIZE(enable_seq); j++)
1853 alc298_samsung_write_coef_pack(codec, enable_seq[j]);
1854 codec_dbg(codec, "alc298_samsung_v2: Enabled speaker amp 0x%02x\n",
1855 alc298_samsung_v2_amp_desc_tbl[i].nid);
1856 }
1857 }
1858
alc298_samsung_v2_disable_amps(struct hda_codec * codec)1859 static void alc298_samsung_v2_disable_amps(struct hda_codec *codec)
1860 {
1861 struct alc_spec *spec = codec->spec;
1862 static const unsigned short disable_seq[][2] = {
1863 { 0x23ff, 0x0000 }, { 0x203a, 0x0080 },
1864 };
1865 int i, j;
1866
1867 for (i = 0; i < spec->num_speaker_amps; i++) {
1868 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1869 for (j = 0; j < ARRAY_SIZE(disable_seq); j++)
1870 alc298_samsung_write_coef_pack(codec, disable_seq[j]);
1871 codec_dbg(codec, "alc298_samsung_v2: Disabled speaker amp 0x%02x\n",
1872 alc298_samsung_v2_amp_desc_tbl[i].nid);
1873 }
1874 }
1875
alc298_samsung_v2_playback_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)1876 static void alc298_samsung_v2_playback_hook(struct hda_pcm_stream *hinfo,
1877 struct hda_codec *codec,
1878 struct snd_pcm_substream *substream,
1879 int action)
1880 {
1881 /* Dynamically enable/disable speaker amps before and after playback */
1882 if (action == HDA_GEN_PCM_ACT_OPEN)
1883 alc298_samsung_v2_enable_amps(codec);
1884 if (action == HDA_GEN_PCM_ACT_CLOSE)
1885 alc298_samsung_v2_disable_amps(codec);
1886 }
1887
alc298_samsung_v2_init_amps(struct hda_codec * codec,int num_speaker_amps)1888 static void alc298_samsung_v2_init_amps(struct hda_codec *codec,
1889 int num_speaker_amps)
1890 {
1891 struct alc_spec *spec = codec->spec;
1892 int i, j;
1893
1894 /* Set spec's num_speaker_amps before doing anything else */
1895 spec->num_speaker_amps = num_speaker_amps;
1896
1897 /* Disable speaker amps before init to prevent any physical damage */
1898 alc298_samsung_v2_disable_amps(codec);
1899
1900 /* Initialize the speaker amps */
1901 for (i = 0; i < spec->num_speaker_amps; i++) {
1902 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid);
1903 for (j = 0; j < alc298_samsung_v2_amp_desc_tbl[i].init_seq_size; j++) {
1904 alc298_samsung_write_coef_pack(codec,
1905 alc298_samsung_v2_amp_desc_tbl[i].init_seq[j]);
1906 }
1907 alc_write_coef_idx(codec, 0x89, 0x0);
1908 codec_dbg(codec, "alc298_samsung_v2: Initialized speaker amp 0x%02x\n",
1909 alc298_samsung_v2_amp_desc_tbl[i].nid);
1910 }
1911
1912 /* register hook to enable speaker amps only when they are needed */
1913 spec->gen.pcm_playback_hook = alc298_samsung_v2_playback_hook;
1914 }
1915
1916 /* LG Gram Style 14: program vendor coef sequence used by HDA-verb workaround */
1917 struct alc298_lg_gram_style_seq {
1918 unsigned short verb;
1919 unsigned short idx;
1920 unsigned short val;
1921 };
1922
alc298_lg_gram_style_coef_write(struct hda_codec * codec,unsigned int verb,unsigned int idx,unsigned int val)1923 static void alc298_lg_gram_style_coef_write(struct hda_codec *codec,
1924 unsigned int verb,
1925 unsigned int idx,
1926 unsigned int val)
1927 {
1928 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x23);
1929 snd_hda_codec_write(codec, 0x20, 0, verb, idx);
1930 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0x00);
1931 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, val);
1932 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb011);
1933 }
1934
alc298_lg_gram_style_run_seq(struct hda_codec * codec,const struct alc298_lg_gram_style_seq * seq,int seq_size)1935 static void alc298_lg_gram_style_run_seq(struct hda_codec *codec,
1936 const struct alc298_lg_gram_style_seq *seq,
1937 int seq_size)
1938 {
1939 int i;
1940
1941 for (i = 0; i < seq_size; i++)
1942 alc298_lg_gram_style_coef_write(codec, seq[i].verb,
1943 seq[i].idx, seq[i].val);
1944 }
1945
1946 /* Coef sequences derived from the HDA-verb workaround for this model. */
1947 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_preinit_seq[] = {
1948 { 0x420, 0x00, 0x01 },
1949 };
1950
1951 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_disable_seq[] = {
1952 { 0x423, 0xff, 0x00 },
1953 { 0x420, 0x3a, 0x80 },
1954 };
1955
1956 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_enable_seq[] = {
1957 { 0x420, 0x3a, 0x81 },
1958 { 0x423, 0xff, 0x01 },
1959 };
1960
1961 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_init_seq_38[] = {
1962 { 0x423, 0xe1, 0x00 }, { 0x420, 0x12, 0x6f }, { 0x420, 0x14, 0x00 },
1963 { 0x420, 0x1b, 0x01 }, { 0x420, 0x1d, 0x01 }, { 0x420, 0x1f, 0xfe },
1964 { 0x420, 0x21, 0x00 }, { 0x420, 0x22, 0x10 }, { 0x420, 0x3d, 0x05 },
1965 { 0x420, 0x3f, 0x03 }, { 0x420, 0x50, 0x2c }, { 0x420, 0x76, 0x0e },
1966 { 0x420, 0x7c, 0x4a }, { 0x420, 0x81, 0x03 }, { 0x423, 0x99, 0x03 },
1967 { 0x423, 0xa4, 0xb5 }, { 0x423, 0xa5, 0x01 }, { 0x423, 0xba, 0x94 },
1968 };
1969
1970 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_init_seq_39[] = {
1971 { 0x423, 0xe1, 0x00 }, { 0x420, 0x12, 0x6f }, { 0x420, 0x14, 0x00 },
1972 { 0x420, 0x1b, 0x02 }, { 0x420, 0x1d, 0x02 }, { 0x420, 0x1f, 0xfd },
1973 { 0x420, 0x21, 0x01 }, { 0x420, 0x22, 0x10 }, { 0x420, 0x3d, 0x05 },
1974 { 0x420, 0x3f, 0x03 }, { 0x420, 0x50, 0x2c }, { 0x420, 0x76, 0x0e },
1975 { 0x420, 0x7c, 0x4a }, { 0x420, 0x81, 0x03 }, { 0x423, 0x99, 0x03 },
1976 { 0x423, 0xa4, 0xb5 }, { 0x423, 0xa5, 0x01 }, { 0x423, 0xba, 0x94 },
1977 };
1978
1979 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_init_seq_3c[] = {
1980 { 0x423, 0xe1, 0x00 }, { 0x420, 0x12, 0x6f }, { 0x420, 0x14, 0x00 },
1981 { 0x420, 0x1b, 0x01 }, { 0x420, 0x1d, 0x01 }, { 0x420, 0x1f, 0xfe },
1982 { 0x420, 0x21, 0x00 }, { 0x420, 0x22, 0x10 }, { 0x420, 0x3d, 0x05 },
1983 { 0x420, 0x3f, 0x03 }, { 0x420, 0x50, 0x2c }, { 0x420, 0x76, 0x0e },
1984 { 0x420, 0x7c, 0x4a }, { 0x420, 0x81, 0x03 }, { 0x423, 0xba, 0x8d },
1985 };
1986
1987 static const struct alc298_lg_gram_style_seq alc298_lg_gram_style_init_seq_3d[] = {
1988 { 0x423, 0xe1, 0x00 }, { 0x420, 0x12, 0x6f }, { 0x420, 0x14, 0x00 },
1989 { 0x420, 0x1b, 0x02 }, { 0x420, 0x1d, 0x02 }, { 0x420, 0x1f, 0xfd },
1990 { 0x420, 0x21, 0x01 }, { 0x420, 0x22, 0x10 }, { 0x420, 0x3d, 0x05 },
1991 { 0x420, 0x3f, 0x03 }, { 0x420, 0x50, 0x2c }, { 0x420, 0x76, 0x0e },
1992 { 0x420, 0x7c, 0x4a }, { 0x420, 0x81, 0x03 }, { 0x423, 0xba, 0x8d },
1993 };
1994
1995 struct alc298_lg_gram_style_amp_desc {
1996 unsigned char nid;
1997 const struct alc298_lg_gram_style_seq *init_seq;
1998 int init_seq_size;
1999 };
2000
2001 static const struct alc298_lg_gram_style_amp_desc alc298_lg_gram_style_amps[] = {
2002 { 0x38, alc298_lg_gram_style_init_seq_38,
2003 ARRAY_SIZE(alc298_lg_gram_style_init_seq_38) },
2004 { 0x39, alc298_lg_gram_style_init_seq_39,
2005 ARRAY_SIZE(alc298_lg_gram_style_init_seq_39) },
2006 { 0x3c, alc298_lg_gram_style_init_seq_3c,
2007 ARRAY_SIZE(alc298_lg_gram_style_init_seq_3c) },
2008 { 0x3d, alc298_lg_gram_style_init_seq_3d,
2009 ARRAY_SIZE(alc298_lg_gram_style_init_seq_3d) },
2010 };
2011
alc298_lg_gram_style_enable_amps(struct hda_codec * codec)2012 static void alc298_lg_gram_style_enable_amps(struct hda_codec *codec)
2013 {
2014 struct alc_spec *spec = codec->spec;
2015 int i;
2016
2017 for (i = 0; i < spec->num_speaker_amps; i++) {
2018 alc_write_coef_idx(codec, 0x22, alc298_lg_gram_style_amps[i].nid);
2019 alc298_lg_gram_style_run_seq(codec,
2020 alc298_lg_gram_style_enable_seq,
2021 ARRAY_SIZE(alc298_lg_gram_style_enable_seq));
2022 }
2023 }
2024
alc298_lg_gram_style_disable_amps(struct hda_codec * codec)2025 static void alc298_lg_gram_style_disable_amps(struct hda_codec *codec)
2026 {
2027 struct alc_spec *spec = codec->spec;
2028 int i;
2029
2030 for (i = 0; i < spec->num_speaker_amps; i++) {
2031 alc_write_coef_idx(codec, 0x22, alc298_lg_gram_style_amps[i].nid);
2032 alc298_lg_gram_style_run_seq(codec,
2033 alc298_lg_gram_style_disable_seq,
2034 ARRAY_SIZE(alc298_lg_gram_style_disable_seq));
2035 }
2036 }
2037
alc298_lg_gram_style_playback_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)2038 static void alc298_lg_gram_style_playback_hook(struct hda_pcm_stream *hinfo,
2039 struct hda_codec *codec,
2040 struct snd_pcm_substream *substream,
2041 int action)
2042 {
2043 if (action == HDA_GEN_PCM_ACT_OPEN)
2044 alc298_lg_gram_style_enable_amps(codec);
2045 if (action == HDA_GEN_PCM_ACT_CLOSE)
2046 alc298_lg_gram_style_disable_amps(codec);
2047 }
2048
alc298_lg_gram_style_init_amps(struct hda_codec * codec)2049 static void alc298_lg_gram_style_init_amps(struct hda_codec *codec)
2050 {
2051 struct alc_spec *spec = codec->spec;
2052 int i;
2053
2054 spec->num_speaker_amps = ARRAY_SIZE(alc298_lg_gram_style_amps);
2055
2056 for (i = 0; i < spec->num_speaker_amps; i++) {
2057 alc_write_coef_idx(codec, 0x22, alc298_lg_gram_style_amps[i].nid);
2058 alc298_lg_gram_style_run_seq(codec,
2059 alc298_lg_gram_style_preinit_seq,
2060 ARRAY_SIZE(alc298_lg_gram_style_preinit_seq));
2061 alc298_lg_gram_style_run_seq(codec,
2062 alc298_lg_gram_style_disable_seq,
2063 ARRAY_SIZE(alc298_lg_gram_style_disable_seq));
2064 alc298_lg_gram_style_run_seq(codec,
2065 alc298_lg_gram_style_amps[i].init_seq,
2066 alc298_lg_gram_style_amps[i].init_seq_size);
2067 alc_write_coef_idx(codec, 0x89, 0x0);
2068 }
2069
2070 spec->gen.pcm_playback_hook = alc298_lg_gram_style_playback_hook;
2071 }
2072
alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec * codec,const struct hda_fixup * fix,int action)2073 static void alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec *codec,
2074 const struct hda_fixup *fix, int action)
2075 {
2076 if (action == HDA_FIXUP_ACT_PROBE)
2077 alc298_samsung_v2_init_amps(codec, 2);
2078 }
2079
alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec * codec,const struct hda_fixup * fix,int action)2080 static void alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec *codec,
2081 const struct hda_fixup *fix, int action)
2082 {
2083 if (action == HDA_FIXUP_ACT_PROBE)
2084 alc298_samsung_v2_init_amps(codec, 4);
2085 }
2086
alc298_fixup_lg_gram_style_14(struct hda_codec * codec,const struct hda_fixup * fix,int action)2087 static void alc298_fixup_lg_gram_style_14(struct hda_codec *codec,
2088 const struct hda_fixup *fix, int action)
2089 {
2090 if (action == HDA_FIXUP_ACT_PROBE)
2091 alc298_lg_gram_style_init_amps(codec);
2092 }
2093
gpio2_mic_hotkey_event(struct hda_codec * codec,struct hda_jack_callback * event)2094 static void gpio2_mic_hotkey_event(struct hda_codec *codec,
2095 struct hda_jack_callback *event)
2096 {
2097 struct alc_spec *spec = codec->spec;
2098
2099 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore
2100 send both key on and key off event for every interrupt. */
2101 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
2102 input_sync(spec->kb_dev);
2103 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
2104 input_sync(spec->kb_dev);
2105 }
2106
alc_register_micmute_input_device(struct hda_codec * codec)2107 static int alc_register_micmute_input_device(struct hda_codec *codec)
2108 {
2109 struct alc_spec *spec = codec->spec;
2110 int i;
2111
2112 spec->kb_dev = input_allocate_device();
2113 if (!spec->kb_dev) {
2114 codec_err(codec, "Out of memory (input_allocate_device)\n");
2115 return -ENOMEM;
2116 }
2117
2118 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
2119
2120 spec->kb_dev->name = "Microphone Mute Button";
2121 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
2122 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
2123 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
2124 spec->kb_dev->keycode = spec->alc_mute_keycode_map;
2125 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
2126 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
2127
2128 if (input_register_device(spec->kb_dev)) {
2129 codec_err(codec, "input_register_device failed\n");
2130 input_free_device(spec->kb_dev);
2131 spec->kb_dev = NULL;
2132 return -ENOMEM;
2133 }
2134
2135 return 0;
2136 }
2137
2138 /* GPIO1 = set according to SKU external amp
2139 * GPIO2 = mic mute hotkey
2140 * GPIO3 = mute LED
2141 * GPIO4 = mic mute LED
2142 */
alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec * codec,const struct hda_fixup * fix,int action)2143 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec,
2144 const struct hda_fixup *fix, int action)
2145 {
2146 struct alc_spec *spec = codec->spec;
2147
2148 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10);
2149 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2150 spec->init_amp = ALC_INIT_DEFAULT;
2151 if (alc_register_micmute_input_device(codec) != 0)
2152 return;
2153
2154 spec->gpio_mask |= 0x06;
2155 spec->gpio_dir |= 0x02;
2156 spec->gpio_data |= 0x02;
2157 snd_hda_codec_write_cache(codec, codec->core.afg, 0,
2158 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04);
2159 snd_hda_jack_detect_enable_callback(codec, codec->core.afg,
2160 gpio2_mic_hotkey_event);
2161 return;
2162 }
2163
2164 if (!spec->kb_dev)
2165 return;
2166
2167 switch (action) {
2168 case HDA_FIXUP_ACT_FREE:
2169 input_unregister_device(spec->kb_dev);
2170 spec->kb_dev = NULL;
2171 }
2172 }
2173
2174 /* GPIO2 = mic mute hotkey
2175 * GPIO3 = mic mute LED
2176 */
alc233_fixup_lenovo_gpio2_mic_hotkey(struct hda_codec * codec,const struct hda_fixup * fix,int action)2177 static void alc233_fixup_lenovo_gpio2_mic_hotkey(struct hda_codec *codec,
2178 const struct hda_fixup *fix, int action)
2179 {
2180 struct alc_spec *spec = codec->spec;
2181
2182 alc233_fixup_lenovo_coef_micmute_led(codec, fix, action);
2183 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2184 alc_update_coef_idx(codec, 0x10, 1<<2, 1<<2);
2185 if (alc_register_micmute_input_device(codec) != 0)
2186 return;
2187
2188 spec->gpio_mask |= 0x04;
2189 spec->gpio_dir |= 0x0;
2190 snd_hda_codec_write_cache(codec, codec->core.afg, 0,
2191 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04);
2192 snd_hda_jack_detect_enable_callback(codec, codec->core.afg,
2193 gpio2_mic_hotkey_event);
2194 return;
2195 }
2196
2197 if (!spec->kb_dev)
2198 return;
2199
2200 switch (action) {
2201 case HDA_FIXUP_ACT_FREE:
2202 input_unregister_device(spec->kb_dev);
2203 spec->kb_dev = NULL;
2204 }
2205 }
2206
2207 /* Line2 = mic mute hotkey
2208 * GPIO2 = mic mute LED
2209 */
alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec * codec,const struct hda_fixup * fix,int action)2210 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
2211 const struct hda_fixup *fix, int action)
2212 {
2213 struct alc_spec *spec = codec->spec;
2214
2215 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
2216 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2217 spec->init_amp = ALC_INIT_DEFAULT;
2218 if (alc_register_micmute_input_device(codec) != 0)
2219 return;
2220
2221 snd_hda_jack_detect_enable_callback(codec, 0x1b,
2222 gpio2_mic_hotkey_event);
2223 return;
2224 }
2225
2226 if (!spec->kb_dev)
2227 return;
2228
2229 switch (action) {
2230 case HDA_FIXUP_ACT_FREE:
2231 input_unregister_device(spec->kb_dev);
2232 spec->kb_dev = NULL;
2233 }
2234 }
2235
alc269_fixup_hp_line1_mic1_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)2236 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
2237 const struct hda_fixup *fix, int action)
2238 {
2239 struct alc_spec *spec = codec->spec;
2240
2241 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a);
2242 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2243 spec->cap_mute_led_nid = 0x18;
2244 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set);
2245 }
2246 }
2247
alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)2248 static void alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec *codec,
2249 const struct hda_fixup *fix, int action)
2250 {
2251 struct alc_spec *spec = codec->spec;
2252
2253 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2254 spec->micmute_led_polarity = 1;
2255 alc233_fixup_lenovo_line2_mic_hotkey(codec, fix, action);
2256 }
2257
alc255_set_default_jack_type(struct hda_codec * codec)2258 static void alc255_set_default_jack_type(struct hda_codec *codec)
2259 {
2260 /* Set to iphone type */
2261 static const struct coef_fw alc255fw[] = {
2262 WRITE_COEF(0x1b, 0x880b),
2263 WRITE_COEF(0x45, 0xd089),
2264 WRITE_COEF(0x1b, 0x080b),
2265 WRITE_COEF(0x46, 0x0004),
2266 WRITE_COEF(0x1b, 0x0c0b),
2267 {}
2268 };
2269 static const struct coef_fw alc256fw[] = {
2270 WRITE_COEF(0x1b, 0x884b),
2271 WRITE_COEF(0x45, 0xd089),
2272 WRITE_COEF(0x1b, 0x084b),
2273 WRITE_COEF(0x46, 0x0004),
2274 WRITE_COEF(0x1b, 0x0c4b),
2275 {}
2276 };
2277 switch (codec->core.vendor_id) {
2278 case 0x10ec0255:
2279 alc_process_coef_fw(codec, alc255fw);
2280 break;
2281 case 0x10ec0230:
2282 case 0x10ec0236:
2283 case 0x10ec0256:
2284 case 0x19e58326:
2285 alc_process_coef_fw(codec, alc256fw);
2286 break;
2287 }
2288 msleep(30);
2289 }
2290
alc_fixup_headset_mode_alc255(struct hda_codec * codec,const struct hda_fixup * fix,int action)2291 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
2292 const struct hda_fixup *fix, int action)
2293 {
2294 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2295 alc255_set_default_jack_type(codec);
2296 }
2297 alc_fixup_headset_mode(codec, fix, action);
2298 }
2299
alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2300 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
2301 const struct hda_fixup *fix, int action)
2302 {
2303 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2304 struct alc_spec *spec = codec->spec;
2305 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2306 alc255_set_default_jack_type(codec);
2307 } else {
2308 alc_fixup_headset_mode(codec, fix, action);
2309 }
2310 }
2311
alc288_update_headset_jack_cb(struct hda_codec * codec,struct hda_jack_callback * jack)2312 static void alc288_update_headset_jack_cb(struct hda_codec *codec,
2313 struct hda_jack_callback *jack)
2314 {
2315 struct alc_spec *spec = codec->spec;
2316
2317 alc_update_headset_jack_cb(codec, jack);
2318 /* Headset Mic enable or disable, only for Dell Dino */
2319 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
2320 }
2321
alc_fixup_headset_mode_dell_alc288(struct hda_codec * codec,const struct hda_fixup * fix,int action)2322 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec,
2323 const struct hda_fixup *fix, int action)
2324 {
2325 alc_fixup_headset_mode(codec, fix, action);
2326 if (action == HDA_FIXUP_ACT_PROBE) {
2327 struct alc_spec *spec = codec->spec;
2328 /* toggled via hp_automute_hook */
2329 spec->gpio_mask |= 0x40;
2330 spec->gpio_dir |= 0x40;
2331 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
2332 }
2333 }
2334
alc_fixup_no_shutup(struct hda_codec * codec,const struct hda_fixup * fix,int action)2335 static void alc_fixup_no_shutup(struct hda_codec *codec,
2336 const struct hda_fixup *fix, int action)
2337 {
2338 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2339 struct alc_spec *spec = codec->spec;
2340 spec->no_shutup_pins = 1;
2341 }
2342 }
2343
2344 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
alc_fixup_tpt440_dock(struct hda_codec * codec,const struct hda_fixup * fix,int action)2345 static void alc_fixup_tpt440_dock(struct hda_codec *codec,
2346 const struct hda_fixup *fix, int action)
2347 {
2348 static const struct hda_pintbl pincfgs[] = {
2349 { 0x16, 0x21211010 }, /* dock headphone */
2350 { 0x19, 0x21a11010 }, /* dock mic */
2351 { }
2352 };
2353 struct alc_spec *spec = codec->spec;
2354
2355 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2356 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
2357 codec->power_save_node = 0; /* avoid click noises */
2358 snd_hda_apply_pincfgs(codec, pincfgs);
2359 }
2360 }
2361
alc_fixup_tpt470_dock(struct hda_codec * codec,const struct hda_fixup * fix,int action)2362 static void alc_fixup_tpt470_dock(struct hda_codec *codec,
2363 const struct hda_fixup *fix, int action)
2364 {
2365 static const struct hda_pintbl pincfgs[] = {
2366 { 0x17, 0x21211010 }, /* dock headphone */
2367 { 0x19, 0x21a11010 }, /* dock mic */
2368 { }
2369 };
2370 struct alc_spec *spec = codec->spec;
2371
2372 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2373 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
2374 snd_hda_apply_pincfgs(codec, pincfgs);
2375 } else if (action == HDA_FIXUP_ACT_INIT) {
2376 /* Enable DOCK device */
2377 snd_hda_codec_write(codec, 0x17, 0,
2378 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
2379 /* Enable DOCK device */
2380 snd_hda_codec_write(codec, 0x19, 0,
2381 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
2382 }
2383 }
2384
alc_fixup_tpt470_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2385 static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
2386 const struct hda_fixup *fix, int action)
2387 {
2388 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
2389 * the speaker output becomes too low by some reason on Thinkpads with
2390 * ALC298 codec
2391 */
2392 static const hda_nid_t preferred_pairs[] = {
2393 0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
2394 0
2395 };
2396 struct alc_spec *spec = codec->spec;
2397
2398 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2399 spec->gen.preferred_dacs = preferred_pairs;
2400 }
2401
alc295_fixup_asus_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2402 static void alc295_fixup_asus_dacs(struct hda_codec *codec,
2403 const struct hda_fixup *fix, int action)
2404 {
2405 static const hda_nid_t preferred_pairs[] = {
2406 0x17, 0x02, 0x21, 0x03, 0
2407 };
2408 struct alc_spec *spec = codec->spec;
2409
2410 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2411 spec->gen.preferred_dacs = preferred_pairs;
2412 }
2413
alc271_hp_gate_mic_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)2414 static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
2415 const struct hda_fixup *fix,
2416 int action)
2417 {
2418 struct alc_spec *spec = codec->spec;
2419
2420 if (action == HDA_FIXUP_ACT_PROBE) {
2421 int mic_pin = alc_find_ext_mic_pin(codec);
2422 int hp_pin = alc_get_hp_pin(spec);
2423
2424 if (snd_BUG_ON(!mic_pin || !hp_pin))
2425 return;
2426 snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin);
2427 }
2428 }
2429
alc269_fixup_limit_int_mic_boost(struct hda_codec * codec,const struct hda_fixup * fix,int action)2430 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
2431 const struct hda_fixup *fix,
2432 int action)
2433 {
2434 struct alc_spec *spec = codec->spec;
2435 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
2436 int i;
2437
2438 /* The mic boosts on level 2 and 3 are too noisy
2439 on the internal mic input.
2440 Therefore limit the boost to 0 or 1. */
2441
2442 if (action != HDA_FIXUP_ACT_PROBE)
2443 return;
2444
2445 for (i = 0; i < cfg->num_inputs; i++) {
2446 hda_nid_t nid = cfg->inputs[i].pin;
2447 unsigned int defcfg;
2448 if (cfg->inputs[i].type != AUTO_PIN_MIC)
2449 continue;
2450 defcfg = snd_hda_codec_get_pincfg(codec, nid);
2451 if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT)
2452 continue;
2453
2454 snd_hda_override_amp_caps(codec, nid, HDA_INPUT,
2455 (0x00 << AC_AMPCAP_OFFSET_SHIFT) |
2456 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) |
2457 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) |
2458 (0 << AC_AMPCAP_MUTE_SHIFT));
2459 }
2460 }
2461
alc283_hp_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)2462 static void alc283_hp_automute_hook(struct hda_codec *codec,
2463 struct hda_jack_callback *jack)
2464 {
2465 struct alc_spec *spec = codec->spec;
2466 int vref;
2467
2468 msleep(200);
2469 snd_hda_gen_hp_automute(codec, jack);
2470
2471 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
2472
2473 msleep(600);
2474 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2475 vref);
2476 }
2477
alc283_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2478 static void alc283_fixup_chromebook(struct hda_codec *codec,
2479 const struct hda_fixup *fix, int action)
2480 {
2481 struct alc_spec *spec = codec->spec;
2482
2483 switch (action) {
2484 case HDA_FIXUP_ACT_PRE_PROBE:
2485 snd_hda_override_wcaps(codec, 0x03, 0);
2486 /* Disable AA-loopback as it causes white noise */
2487 spec->gen.mixer_nid = 0;
2488 break;
2489 case HDA_FIXUP_ACT_INIT:
2490 /* MIC2-VREF control */
2491 /* Set to manual mode */
2492 alc_update_coef_idx(codec, 0x06, 0x000c, 0);
2493 /* Enable Line1 input control by verb */
2494 alc_update_coef_idx(codec, 0x1a, 0, 1 << 4);
2495 break;
2496 }
2497 }
2498
alc283_fixup_sense_combo_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)2499 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
2500 const struct hda_fixup *fix, int action)
2501 {
2502 struct alc_spec *spec = codec->spec;
2503
2504 switch (action) {
2505 case HDA_FIXUP_ACT_PRE_PROBE:
2506 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
2507 break;
2508 case HDA_FIXUP_ACT_INIT:
2509 /* MIC2-VREF control */
2510 /* Set to manual mode */
2511 alc_update_coef_idx(codec, 0x06, 0x000c, 0);
2512 break;
2513 }
2514 }
2515
2516 /* mute tablet speaker pin (0x14) via dock plugging in addition */
asus_tx300_automute(struct hda_codec * codec)2517 static void asus_tx300_automute(struct hda_codec *codec)
2518 {
2519 struct alc_spec *spec = codec->spec;
2520 snd_hda_gen_update_outputs(codec);
2521 if (snd_hda_jack_detect(codec, 0x1b))
2522 spec->gen.mute_bits |= (1ULL << 0x14);
2523 }
2524
alc282_fixup_asus_tx300(struct hda_codec * codec,const struct hda_fixup * fix,int action)2525 static void alc282_fixup_asus_tx300(struct hda_codec *codec,
2526 const struct hda_fixup *fix, int action)
2527 {
2528 struct alc_spec *spec = codec->spec;
2529 static const struct hda_pintbl dock_pins[] = {
2530 { 0x1b, 0x21114000 }, /* dock speaker pin */
2531 {}
2532 };
2533
2534 switch (action) {
2535 case HDA_FIXUP_ACT_PRE_PROBE:
2536 spec->init_amp = ALC_INIT_DEFAULT;
2537 /* TX300 needs to set up GPIO2 for the speaker amp */
2538 alc_setup_gpio(codec, 0x04);
2539 snd_hda_apply_pincfgs(codec, dock_pins);
2540 spec->gen.auto_mute_via_amp = 1;
2541 spec->gen.automute_hook = asus_tx300_automute;
2542 snd_hda_jack_detect_enable_callback(codec, 0x1b,
2543 snd_hda_gen_hp_automute);
2544 break;
2545 case HDA_FIXUP_ACT_PROBE:
2546 spec->init_amp = ALC_INIT_DEFAULT;
2547 break;
2548 case HDA_FIXUP_ACT_BUILD:
2549 /* this is a bit tricky; give more sane names for the main
2550 * (tablet) speaker and the dock speaker, respectively
2551 */
2552 rename_ctl(codec, "Speaker Playback Switch",
2553 "Dock Speaker Playback Switch");
2554 rename_ctl(codec, "Bass Speaker Playback Switch",
2555 "Speaker Playback Switch");
2556 break;
2557 }
2558 }
2559
alc290_fixup_mono_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)2560 static void alc290_fixup_mono_speakers(struct hda_codec *codec,
2561 const struct hda_fixup *fix, int action)
2562 {
2563 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2564 /* DAC node 0x03 is giving mono output. We therefore want to
2565 make sure 0x14 (front speaker) and 0x15 (headphones) use the
2566 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
2567 static const hda_nid_t conn1[] = { 0x0c };
2568 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
2569 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
2570 }
2571 }
2572
alc298_fixup_speaker_volume(struct hda_codec * codec,const struct hda_fixup * fix,int action)2573 static void alc298_fixup_speaker_volume(struct hda_codec *codec,
2574 const struct hda_fixup *fix, int action)
2575 {
2576 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2577 /* The speaker is routed to the Node 0x06 by a mistake, as a result
2578 we can't adjust the speaker's volume since this node does not has
2579 Amp-out capability. we change the speaker's route to:
2580 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
2581 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
2582 speaker's volume now. */
2583
2584 static const hda_nid_t conn1[] = { 0x0c };
2585 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
2586 }
2587 }
2588
2589 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */
alc295_fixup_disable_dac3(struct hda_codec * codec,const struct hda_fixup * fix,int action)2590 static void alc295_fixup_disable_dac3(struct hda_codec *codec,
2591 const struct hda_fixup *fix, int action)
2592 {
2593 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2594 static const hda_nid_t conn[] = { 0x02, 0x03 };
2595 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2596 }
2597 }
2598
2599 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */
alc285_fixup_speaker2_to_dac1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2600 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec,
2601 const struct hda_fixup *fix, int action)
2602 {
2603 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2604 static const hda_nid_t conn[] = { 0x02 };
2605 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2606 }
2607 }
2608
2609 /* disable DAC3 (0x06) selection on NID 0x15 - share Speaker/Bass Speaker DAC 0x03 */
alc294_fixup_bass_speaker_15(struct hda_codec * codec,const struct hda_fixup * fix,int action)2610 static void alc294_fixup_bass_speaker_15(struct hda_codec *codec,
2611 const struct hda_fixup *fix, int action)
2612 {
2613 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2614 static const hda_nid_t conn[] = { 0x02, 0x03 };
2615 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
2616 snd_hda_gen_add_micmute_led_cdev(codec, NULL);
2617 }
2618 }
2619
2620 /* Hook to update amp GPIO4 for automute */
alc280_hp_gpio4_automute_hook(struct hda_codec * codec,struct hda_jack_callback * jack)2621 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
2622 struct hda_jack_callback *jack)
2623 {
2624 struct alc_spec *spec = codec->spec;
2625
2626 snd_hda_gen_hp_automute(codec, jack);
2627 /* mute_led_polarity is set to 0, so we pass inverted value here */
2628 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
2629 !spec->gen.hp_jack_present);
2630 }
2631
2632 /* Manage GPIOs for HP EliteBook Folio 9480m.
2633 *
2634 * GPIO4 is the headphone amplifier power control
2635 * GPIO3 is the audio output mute indicator LED
2636 */
2637
alc280_fixup_hp_9480m(struct hda_codec * codec,const struct hda_fixup * fix,int action)2638 static void alc280_fixup_hp_9480m(struct hda_codec *codec,
2639 const struct hda_fixup *fix,
2640 int action)
2641 {
2642 struct alc_spec *spec = codec->spec;
2643
2644 alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
2645 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2646 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */
2647 spec->gpio_mask |= 0x10;
2648 spec->gpio_dir |= 0x10;
2649 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
2650 }
2651 }
2652
alc275_fixup_gpio4_off(struct hda_codec * codec,const struct hda_fixup * fix,int action)2653 static void alc275_fixup_gpio4_off(struct hda_codec *codec,
2654 const struct hda_fixup *fix,
2655 int action)
2656 {
2657 struct alc_spec *spec = codec->spec;
2658
2659 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2660 spec->gpio_mask |= 0x04;
2661 spec->gpio_dir |= 0x04;
2662 /* set data bit low */
2663 }
2664 }
2665
2666 /* Quirk for Thinkpad X1 7th and 8th Gen
2667 * The following fixed routing needed
2668 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
2669 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
2670 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
2671 */
alc285_fixup_thinkpad_x1_gen7(struct hda_codec * codec,const struct hda_fixup * fix,int action)2672 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
2673 const struct hda_fixup *fix, int action)
2674 {
2675 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
2676 static const hda_nid_t preferred_pairs[] = {
2677 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0
2678 };
2679 struct alc_spec *spec = codec->spec;
2680
2681 switch (action) {
2682 case HDA_FIXUP_ACT_PRE_PROBE:
2683 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2684 spec->gen.preferred_dacs = preferred_pairs;
2685 break;
2686 case HDA_FIXUP_ACT_BUILD:
2687 /* The generic parser creates somewhat unintuitive volume ctls
2688 * with the fixed routing above, and the shared DAC2 may be
2689 * confusing for PA.
2690 * Rename those to unique names so that PA doesn't touch them
2691 * and use only Master volume.
2692 */
2693 rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume");
2694 rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume");
2695 break;
2696 }
2697 }
2698
alc225_fixup_s3_pop_noise(struct hda_codec * codec,const struct hda_fixup * fix,int action)2699 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec,
2700 const struct hda_fixup *fix, int action)
2701 {
2702 if (action != HDA_FIXUP_ACT_PRE_PROBE)
2703 return;
2704
2705 codec->power_save_node = 1;
2706 }
2707
2708 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
alc274_fixup_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2709 static void alc274_fixup_bind_dacs(struct hda_codec *codec,
2710 const struct hda_fixup *fix, int action)
2711 {
2712 struct alc_spec *spec = codec->spec;
2713 static const hda_nid_t preferred_pairs[] = {
2714 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
2715 0
2716 };
2717
2718 if (action != HDA_FIXUP_ACT_PRE_PROBE)
2719 return;
2720
2721 spec->gen.preferred_dacs = preferred_pairs;
2722 spec->gen.auto_mute_via_amp = 1;
2723 codec->power_save_node = 0;
2724 }
2725
2726 /* avoid DAC 0x06 for speaker switch 0x17; it has no volume control */
alc274_fixup_hp_aio_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2727 static void alc274_fixup_hp_aio_bind_dacs(struct hda_codec *codec,
2728 const struct hda_fixup *fix, int action)
2729 {
2730 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
2731 /* The speaker is routed to the Node 0x06 by a mistake, thus the
2732 * speaker's volume can't be adjusted since the node doesn't have
2733 * Amp-out capability. Assure the speaker and lineout pin to be
2734 * coupled with DAC NID 0x02.
2735 */
2736 static const hda_nid_t preferred_pairs[] = {
2737 0x16, 0x02, 0x17, 0x02, 0x21, 0x03, 0
2738 };
2739 struct alc_spec *spec = codec->spec;
2740
2741 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2742 spec->gen.preferred_dacs = preferred_pairs;
2743 }
2744
2745 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
alc289_fixup_asus_ga401(struct hda_codec * codec,const struct hda_fixup * fix,int action)2746 static void alc289_fixup_asus_ga401(struct hda_codec *codec,
2747 const struct hda_fixup *fix, int action)
2748 {
2749 static const hda_nid_t preferred_pairs[] = {
2750 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0
2751 };
2752 struct alc_spec *spec = codec->spec;
2753
2754 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2755 spec->gen.preferred_dacs = preferred_pairs;
2756 }
2757
2758 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
alc285_fixup_invalidate_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)2759 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
2760 const struct hda_fixup *fix, int action)
2761 {
2762 if (action != HDA_FIXUP_ACT_PRE_PROBE)
2763 return;
2764
2765 snd_hda_override_wcaps(codec, 0x03, 0);
2766 }
2767
alc_combo_jack_hp_jd_restart(struct hda_codec * codec)2768 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
2769 {
2770 switch (codec->core.vendor_id) {
2771 case 0x10ec0274:
2772 case 0x10ec0294:
2773 case 0x10ec0225:
2774 case 0x10ec0295:
2775 case 0x10ec0299:
2776 alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
2777 alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
2778 break;
2779 case 0x10ec0230:
2780 case 0x10ec0235:
2781 case 0x10ec0236:
2782 case 0x10ec0255:
2783 case 0x10ec0256:
2784 case 0x10ec0257:
2785 case 0x19e58326:
2786 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
2787 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
2788 break;
2789 }
2790 }
2791
alc295_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2792 static void alc295_fixup_chromebook(struct hda_codec *codec,
2793 const struct hda_fixup *fix, int action)
2794 {
2795 struct alc_spec *spec = codec->spec;
2796
2797 switch (action) {
2798 case HDA_FIXUP_ACT_PRE_PROBE:
2799 spec->ultra_low_power = true;
2800 break;
2801 case HDA_FIXUP_ACT_INIT:
2802 alc_combo_jack_hp_jd_restart(codec);
2803 break;
2804 }
2805 }
2806
alc256_fixup_chromebook(struct hda_codec * codec,const struct hda_fixup * fix,int action)2807 static void alc256_fixup_chromebook(struct hda_codec *codec,
2808 const struct hda_fixup *fix, int action)
2809 {
2810 struct alc_spec *spec = codec->spec;
2811
2812 switch (action) {
2813 case HDA_FIXUP_ACT_PRE_PROBE:
2814 if (codec->core.subsystem_id == 0x10280d76)
2815 spec->gen.suppress_auto_mute = 0;
2816 else
2817 spec->gen.suppress_auto_mute = 1;
2818 spec->gen.suppress_auto_mic = 1;
2819 spec->en_3kpull_low = false;
2820 break;
2821 }
2822 }
2823
alc_fixup_disable_mic_vref(struct hda_codec * codec,const struct hda_fixup * fix,int action)2824 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
2825 const struct hda_fixup *fix, int action)
2826 {
2827 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2828 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
2829 }
2830
2831
alc294_gx502_toggle_output(struct hda_codec * codec,struct hda_jack_callback * cb)2832 static void alc294_gx502_toggle_output(struct hda_codec *codec,
2833 struct hda_jack_callback *cb)
2834 {
2835 /* The Windows driver sets the codec up in a very different way where
2836 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it
2837 */
2838 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
2839 alc_write_coef_idx(codec, 0x10, 0x8a20);
2840 else
2841 alc_write_coef_idx(codec, 0x10, 0x0a20);
2842 }
2843
alc294_fixup_gx502_hp(struct hda_codec * codec,const struct hda_fixup * fix,int action)2844 static void alc294_fixup_gx502_hp(struct hda_codec *codec,
2845 const struct hda_fixup *fix, int action)
2846 {
2847 /* Pin 0x21: headphones/headset mic */
2848 if (!is_jack_detectable(codec, 0x21))
2849 return;
2850
2851 switch (action) {
2852 case HDA_FIXUP_ACT_PRE_PROBE:
2853 snd_hda_jack_detect_enable_callback(codec, 0x21,
2854 alc294_gx502_toggle_output);
2855 break;
2856 case HDA_FIXUP_ACT_INIT:
2857 /* Make sure to start in a correct state, i.e. if
2858 * headphones have been plugged in before powering up the system
2859 */
2860 alc294_gx502_toggle_output(codec, NULL);
2861 break;
2862 }
2863 }
2864
alc294_gu502_toggle_output(struct hda_codec * codec,struct hda_jack_callback * cb)2865 static void alc294_gu502_toggle_output(struct hda_codec *codec,
2866 struct hda_jack_callback *cb)
2867 {
2868 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is
2869 * responsible from changes between speakers and headphones
2870 */
2871 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT)
2872 alc_write_coef_idx(codec, 0x10, 0x8420);
2873 else
2874 alc_write_coef_idx(codec, 0x10, 0x0a20);
2875 }
2876
alc294_fixup_gu502_hp(struct hda_codec * codec,const struct hda_fixup * fix,int action)2877 static void alc294_fixup_gu502_hp(struct hda_codec *codec,
2878 const struct hda_fixup *fix, int action)
2879 {
2880 if (!is_jack_detectable(codec, 0x21))
2881 return;
2882
2883 switch (action) {
2884 case HDA_FIXUP_ACT_PRE_PROBE:
2885 snd_hda_jack_detect_enable_callback(codec, 0x21,
2886 alc294_gu502_toggle_output);
2887 break;
2888 case HDA_FIXUP_ACT_INIT:
2889 alc294_gu502_toggle_output(codec, NULL);
2890 break;
2891 }
2892 }
2893
alc285_fixup_hp_gpio_amp_init(struct hda_codec * codec,const struct hda_fixup * fix,int action)2894 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
2895 const struct hda_fixup *fix, int action)
2896 {
2897 if (action != HDA_FIXUP_ACT_INIT)
2898 return;
2899
2900 msleep(100);
2901 alc_write_coef_idx(codec, 0x65, 0x0);
2902 }
2903
alc274_fixup_hp_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2904 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
2905 const struct hda_fixup *fix, int action)
2906 {
2907 switch (action) {
2908 case HDA_FIXUP_ACT_INIT:
2909 alc_combo_jack_hp_jd_restart(codec);
2910 break;
2911 }
2912 }
2913
alc_fixup_no_int_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)2914 static void alc_fixup_no_int_mic(struct hda_codec *codec,
2915 const struct hda_fixup *fix, int action)
2916 {
2917 struct alc_spec *spec = codec->spec;
2918
2919 switch (action) {
2920 case HDA_FIXUP_ACT_PRE_PROBE:
2921 /* Mic RING SLEEVE swap for combo jack */
2922 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
2923 spec->no_internal_mic_pin = true;
2924 break;
2925 case HDA_FIXUP_ACT_INIT:
2926 alc_combo_jack_hp_jd_restart(codec);
2927 break;
2928 }
2929 }
2930
2931 /* GPIO1 = amplifier on/off
2932 * GPIO3 = mic mute LED
2933 */
alc285_fixup_hp_spectre_x360_eb1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2934 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
2935 const struct hda_fixup *fix, int action)
2936 {
2937 static const hda_nid_t conn[] = { 0x02 };
2938
2939 struct alc_spec *spec = codec->spec;
2940 static const struct hda_pintbl pincfgs[] = {
2941 { 0x14, 0x90170110 }, /* front/high speakers */
2942 { 0x17, 0x90170130 }, /* back/bass speakers */
2943 { }
2944 };
2945
2946 //enable micmute led
2947 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
2948
2949 switch (action) {
2950 case HDA_FIXUP_ACT_PRE_PROBE:
2951 spec->micmute_led_polarity = 1;
2952 /* needed for amp of back speakers */
2953 spec->gpio_mask |= 0x01;
2954 spec->gpio_dir |= 0x01;
2955 snd_hda_apply_pincfgs(codec, pincfgs);
2956 /* share DAC to have unified volume control */
2957 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2958 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2959 break;
2960 case HDA_FIXUP_ACT_INIT:
2961 /* need to toggle GPIO to enable the amp of back speakers */
2962 alc_update_gpio_data(codec, 0x01, true);
2963 msleep(100);
2964 alc_update_gpio_data(codec, 0x01, false);
2965 break;
2966 }
2967 }
2968
2969 /* GPIO1 = amplifier on/off */
alc285_fixup_hp_spectre_x360_df1(struct hda_codec * codec,const struct hda_fixup * fix,int action)2970 static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
2971 const struct hda_fixup *fix,
2972 int action)
2973 {
2974 struct alc_spec *spec = codec->spec;
2975 static const hda_nid_t conn[] = { 0x02 };
2976 static const struct hda_pintbl pincfgs[] = {
2977 { 0x14, 0x90170110 }, /* front/high speakers */
2978 { 0x17, 0x90170130 }, /* back/bass speakers */
2979 { }
2980 };
2981
2982 // enable mute led
2983 alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
2984
2985 switch (action) {
2986 case HDA_FIXUP_ACT_PRE_PROBE:
2987 /* needed for amp of back speakers */
2988 spec->gpio_mask |= 0x01;
2989 spec->gpio_dir |= 0x01;
2990 snd_hda_apply_pincfgs(codec, pincfgs);
2991 /* share DAC to have unified volume control */
2992 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
2993 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
2994 break;
2995 case HDA_FIXUP_ACT_INIT:
2996 /* need to toggle GPIO to enable the amp of back speakers */
2997 alc_update_gpio_data(codec, 0x01, true);
2998 msleep(100);
2999 alc_update_gpio_data(codec, 0x01, false);
3000 break;
3001 }
3002 }
3003
alc285_fixup_hp_spectre_x360(struct hda_codec * codec,const struct hda_fixup * fix,int action)3004 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
3005 const struct hda_fixup *fix, int action)
3006 {
3007 static const hda_nid_t conn[] = { 0x02 };
3008 static const struct hda_pintbl pincfgs[] = {
3009 { 0x14, 0x90170110 }, /* rear speaker */
3010 { }
3011 };
3012
3013 switch (action) {
3014 case HDA_FIXUP_ACT_PRE_PROBE:
3015 snd_hda_apply_pincfgs(codec, pincfgs);
3016 /* force front speaker to DAC1 */
3017 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3018 break;
3019 }
3020 }
3021
alc285_fixup_hp_envy_x360(struct hda_codec * codec,const struct hda_fixup * fix,int action)3022 static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
3023 const struct hda_fixup *fix,
3024 int action)
3025 {
3026 static const struct coef_fw coefs[] = {
3027 WRITE_COEF(0x08, 0x6a0c), WRITE_COEF(0x0d, 0xa023),
3028 WRITE_COEF(0x10, 0x0320), WRITE_COEF(0x1a, 0x8c03),
3029 WRITE_COEF(0x25, 0x1800), WRITE_COEF(0x26, 0x003a),
3030 WRITE_COEF(0x28, 0x1dfe), WRITE_COEF(0x29, 0xb014),
3031 WRITE_COEF(0x2b, 0x1dfe), WRITE_COEF(0x37, 0xfe15),
3032 WRITE_COEF(0x38, 0x7909), WRITE_COEF(0x45, 0xd489),
3033 WRITE_COEF(0x46, 0x00f4), WRITE_COEF(0x4a, 0x21e0),
3034 WRITE_COEF(0x66, 0x03f0), WRITE_COEF(0x67, 0x1000),
3035 WRITE_COEF(0x6e, 0x1005), { }
3036 };
3037
3038 static const struct hda_pintbl pincfgs[] = {
3039 { 0x12, 0xb7a60130 }, /* Internal microphone*/
3040 { 0x14, 0x90170150 }, /* B&O soundbar speakers */
3041 { 0x17, 0x90170153 }, /* Side speakers */
3042 { 0x19, 0x03a11040 }, /* Headset microphone */
3043 { }
3044 };
3045
3046 switch (action) {
3047 case HDA_FIXUP_ACT_PRE_PROBE:
3048 snd_hda_apply_pincfgs(codec, pincfgs);
3049
3050 /* Fixes volume control problem for side speakers */
3051 alc295_fixup_disable_dac3(codec, fix, action);
3052
3053 /* Fixes no sound from headset speaker */
3054 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0);
3055
3056 /* Auto-enable headset mic when plugged */
3057 snd_hda_jack_set_gating_jack(codec, 0x19, 0x21);
3058
3059 /* Headset mic volume enhancement */
3060 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREF50);
3061 break;
3062 case HDA_FIXUP_ACT_INIT:
3063 alc_process_coef_fw(codec, coefs);
3064 break;
3065 case HDA_FIXUP_ACT_BUILD:
3066 rename_ctl(codec, "Bass Speaker Playback Volume",
3067 "B&O-Tuned Playback Volume");
3068 rename_ctl(codec, "Front Playback Switch",
3069 "B&O Soundbar Playback Switch");
3070 rename_ctl(codec, "Bass Speaker Playback Switch",
3071 "Side Speaker Playback Switch");
3072 break;
3073 }
3074 }
3075
alc285_fixup_hp_beep(struct hda_codec * codec,const struct hda_fixup * fix,int action)3076 static void alc285_fixup_hp_beep(struct hda_codec *codec,
3077 const struct hda_fixup *fix, int action)
3078 {
3079 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
3080 codec->beep_just_power_on = true;
3081 } else if (action == HDA_FIXUP_ACT_INIT) {
3082 #ifdef CONFIG_SND_HDA_INPUT_BEEP
3083 /*
3084 * Just enable loopback to internal speaker and headphone jack.
3085 * Disable amplification to get about the same beep volume as
3086 * was on pure BIOS setup before loading the driver.
3087 */
3088 alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13));
3089
3090 snd_hda_enable_beep_device(codec, 1);
3091
3092 #if !IS_ENABLED(CONFIG_INPUT_PCSPKR)
3093 dev_warn_once(hda_codec_dev(codec),
3094 "enable CONFIG_INPUT_PCSPKR to get PC beeps\n");
3095 #endif
3096 #endif
3097 }
3098 }
3099
3100 /* for hda_fixup_thinkpad_acpi() */
3101 #include "../helpers/thinkpad.c"
3102
alc_fixup_thinkpad_acpi(struct hda_codec * codec,const struct hda_fixup * fix,int action)3103 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
3104 const struct hda_fixup *fix, int action)
3105 {
3106 alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */
3107 hda_fixup_thinkpad_acpi(codec, fix, action);
3108 }
3109
3110 /* for hda_fixup_ideapad_acpi() */
3111 #include "../helpers/ideapad_hotkey_led.c"
3112
alc_fixup_ideapad_acpi(struct hda_codec * codec,const struct hda_fixup * fix,int action)3113 static void alc_fixup_ideapad_acpi(struct hda_codec *codec,
3114 const struct hda_fixup *fix, int action)
3115 {
3116 hda_fixup_ideapad_acpi(codec, fix, action);
3117 }
3118
3119 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
alc287_fixup_legion_15imhg05_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)3120 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
3121 const struct hda_fixup *fix,
3122 int action)
3123 {
3124 struct alc_spec *spec = codec->spec;
3125
3126 switch (action) {
3127 case HDA_FIXUP_ACT_PRE_PROBE:
3128 spec->gen.suppress_auto_mute = 1;
3129 break;
3130 }
3131 }
3132
comp_acpi_device_notify(acpi_handle handle,u32 event,void * data)3133 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data)
3134 {
3135 struct hda_codec *cdc = data;
3136 struct alc_spec *spec = cdc->spec;
3137
3138 codec_info(cdc, "ACPI Notification %d\n", event);
3139
3140 hda_component_acpi_device_notify(&spec->comps, handle, event, data);
3141 }
3142
comp_bind(struct device * dev)3143 static int comp_bind(struct device *dev)
3144 {
3145 struct hda_codec *cdc = dev_to_hda_codec(dev);
3146 struct alc_spec *spec = cdc->spec;
3147 int ret;
3148
3149 ret = hda_component_manager_bind(cdc, &spec->comps);
3150 if (ret)
3151 return ret;
3152
3153 return hda_component_manager_bind_acpi_notifications(cdc,
3154 &spec->comps,
3155 comp_acpi_device_notify, cdc);
3156 }
3157
comp_unbind(struct device * dev)3158 static void comp_unbind(struct device *dev)
3159 {
3160 struct hda_codec *cdc = dev_to_hda_codec(dev);
3161 struct alc_spec *spec = cdc->spec;
3162
3163 hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify);
3164 hda_component_manager_unbind(cdc, &spec->comps);
3165 }
3166
3167 static const struct component_master_ops comp_master_ops = {
3168 .bind = comp_bind,
3169 .unbind = comp_unbind,
3170 };
3171
comp_generic_playback_hook(struct hda_pcm_stream * hinfo,struct hda_codec * cdc,struct snd_pcm_substream * sub,int action)3172 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc,
3173 struct snd_pcm_substream *sub, int action)
3174 {
3175 struct alc_spec *spec = cdc->spec;
3176
3177 hda_component_manager_playback_hook(&spec->comps, action);
3178 }
3179
comp_generic_fixup(struct hda_codec * cdc,int action,const char * bus,const char * hid,const char * match_str,int count)3180 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus,
3181 const char *hid, const char *match_str, int count)
3182 {
3183 struct alc_spec *spec = cdc->spec;
3184 int ret;
3185
3186 switch (action) {
3187 case HDA_FIXUP_ACT_PRE_PROBE:
3188 ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid,
3189 match_str, &comp_master_ops);
3190 if (ret)
3191 return;
3192
3193 spec->gen.pcm_playback_hook = comp_generic_playback_hook;
3194 break;
3195 case HDA_FIXUP_ACT_FREE:
3196 hda_component_manager_free(&spec->comps, &comp_master_ops);
3197 break;
3198 }
3199 }
3200
find_cirrus_companion_amps(struct hda_codec * cdc)3201 static void find_cirrus_companion_amps(struct hda_codec *cdc)
3202 {
3203 struct device *dev = hda_codec_dev(cdc);
3204 struct acpi_device *adev;
3205 const char *bus = NULL;
3206 static const struct {
3207 const char *hid;
3208 const char *name;
3209 } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" },
3210 { "CSC3556", "cs35l56-hda" },
3211 { "CSC3557", "cs35l57-hda" }};
3212 char *match;
3213 int i, count = 0, count_devindex = 0;
3214
3215 for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) {
3216 adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1);
3217 if (adev)
3218 break;
3219 }
3220 if (!adev) {
3221 codec_dbg(cdc, "Did not find ACPI entry for a Cirrus Amp\n");
3222 return;
3223 }
3224
3225 count = i2c_acpi_client_count(adev);
3226 if (count > 0) {
3227 bus = "i2c";
3228 } else {
3229 count = acpi_spi_count_resources(adev);
3230 if (count > 0)
3231 bus = "spi";
3232 }
3233
3234 struct fwnode_handle *fwnode __free(fwnode_handle) =
3235 fwnode_handle_get(acpi_fwnode_handle(adev));
3236 acpi_dev_put(adev);
3237
3238 if (!bus) {
3239 codec_err(cdc, "Did not find any buses for %s\n", acpi_ids[i].hid);
3240 return;
3241 }
3242
3243 if (!fwnode) {
3244 codec_err(cdc, "Could not get fwnode for %s\n", acpi_ids[i].hid);
3245 return;
3246 }
3247
3248 /*
3249 * When available the cirrus,dev-index property is an accurate
3250 * count of the amps in a system and is used in preference to
3251 * the count of bus devices that can contain additional address
3252 * alias entries.
3253 */
3254 count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index");
3255 if (count_devindex > 0)
3256 count = count_devindex;
3257
3258 match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name);
3259 if (!match)
3260 return;
3261 codec_info(cdc, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match);
3262 comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count);
3263 }
3264
cs35l41_fixup_i2c_two(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3265 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3266 {
3267 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
3268 }
3269
cs35l41_fixup_i2c_four(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3270 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3271 {
3272 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
3273 }
3274
cs35l41_fixup_spi_two(struct hda_codec * codec,const struct hda_fixup * fix,int action)3275 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
3276 {
3277 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
3278 }
3279
cs35l41_fixup_spi_one(struct hda_codec * codec,const struct hda_fixup * fix,int action)3280 static void cs35l41_fixup_spi_one(struct hda_codec *codec, const struct hda_fixup *fix, int action)
3281 {
3282 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 1);
3283 }
3284
cs35l41_fixup_spi_four(struct hda_codec * codec,const struct hda_fixup * fix,int action)3285 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
3286 {
3287 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
3288 }
3289
alc287_fixup_legion_16achg6_speakers(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3290 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
3291 int action)
3292 {
3293 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2);
3294 }
3295
alc287_fixup_legion_16ithg6_speakers(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3296 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
3297 int action)
3298 {
3299 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2);
3300 }
3301
alc285_fixup_asus_ga403u(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3302 static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3303 {
3304 /*
3305 * The same SSID has been re-used in different hardware, they have
3306 * different codecs and the newer GA403U has a ALC285.
3307 */
3308 if (cdc->core.vendor_id != 0x10ec0285)
3309 alc_fixup_inv_dmic(cdc, fix, action);
3310 }
3311
tas2781_fixup_tias_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3312 static void tas2781_fixup_tias_i2c(struct hda_codec *cdc,
3313 const struct hda_fixup *fix, int action)
3314 {
3315 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1);
3316 }
3317
tas2781_fixup_spi(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3318 static void tas2781_fixup_spi(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3319 {
3320 comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00-tas2781-hda.%d", 2);
3321 }
3322
tas2781_fixup_txnw_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3323 static void tas2781_fixup_txnw_i2c(struct hda_codec *cdc,
3324 const struct hda_fixup *fix, int action)
3325 {
3326 comp_generic_fixup(cdc, action, "i2c", "TXNW2781", "-%s:00-tas2781-hda.%d", 1);
3327 }
3328
yoga7_14arb7_fixup_i2c(struct hda_codec * cdc,const struct hda_fixup * fix,int action)3329 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
3330 const struct hda_fixup *fix, int action)
3331 {
3332 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1);
3333 }
3334
alc256_fixup_acer_sfg16_micmute_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)3335 static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
3336 const struct hda_fixup *fix, int action)
3337 {
3338 alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
3339 }
3340
3341
3342 /* for alc295_fixup_hp_top_speakers */
3343 #include "../helpers/hp_x360.c"
3344
3345 /* for alc285_fixup_ideapad_s740_coef() */
3346 #include "../helpers/ideapad_s740.c"
3347
3348 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = {
3349 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000),
3350 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000),
3351 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089),
3352 {}
3353 };
3354
alc256_fixup_set_coef_defaults(struct hda_codec * codec,const struct hda_fixup * fix,int action)3355 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
3356 const struct hda_fixup *fix,
3357 int action)
3358 {
3359 /*
3360 * A certain other OS sets these coeffs to different values. On at least
3361 * one TongFang barebone these settings might survive even a cold
3362 * reboot. So to restore a clean slate the values are explicitly reset
3363 * to default here. Without this, the external microphone is always in a
3364 * plugged-in state, while the internal microphone is always in an
3365 * unplugged state, breaking the ability to use the internal microphone.
3366 */
3367 alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs);
3368 }
3369
3370 static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = {
3371 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06),
3372 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074),
3373 WRITE_COEF(0x49, 0x0149),
3374 {}
3375 };
3376
alc233_fixup_no_audio_jack(struct hda_codec * codec,const struct hda_fixup * fix,int action)3377 static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
3378 const struct hda_fixup *fix,
3379 int action)
3380 {
3381 /*
3382 * The audio jack input and output is not detected on the ASRock NUC Box
3383 * 1100 series when cold booting without this fix. Warm rebooting from a
3384 * certain other OS makes the audio functional, as COEF settings are
3385 * preserved in this case. This fix sets these altered COEF values as
3386 * the default.
3387 */
3388 alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
3389 }
3390
alc256_fixup_mic_no_presence_and_resume(struct hda_codec * codec,const struct hda_fixup * fix,int action)3391 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
3392 const struct hda_fixup *fix,
3393 int action)
3394 {
3395 /*
3396 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec,
3397 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec
3398 * needs an additional quirk for sound working after suspend and resume.
3399 */
3400 if (codec->core.vendor_id == 0x10ec0256) {
3401 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
3402 snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120);
3403 } else {
3404 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c);
3405 }
3406 }
3407
alc256_fixup_xiaomi_pro15_resume(struct hda_codec * codec,const struct hda_fixup * fix,int action)3408 static void alc256_fixup_xiaomi_pro15_resume(struct hda_codec *codec,
3409 const struct hda_fixup *fix,
3410 int action)
3411 {
3412 /*
3413 * On the Xiaomi Mi Laptop Pro 15 (TM1905, SSID 1d72:1905) the ALC256
3414 * codec sets coefficient 0x10 bit 9 to 1 after S3 resume, silencing
3415 * the internal speaker. Bluetooth and HDMI audio are unaffected.
3416 * Clear the bit so the speaker keeps working across suspend cycles.
3417 */
3418 alc_update_coef_idx(codec, 0x10, 1<<9, 0);
3419 }
3420
alc256_decrease_headphone_amp_val(struct hda_codec * codec,const struct hda_fixup * fix,int action)3421 static void alc256_decrease_headphone_amp_val(struct hda_codec *codec,
3422 const struct hda_fixup *fix, int action)
3423 {
3424 u32 caps;
3425 u8 nsteps, offs;
3426
3427 if (action != HDA_FIXUP_ACT_PRE_PROBE)
3428 return;
3429
3430 caps = query_amp_caps(codec, 0x3, HDA_OUTPUT);
3431 nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10;
3432 offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10;
3433 caps &= ~AC_AMPCAP_NUM_STEPS & ~AC_AMPCAP_OFFSET;
3434 caps |= (nsteps << AC_AMPCAP_NUM_STEPS_SHIFT) | (offs << AC_AMPCAP_OFFSET_SHIFT);
3435
3436 if (snd_hda_override_amp_caps(codec, 0x3, HDA_OUTPUT, caps))
3437 codec_warn(codec, "failed to override amp caps for NID 0x3\n");
3438 }
3439
alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec * codec,const struct hda_fixup * fix,int action)3440 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
3441 const struct hda_fixup *fix,
3442 int action)
3443 {
3444 struct alc_spec *spec = codec->spec;
3445 struct hda_input_mux *imux = &spec->gen.input_mux;
3446 int i;
3447
3448 alc269_fixup_limit_int_mic_boost(codec, fix, action);
3449
3450 switch (action) {
3451 case HDA_FIXUP_ACT_PRE_PROBE:
3452 /**
3453 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
3454 * to Hi-Z to avoid pop noises at startup and when plugging and
3455 * unplugging headphones.
3456 */
3457 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
3458 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ);
3459 break;
3460 case HDA_FIXUP_ACT_PROBE:
3461 /**
3462 * Make the internal mic (0x12) the default input source to
3463 * prevent pop noises on cold boot.
3464 */
3465 for (i = 0; i < imux->num_items; i++) {
3466 if (spec->gen.imux_pins[i] == 0x12) {
3467 spec->gen.cur_mux[0] = i;
3468 break;
3469 }
3470 }
3471 break;
3472 }
3473 }
3474
alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec * codec,const struct hda_fixup * fix,int action)3475 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
3476 const struct hda_fixup *fix, int action)
3477 {
3478 /*
3479 * The Pin Complex 0x17 for the bass speakers is wrongly reported as
3480 * unconnected.
3481 */
3482 static const struct hda_pintbl pincfgs[] = {
3483 { 0x17, 0x90170121 },
3484 { }
3485 };
3486 /*
3487 * Avoid DAC 0x06 and 0x08, as they have no volume controls.
3488 * DAC 0x02 and 0x03 would be fine.
3489 */
3490 static const hda_nid_t conn[] = { 0x02, 0x03 };
3491 /*
3492 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02.
3493 * Headphones (0x21) are connected to DAC 0x03.
3494 */
3495 static const hda_nid_t preferred_pairs[] = {
3496 0x14, 0x02,
3497 0x17, 0x02,
3498 0x21, 0x03,
3499 0
3500 };
3501 struct alc_spec *spec = codec->spec;
3502
3503 /* Support Audio mute LED and Mic mute LED on keyboard */
3504 hda_fixup_ideapad_acpi(codec, fix, action);
3505
3506 switch (action) {
3507 case HDA_FIXUP_ACT_PRE_PROBE:
3508 snd_hda_apply_pincfgs(codec, pincfgs);
3509 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3510 spec->gen.preferred_dacs = preferred_pairs;
3511 break;
3512 }
3513 }
3514
alc295_fixup_dell_inspiron_top_speakers(struct hda_codec * codec,const struct hda_fixup * fix,int action)3515 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
3516 const struct hda_fixup *fix, int action)
3517 {
3518 static const struct hda_pintbl pincfgs[] = {
3519 { 0x14, 0x90170151 },
3520 { 0x17, 0x90170150 },
3521 { }
3522 };
3523 static const hda_nid_t conn[] = { 0x02, 0x03 };
3524 static const hda_nid_t preferred_pairs[] = {
3525 0x14, 0x02,
3526 0x17, 0x03,
3527 0x21, 0x02,
3528 0
3529 };
3530 struct alc_spec *spec = codec->spec;
3531
3532 alc_fixup_no_shutup(codec, fix, action);
3533
3534 switch (action) {
3535 case HDA_FIXUP_ACT_PRE_PROBE:
3536 snd_hda_apply_pincfgs(codec, pincfgs);
3537 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3538 spec->gen.preferred_dacs = preferred_pairs;
3539 break;
3540 }
3541 }
3542
3543 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */
alc287_fixup_bind_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)3544 static void alc287_fixup_bind_dacs(struct hda_codec *codec,
3545 const struct hda_fixup *fix, int action)
3546 {
3547 struct alc_spec *spec = codec->spec;
3548 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
3549 static const hda_nid_t preferred_pairs[] = {
3550 0x17, 0x02, 0x21, 0x03, 0
3551 };
3552
3553 if (action != HDA_FIXUP_ACT_PRE_PROBE)
3554 return;
3555
3556 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3557 spec->gen.preferred_dacs = preferred_pairs;
3558 spec->gen.auto_mute_via_amp = 1;
3559 if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
3560 snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
3561 0x0); /* Make sure 0x14 was disable */
3562 }
3563 }
3564
3565 /* Fix none verb table of Headset Mic pin */
alc2xx_fixup_headset_mic(struct hda_codec * codec,const struct hda_fixup * fix,int action)3566 static void alc2xx_fixup_headset_mic(struct hda_codec *codec,
3567 const struct hda_fixup *fix, int action)
3568 {
3569 struct alc_spec *spec = codec->spec;
3570 static const struct hda_pintbl pincfgs[] = {
3571 { 0x19, 0x03a1103c },
3572 { }
3573 };
3574
3575 switch (action) {
3576 case HDA_FIXUP_ACT_PRE_PROBE:
3577 snd_hda_apply_pincfgs(codec, pincfgs);
3578 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12);
3579 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
3580 break;
3581 }
3582 }
3583
alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec * codec,const struct hda_fixup * fix,int action)3584 static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec,
3585 const struct hda_fixup *fix, int action)
3586 {
3587 /*
3588 * The Pin Complex 0x14 for the treble speakers is wrongly reported as
3589 * unconnected.
3590 * The Pin Complex 0x17 for the bass speakers has the lowest association
3591 * and sequence values so shift it up a bit to squeeze 0x14 in.
3592 */
3593 static const struct hda_pintbl pincfgs[] = {
3594 { 0x14, 0x90170110 }, // top/treble
3595 { 0x17, 0x90170111 }, // bottom/bass
3596 { }
3597 };
3598
3599 /*
3600 * Force DAC 0x02 for the bass speakers 0x17.
3601 */
3602 static const hda_nid_t conn[] = { 0x02 };
3603
3604 switch (action) {
3605 case HDA_FIXUP_ACT_PRE_PROBE:
3606 snd_hda_apply_pincfgs(codec, pincfgs);
3607 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3608 break;
3609 }
3610
3611 cs35l41_fixup_i2c_two(codec, fix, action);
3612 alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3613 alc245_fixup_hp_gpio_led(codec, fix, action);
3614 }
3615
3616 /* some changes for Spectre x360 16, 2024 model */
alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec * codec,const struct hda_fixup * fix,int action)3617 static void alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec *codec,
3618 const struct hda_fixup *fix, int action)
3619 {
3620 /*
3621 * The Pin Complex 0x14 for the treble speakers is wrongly reported as
3622 * unconnected.
3623 * The Pin Complex 0x17 for the bass speakers has the lowest association
3624 * and sequence values so shift it up a bit to squeeze 0x14 in.
3625 */
3626 struct alc_spec *spec = codec->spec;
3627 static const struct hda_pintbl pincfgs[] = {
3628 { 0x14, 0x90170110 }, // top/treble
3629 { 0x17, 0x90170111 }, // bottom/bass
3630 { }
3631 };
3632
3633 /*
3634 * Force DAC 0x02 for the bass speakers 0x17.
3635 */
3636 static const hda_nid_t conn[] = { 0x02 };
3637
3638 switch (action) {
3639 case HDA_FIXUP_ACT_PRE_PROBE:
3640 /* needed for amp of back speakers */
3641 spec->gpio_mask |= 0x01;
3642 spec->gpio_dir |= 0x01;
3643 snd_hda_apply_pincfgs(codec, pincfgs);
3644 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3645 break;
3646 case HDA_FIXUP_ACT_INIT:
3647 /* need to toggle GPIO to enable the amp of back speakers */
3648 alc_update_gpio_data(codec, 0x01, true);
3649 msleep(100);
3650 alc_update_gpio_data(codec, 0x01, false);
3651 break;
3652 }
3653
3654 cs35l41_fixup_i2c_two(codec, fix, action);
3655 alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3656 alc245_fixup_hp_gpio_led(codec, fix, action);
3657 }
3658
alc245_fixup_hp_zbook_firefly_g12a(struct hda_codec * codec,const struct hda_fixup * fix,int action)3659 static void alc245_fixup_hp_zbook_firefly_g12a(struct hda_codec *codec,
3660 const struct hda_fixup *fix, int action)
3661 {
3662 struct alc_spec *spec = codec->spec;
3663 static const hda_nid_t conn[] = { 0x02 };
3664
3665 switch (action) {
3666 case HDA_FIXUP_ACT_PRE_PROBE:
3667 spec->gen.auto_mute_via_amp = 1;
3668 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3669 break;
3670 }
3671
3672 cs35l41_fixup_i2c_two(codec, fix, action);
3673 alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3674 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
3675 }
3676
3677 /*
3678 * ALC287 PCM hooks
3679 */
alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream * hinfo,struct hda_codec * codec,struct snd_pcm_substream * substream,int action)3680 static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
3681 struct hda_codec *codec,
3682 struct snd_pcm_substream *substream,
3683 int action)
3684 {
3685 switch (action) {
3686 case HDA_GEN_PCM_ACT_OPEN:
3687 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
3688 break;
3689 case HDA_GEN_PCM_ACT_CLOSE:
3690 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
3691 break;
3692 }
3693 }
3694
alc287_s4_power_gpio3_default(struct hda_codec * codec)3695 static void alc287_s4_power_gpio3_default(struct hda_codec *codec)
3696 {
3697 if (is_s4_suspend(codec)) {
3698 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
3699 }
3700 }
3701
alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec * codec,const struct hda_fixup * fix,int action)3702 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
3703 const struct hda_fixup *fix, int action)
3704 {
3705 struct alc_spec *spec = codec->spec;
3706 static const struct coef_fw coefs[] = {
3707 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300),
3708 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
3709 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301),
3710 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
3711 };
3712 static const struct coef_fw dis_coefs[] = {
3713 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3714 WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
3715 }; /* Disable AMP silence detection */
3716
3717 if (action != HDA_FIXUP_ACT_PRE_PROBE)
3718 return;
3719 alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
3720 alc_process_coef_fw(codec, dis_coefs);
3721 alc_process_coef_fw(codec, coefs);
3722 spec->power_hook = alc287_s4_power_gpio3_default;
3723 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
3724 }
3725
alc287_fixup_tb_vmaster_led(struct hda_codec * codec,const struct hda_fixup * fix,int action)3726 static void alc287_fixup_tb_vmaster_led(struct hda_codec *codec,
3727 const struct hda_fixup *fix, int action)
3728 {
3729 struct alc_spec *spec = codec->spec;
3730
3731 if (action == HDA_FIXUP_ACT_PRE_PROBE)
3732 spec->gen.vmaster_mute_led = 1;
3733
3734 alc287_fixup_bind_dacs(codec, fix, action);
3735 }
3736 /* GPIO2: mute led GPIO3: micmute led */
alc245_tas2781_spi_hp_fixup_muteled(struct hda_codec * codec,const struct hda_fixup * fix,int action)3737 static void alc245_tas2781_spi_hp_fixup_muteled(struct hda_codec *codec,
3738 const struct hda_fixup *fix, int action)
3739 {
3740 struct alc_spec *spec = codec->spec;
3741 static const hda_nid_t conn[] = { 0x02 };
3742
3743 switch (action) {
3744 case HDA_FIXUP_ACT_PRE_PROBE:
3745 spec->gen.auto_mute_via_amp = 1;
3746 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3747 break;
3748 }
3749
3750 tas2781_fixup_spi(codec, fix, action);
3751 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x0);
3752 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
3753 }
3754
alc245_hp_spk_mute_led_update(void * private_data,int enabled)3755 static void alc245_hp_spk_mute_led_update(void *private_data, int enabled)
3756 {
3757 struct hda_codec *codec = private_data;
3758 unsigned int val;
3759
3760 val = enabled ? 0x08 : 0x04; /* 0x08 led on, 0x04 led off */
3761 alc_update_coef_idx(codec, 0x0b, 0x0c, val);
3762 }
3763
3764 /* JD2: mute led GPIO3: micmute led */
alc245_tas2781_i2c_hp_fixup_muteled(struct hda_codec * codec,const struct hda_fixup * fix,int action)3765 static void alc245_tas2781_i2c_hp_fixup_muteled(struct hda_codec *codec,
3766 const struct hda_fixup *fix, int action)
3767 {
3768 struct alc_spec *spec = codec->spec;
3769 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3770 static const hda_nid_t conn[] = { 0x02 };
3771
3772 switch (action) {
3773 case HDA_FIXUP_ACT_PRE_PROBE:
3774 if (!hp_pin) {
3775 spec->gen.vmaster_mute.hook = alc245_hp_spk_mute_led_update;
3776 spec->gen.vmaster_mute_led = 1;
3777 }
3778 spec->gen.auto_mute_via_amp = 1;
3779 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3780 break;
3781 case HDA_FIXUP_ACT_INIT:
3782 if (!hp_pin)
3783 alc245_hp_spk_mute_led_update(codec, !spec->gen.master_mute);
3784 break;
3785 }
3786
3787 tas2781_fixup_txnw_i2c(codec, fix, action);
3788 if (hp_pin)
3789 alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
3790 alc285_fixup_hp_coef_micmute_led(codec, fix, action);
3791 }
3792 /*
3793 * Clear COEF 0x0d (PCBEEP passthrough) bit 0x40 where BIOS sets it wrongly
3794 * at PM resume
3795 */
alc283_fixup_dell_hp_resume(struct hda_codec * codec,const struct hda_fixup * fix,int action)3796 static void alc283_fixup_dell_hp_resume(struct hda_codec *codec,
3797 const struct hda_fixup *fix, int action)
3798 {
3799 if (action == HDA_FIXUP_ACT_INIT)
3800 alc_write_coef_idx(codec, 0xd, 0x2800);
3801 }
3802
3803 /* Swap DAC assignments for HP and speaker */
alc288_fixup_surface_swap_dacs(struct hda_codec * codec,const struct hda_fixup * fix,int action)3804 static void alc288_fixup_surface_swap_dacs(struct hda_codec *codec,
3805 const struct hda_fixup *fix, int action)
3806 {
3807 struct alc_spec *spec = codec->spec;
3808 static hda_nid_t preferred_pairs[] = {
3809 0x21, 0x03, 0x14, 0x02, 0
3810 };
3811
3812 if (action != HDA_FIXUP_ACT_PRE_PROBE)
3813 return;
3814
3815 spec->gen.preferred_dacs = preferred_pairs;
3816 }
3817
3818 enum {
3819 ALC269_FIXUP_GPIO2,
3820 ALC269_FIXUP_SONY_VAIO,
3821 ALC275_FIXUP_SONY_VAIO_GPIO2,
3822 ALC269_FIXUP_DELL_M101Z,
3823 ALC269_FIXUP_SKU_IGNORE,
3824 ALC269_FIXUP_ASUS_G73JW,
3825 ALC269_FIXUP_ASUS_N7601ZM_PINS,
3826 ALC269_FIXUP_ASUS_N7601ZM,
3827 ALC269_FIXUP_LENOVO_EAPD,
3828 ALC275_FIXUP_SONY_HWEQ,
3829 ALC275_FIXUP_SONY_DISABLE_AAMIX,
3830 ALC271_FIXUP_DMIC,
3831 ALC269_FIXUP_PCM_44K,
3832 ALC269_FIXUP_STEREO_DMIC,
3833 ALC269_FIXUP_HEADSET_MIC,
3834 ALC269_FIXUP_QUANTA_MUTE,
3835 ALC269_FIXUP_LIFEBOOK,
3836 ALC269_FIXUP_LIFEBOOK_EXTMIC,
3837 ALC269_FIXUP_LIFEBOOK_HP_PIN,
3838 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
3839 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
3840 ALC269_FIXUP_AMIC,
3841 ALC269_FIXUP_DMIC,
3842 ALC269VB_FIXUP_AMIC,
3843 ALC269VB_FIXUP_DMIC,
3844 ALC269_FIXUP_HP_MUTE_LED,
3845 ALC269_FIXUP_HP_MUTE_LED_MIC1,
3846 ALC269_FIXUP_HP_MUTE_LED_MIC2,
3847 ALC269_FIXUP_HP_MUTE_LED_MIC3,
3848 ALC269_FIXUP_HP_GPIO_LED,
3849 ALC269_FIXUP_HP_GPIO_MIC1_LED,
3850 ALC269_FIXUP_HP_LINE1_MIC1_LED,
3851 ALC269_FIXUP_INV_DMIC,
3852 ALC269_FIXUP_LENOVO_DOCK,
3853 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST,
3854 ALC269_FIXUP_NO_SHUTUP,
3855 ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
3856 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
3857 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3858 ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
3859 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
3860 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3861 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
3862 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
3863 ALC269_FIXUP_HEADSET_MODE,
3864 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
3865 ALC269_FIXUP_ASPIRE_HEADSET_MIC,
3866 ALC269_FIXUP_ASUS_X101_FUNC,
3867 ALC269_FIXUP_ASUS_X101_VERB,
3868 ALC269_FIXUP_ASUS_X101,
3869 ALC271_FIXUP_AMIC_MIC2,
3870 ALC271_FIXUP_HP_GATE_MIC_JACK,
3871 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572,
3872 ALC269_FIXUP_ACER_AC700,
3873 ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
3874 ALC269VB_FIXUP_ASUS_ZENBOOK,
3875 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
3876 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
3877 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
3878 ALC269VB_FIXUP_ORDISSIMO_EVE2,
3879 ALC283_FIXUP_CHROME_BOOK,
3880 ALC283_FIXUP_SENSE_COMBO_JACK,
3881 ALC282_FIXUP_ASUS_TX300,
3882 ALC283_FIXUP_INT_MIC,
3883 ALC290_FIXUP_MONO_SPEAKERS,
3884 ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
3885 ALC290_FIXUP_SUBWOOFER,
3886 ALC290_FIXUP_SUBWOOFER_HSJACK,
3887 ALC295_FIXUP_HP_MUTE_LED_COEFBIT11,
3888 ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B,
3889 ALC269_FIXUP_THINKPAD_ACPI,
3890 ALC269_FIXUP_LENOVO_XPAD_ACPI,
3891 ALC269_FIXUP_DMIC_THINKPAD_ACPI,
3892 ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13,
3893 ALC269VC_FIXUP_INFINIX_Y4_MAX,
3894 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
3895 ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
3896 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
3897 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
3898 ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
3899 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
3900 ALC255_FIXUP_HEADSET_MODE,
3901 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
3902 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
3903 ALC292_FIXUP_TPT440_DOCK,
3904 ALC292_FIXUP_TPT440,
3905 ALC283_FIXUP_HEADSET_MIC,
3906 ALC255_FIXUP_MIC_MUTE_LED,
3907 ALC282_FIXUP_ASPIRE_V5_PINS,
3908 ALC269VB_FIXUP_ASPIRE_E1_COEF,
3909 ALC280_FIXUP_HP_GPIO4,
3910 ALC286_FIXUP_HP_GPIO_LED,
3911 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY,
3912 ALC280_FIXUP_HP_DOCK_PINS,
3913 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
3914 ALC280_FIXUP_HP_9480M,
3915 ALC245_FIXUP_HP_X360_AMP,
3916 ALC285_FIXUP_HP_SPECTRE_X360_EB1,
3917 ALC285_FIXUP_HP_SPECTRE_X360_DF1,
3918 ALC285_FIXUP_HP_ENVY_X360,
3919 ALC288_FIXUP_DELL_HEADSET_MODE,
3920 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
3921 ALC288_FIXUP_DELL_XPS_13,
3922 ALC288_FIXUP_DISABLE_AAMIX,
3923 ALC292_FIXUP_DELL_E7X_AAMIX,
3924 ALC292_FIXUP_DELL_E7X,
3925 ALC292_FIXUP_DISABLE_AAMIX,
3926 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
3927 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
3928 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
3929 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
3930 ALC275_FIXUP_DELL_XPS,
3931 ALC293_FIXUP_LENOVO_SPK_NOISE,
3932 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
3933 ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED,
3934 ALC255_FIXUP_DELL_SPK_NOISE,
3935 ALC225_FIXUP_DISABLE_MIC_VREF,
3936 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3937 ALC295_FIXUP_DISABLE_DAC3,
3938 ALC285_FIXUP_SPEAKER2_TO_DAC1,
3939 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1,
3940 ALC285_FIXUP_ASUS_HEADSET_MIC,
3941 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS,
3942 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1,
3943 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC,
3944 ALC280_FIXUP_HP_HEADSET_MIC,
3945 ALC221_FIXUP_HP_FRONT_MIC,
3946 ALC292_FIXUP_TPT460,
3947 ALC298_FIXUP_SPK_VOLUME,
3948 ALC298_FIXUP_LENOVO_SPK_VOLUME,
3949 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
3950 ALC269_FIXUP_ATIV_BOOK_8,
3951 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
3952 ALC221_FIXUP_HP_MIC_NO_PRESENCE,
3953 ALC256_FIXUP_ASUS_HEADSET_MODE,
3954 ALC256_FIXUP_ASUS_MIC,
3955 ALC256_FIXUP_ASUS_AIO_GPIO2,
3956 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
3957 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
3958 ALC233_FIXUP_LENOVO_MULTI_CODECS,
3959 ALC233_FIXUP_ACER_HEADSET_MIC,
3960 ALC294_FIXUP_LENOVO_MIC_LOCATION,
3961 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
3962 ALC225_FIXUP_S3_POP_NOISE,
3963 ALC700_FIXUP_INTEL_REFERENCE,
3964 ALC274_FIXUP_DELL_BIND_DACS,
3965 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
3966 ALC298_FIXUP_TPT470_DOCK_FIX,
3967 ALC298_FIXUP_TPT470_DOCK,
3968 ALC255_FIXUP_DUMMY_LINEOUT_VERB,
3969 ALC255_FIXUP_DELL_HEADSET_MIC,
3970 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS,
3971 ALC298_FIXUP_HUAWEI_MBX_STEREO,
3972 ALC295_FIXUP_HP_X360,
3973 ALC221_FIXUP_HP_HEADSET_MIC,
3974 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
3975 ALC295_FIXUP_HP_AUTO_MUTE,
3976 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
3977 ALC294_FIXUP_ASUS_MIC,
3978 ALC294_FIXUP_ASUS_HEADSET_MIC,
3979 ALC294_FIXUP_ASUS_I2C_HEADSET_MIC,
3980 ALC294_FIXUP_ASUS_SPI_HEADSET_MIC,
3981 ALC294_FIXUP_ASUS_SPK,
3982 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
3983 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
3984 ALC255_FIXUP_ACER_HEADSET_MIC,
3985 ALC295_FIXUP_CHROME_BOOK,
3986 ALC225_FIXUP_HEADSET_JACK,
3987 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
3988 ALC225_FIXUP_WYSE_AUTO_MUTE,
3989 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
3990 ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
3991 ALC256_FIXUP_ASUS_HEADSET_MIC,
3992 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
3993 ALC255_FIXUP_PREDATOR_SUBWOOFER,
3994 ALC299_FIXUP_PREDATOR_SPK,
3995 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
3996 ALC289_FIXUP_DELL_SPK1,
3997 ALC289_FIXUP_DELL_SPK2,
3998 ALC289_FIXUP_DUAL_SPK,
3999 ALC289_FIXUP_RTK_AMP_DUAL_SPK,
4000 ALC294_FIXUP_SPK2_TO_DAC1,
4001 ALC294_FIXUP_ASUS_DUAL_SPK,
4002 ALC285_FIXUP_THINKPAD_X1_GEN7,
4003 ALC285_FIXUP_THINKPAD_HEADSET_JACK,
4004 ALC294_FIXUP_ASUS_ALLY,
4005 ALC294_FIXUP_ASUS_ALLY_PINS,
4006 ALC294_FIXUP_ASUS_ALLY_VERBS,
4007 ALC294_FIXUP_ASUS_ALLY_SPEAKER,
4008 ALC294_FIXUP_ASUS_HPE,
4009 ALC294_FIXUP_ASUS_COEF_1B,
4010 ALC294_FIXUP_ASUS_GX502_HP,
4011 ALC294_FIXUP_ASUS_GX502_PINS,
4012 ALC294_FIXUP_ASUS_GX502_VERBS,
4013 ALC294_FIXUP_ASUS_GU502_HP,
4014 ALC294_FIXUP_ASUS_GU502_PINS,
4015 ALC294_FIXUP_ASUS_GU502_VERBS,
4016 ALC294_FIXUP_ASUS_G513_PINS,
4017 ALC285_FIXUP_ASUS_G533Z_PINS,
4018 ALC285_FIXUP_HP_GPIO_LED,
4019 ALC285_FIXUP_HP_MUTE_LED,
4020 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
4021 ALC245_FIXUP_HP_ENVY_X360_MUTE_LED,
4022 ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
4023 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
4024 ALC236_FIXUP_HP_GPIO_LED,
4025 ALC236_FIXUP_HP_MUTE_LED,
4026 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
4027 ALC236_FIXUP_LENOVO_INV_DMIC,
4028 ALC298_FIXUP_SAMSUNG_AMP,
4029 ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS,
4030 ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS,
4031 ALC298_FIXUP_LG_GRAM_STYLE_14,
4032 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
4033 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
4034 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
4035 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
4036 ALC269VC_FIXUP_ACER_HEADSET_MIC,
4037 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
4038 ALC289_FIXUP_ASUS_GA401,
4039 ALC289_FIXUP_ASUS_GA502,
4040 ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
4041 ALC285_FIXUP_HP_GPIO_AMP_INIT,
4042 ALC269_FIXUP_CZC_B20,
4043 ALC269_FIXUP_CZC_TMI,
4044 ALC269_FIXUP_CZC_L101,
4045 ALC269_FIXUP_LEMOTE_A1802,
4046 ALC269_FIXUP_LEMOTE_A190X,
4047 ALC256_FIXUP_INTEL_NUC8_RUGGED,
4048 ALC233_FIXUP_INTEL_NUC8_DMIC,
4049 ALC233_FIXUP_INTEL_NUC8_BOOST,
4050 ALC256_FIXUP_INTEL_NUC10,
4051 ALC255_FIXUP_XIAOMI_HEADSET_MIC,
4052 ALC274_FIXUP_HP_MIC,
4053 ALC274_FIXUP_HP_HEADSET_MIC,
4054 ALC274_FIXUP_HP_ENVY_GPIO,
4055 ALC274_FIXUP_ASUS_ZEN_AIO_27,
4056 ALC256_FIXUP_ASUS_HPE,
4057 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
4058 ALC287_FIXUP_HP_GPIO_LED,
4059 ALC256_FIXUP_HP_HEADSET_MIC,
4060 ALC245_FIXUP_HP_GPIO_LED,
4061 ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
4062 ALC282_FIXUP_ACER_DISABLE_LINEOUT,
4063 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
4064 ALC256_FIXUP_ACER_HEADSET_MIC,
4065 ALC285_FIXUP_IDEAPAD_S740_COEF,
4066 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
4067 ALC295_FIXUP_ASUS_DACS,
4068 ALC295_FIXUP_HP_OMEN,
4069 ALC285_FIXUP_HP_SPECTRE_X360,
4070 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP,
4071 ALC623_FIXUP_LENOVO_THINKSTATION_P340,
4072 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
4073 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
4074 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
4075 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
4076 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
4077 ALC298_FIXUP_LENOVO_C940_DUET7,
4078 ALC287_FIXUP_LENOVO_YOGA_BOOK_9I,
4079 ALC287_FIXUP_13S_GEN2_SPEAKERS,
4080 ALC256_FIXUP_SET_COEF_DEFAULTS,
4081 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
4082 ALC233_FIXUP_NO_AUDIO_JACK,
4083 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
4084 ALC256_FIXUP_XIAOMI_PRO15_RESUME,
4085 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
4086 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
4087 ALC287_FIXUP_LEGION_16ACHG6,
4088 ALC287_FIXUP_CS35L41_I2C_2,
4089 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
4090 ALC287_FIXUP_CS35L41_I2C_4,
4091 ALC245_FIXUP_CS35L41_SPI_1,
4092 ALC245_FIXUP_CS35L41_SPI_2,
4093 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
4094 ALC245_FIXUP_CS35L41_SPI_4,
4095 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
4096 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
4097 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
4098 ALC287_FIXUP_LEGION_16ITHG6,
4099 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
4100 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
4101 ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN,
4102 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
4103 ALC236_FIXUP_DELL_DUAL_CODECS,
4104 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
4105 ALC287_FIXUP_TAS2781_I2C,
4106 ALC295_FIXUP_DELL_TAS2781_I2C,
4107 ALC245_FIXUP_TAS2781_SPI_2,
4108 ALC287_FIXUP_TXNW2781_I2C,
4109 ALC287_FIXUP_TXNW2781_I2C_ASUS,
4110 ALC287_FIXUP_YOGA7_14ARB7_I2C,
4111 ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
4112 ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
4113 ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT,
4114 ALC245_FIXUP_HP_X360_MUTE_LEDS,
4115 ALC287_FIXUP_THINKPAD_I2S_SPK,
4116 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
4117 ALC2XX_FIXUP_HEADSET_MIC,
4118 ALC289_FIXUP_DELL_CS35L41_SPI_2,
4119 ALC294_FIXUP_CS35L41_I2C_2,
4120 ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
4121 ALC256_FIXUP_HEADPHONE_AMP_VOL,
4122 ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX,
4123 ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX,
4124 ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A,
4125 ALC285_FIXUP_ASUS_GA403U,
4126 ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC,
4127 ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1,
4128 ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
4129 ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1,
4130 ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
4131 ALC256_FIXUP_CHROME_BOOK,
4132 ALC245_FIXUP_CLEVO_NOISY_MIC,
4133 ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE,
4134 ALC233_FIXUP_MEDION_MTL_SPK,
4135 ALC233_FIXUP_STARLABS_STARFIGHTER,
4136 ALC294_FIXUP_BASS_SPEAKER_15,
4137 ALC283_FIXUP_DELL_HP_RESUME,
4138 ALC294_FIXUP_ASUS_CS35L41_SPI_2,
4139 ALC274_FIXUP_HP_AIO_BIND_DACS,
4140 ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2,
4141 ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC,
4142 ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1,
4143 ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC,
4144 ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK,
4145 ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE,
4146 ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
4147 ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
4148 ALC288_FIXUP_SURFACE_SWAP_DACS,
4149 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO,
4150 ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY,
4151 ALC245_FIXUP_BASS_HP_DAC,
4152 ALC245_FIXUP_ACER_MICMUTE_LED,
4153 ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
4154 ALC236_FIXUP_HP_DMIC,
4155 ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
4156 ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX,
4157 };
4158
4159 /* A special fixup for Lenovo C940 and Yoga Duet 7;
4160 * both have the very same PCI SSID, and we need to apply different fixups
4161 * depending on the codec ID
4162 */
alc298_fixup_lenovo_c940_duet7(struct hda_codec * codec,const struct hda_fixup * fix,int action)4163 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
4164 const struct hda_fixup *fix,
4165 int action)
4166 {
4167 int id;
4168
4169 if (codec->core.vendor_id == 0x10ec0298)
4170 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
4171 else
4172 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
4173 __snd_hda_apply_fixup(codec, id, action, 0);
4174 }
4175
4176 /* A special fixup for Lenovo Yoga 9i and Yoga Book 9i 13IRU8
4177 * both have the very same PCI SSID and vendor ID, so we need
4178 * to apply different fixups depending on the subsystem ID
4179 */
alc287_fixup_lenovo_yoga_book_9i(struct hda_codec * codec,const struct hda_fixup * fix,int action)4180 static void alc287_fixup_lenovo_yoga_book_9i(struct hda_codec *codec,
4181 const struct hda_fixup *fix,
4182 int action)
4183 {
4184 int id;
4185
4186 if (codec->core.subsystem_id == 0x17aa3881)
4187 id = ALC287_FIXUP_TAS2781_I2C; /* Yoga Book 9i 13IRU8 */
4188 else
4189 id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP; /* Yoga 9i */
4190 __snd_hda_apply_fixup(codec, id, action, 0);
4191 }
4192
4193 static const struct hda_fixup alc269_fixups[] = {
4194 [ALC269_FIXUP_GPIO2] = {
4195 .type = HDA_FIXUP_FUNC,
4196 .v.func = alc_fixup_gpio2,
4197 },
4198 [ALC269_FIXUP_SONY_VAIO] = {
4199 .type = HDA_FIXUP_PINCTLS,
4200 .v.pins = (const struct hda_pintbl[]) {
4201 {0x19, PIN_VREFGRD},
4202 {}
4203 }
4204 },
4205 [ALC275_FIXUP_SONY_VAIO_GPIO2] = {
4206 .type = HDA_FIXUP_FUNC,
4207 .v.func = alc275_fixup_gpio4_off,
4208 .chained = true,
4209 .chain_id = ALC269_FIXUP_SONY_VAIO
4210 },
4211 [ALC269_FIXUP_DELL_M101Z] = {
4212 .type = HDA_FIXUP_VERBS,
4213 .v.verbs = (const struct hda_verb[]) {
4214 /* Enables internal speaker */
4215 {0x20, AC_VERB_SET_COEF_INDEX, 13},
4216 {0x20, AC_VERB_SET_PROC_COEF, 0x4040},
4217 {}
4218 }
4219 },
4220 [ALC269_FIXUP_SKU_IGNORE] = {
4221 .type = HDA_FIXUP_FUNC,
4222 .v.func = alc_fixup_sku_ignore,
4223 },
4224 [ALC269_FIXUP_ASUS_G73JW] = {
4225 .type = HDA_FIXUP_PINS,
4226 .v.pins = (const struct hda_pintbl[]) {
4227 { 0x17, 0x99130111 }, /* subwoofer */
4228 { }
4229 }
4230 },
4231 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = {
4232 .type = HDA_FIXUP_PINS,
4233 .v.pins = (const struct hda_pintbl[]) {
4234 { 0x19, 0x03A11050 },
4235 { 0x1a, 0x03A11C30 },
4236 { 0x21, 0x03211420 },
4237 { }
4238 }
4239 },
4240 [ALC269_FIXUP_ASUS_N7601ZM] = {
4241 .type = HDA_FIXUP_VERBS,
4242 .v.verbs = (const struct hda_verb[]) {
4243 {0x20, AC_VERB_SET_COEF_INDEX, 0x62},
4244 {0x20, AC_VERB_SET_PROC_COEF, 0xa007},
4245 {0x20, AC_VERB_SET_COEF_INDEX, 0x10},
4246 {0x20, AC_VERB_SET_PROC_COEF, 0x8420},
4247 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f},
4248 {0x20, AC_VERB_SET_PROC_COEF, 0x7774},
4249 { }
4250 },
4251 .chained = true,
4252 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS,
4253 },
4254 [ALC269_FIXUP_LENOVO_EAPD] = {
4255 .type = HDA_FIXUP_VERBS,
4256 .v.verbs = (const struct hda_verb[]) {
4257 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0},
4258 {}
4259 }
4260 },
4261 [ALC275_FIXUP_SONY_HWEQ] = {
4262 .type = HDA_FIXUP_FUNC,
4263 .v.func = alc269_fixup_hweq,
4264 .chained = true,
4265 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
4266 },
4267 [ALC275_FIXUP_SONY_DISABLE_AAMIX] = {
4268 .type = HDA_FIXUP_FUNC,
4269 .v.func = alc_fixup_disable_aamix,
4270 .chained = true,
4271 .chain_id = ALC269_FIXUP_SONY_VAIO
4272 },
4273 [ALC271_FIXUP_DMIC] = {
4274 .type = HDA_FIXUP_FUNC,
4275 .v.func = alc271_fixup_dmic,
4276 },
4277 [ALC269_FIXUP_PCM_44K] = {
4278 .type = HDA_FIXUP_FUNC,
4279 .v.func = alc269_fixup_pcm_44k,
4280 .chained = true,
4281 .chain_id = ALC269_FIXUP_QUANTA_MUTE
4282 },
4283 [ALC269_FIXUP_STEREO_DMIC] = {
4284 .type = HDA_FIXUP_FUNC,
4285 .v.func = alc269_fixup_stereo_dmic,
4286 },
4287 [ALC269_FIXUP_HEADSET_MIC] = {
4288 .type = HDA_FIXUP_FUNC,
4289 .v.func = alc_fixup_headset_mic,
4290 },
4291 [ALC269_FIXUP_QUANTA_MUTE] = {
4292 .type = HDA_FIXUP_FUNC,
4293 .v.func = alc269_fixup_quanta_mute,
4294 },
4295 [ALC269_FIXUP_LIFEBOOK] = {
4296 .type = HDA_FIXUP_PINS,
4297 .v.pins = (const struct hda_pintbl[]) {
4298 { 0x1a, 0x2101103f }, /* dock line-out */
4299 { 0x1b, 0x23a11040 }, /* dock mic-in */
4300 { }
4301 },
4302 .chained = true,
4303 .chain_id = ALC269_FIXUP_QUANTA_MUTE
4304 },
4305 [ALC269_FIXUP_LIFEBOOK_EXTMIC] = {
4306 .type = HDA_FIXUP_PINS,
4307 .v.pins = (const struct hda_pintbl[]) {
4308 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
4309 { }
4310 },
4311 },
4312 [ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
4313 .type = HDA_FIXUP_PINS,
4314 .v.pins = (const struct hda_pintbl[]) {
4315 { 0x21, 0x0221102f }, /* HP out */
4316 { }
4317 },
4318 },
4319 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
4320 .type = HDA_FIXUP_FUNC,
4321 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4322 },
4323 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
4324 .type = HDA_FIXUP_FUNC,
4325 .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
4326 },
4327 [ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = {
4328 .type = HDA_FIXUP_PINS,
4329 .v.pins = (const struct hda_pintbl[]) {
4330 { 0x14, 0x90170151 }, /* use as internal speaker (LFE) */
4331 { 0x1b, 0x90170152 }, /* use as internal speaker (back) */
4332 { }
4333 },
4334 .chained = true,
4335 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4336 },
4337 [ALC269VC_FIXUP_INFINIX_Y4_MAX] = {
4338 .type = HDA_FIXUP_PINS,
4339 .v.pins = (const struct hda_pintbl[]) {
4340 { 0x1b, 0x90170150 }, /* use as internal speaker */
4341 { }
4342 },
4343 .chained = true,
4344 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4345 },
4346 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
4347 .type = HDA_FIXUP_PINS,
4348 .v.pins = (const struct hda_pintbl[]) {
4349 { 0x18, 0x03a19020 }, /* headset mic */
4350 { 0x1b, 0x90170150 }, /* speaker */
4351 { }
4352 },
4353 },
4354 [ALC269_FIXUP_AMIC] = {
4355 .type = HDA_FIXUP_PINS,
4356 .v.pins = (const struct hda_pintbl[]) {
4357 { 0x14, 0x99130110 }, /* speaker */
4358 { 0x15, 0x0121401f }, /* HP out */
4359 { 0x18, 0x01a19c20 }, /* mic */
4360 { 0x19, 0x99a3092f }, /* int-mic */
4361 { }
4362 },
4363 },
4364 [ALC269_FIXUP_DMIC] = {
4365 .type = HDA_FIXUP_PINS,
4366 .v.pins = (const struct hda_pintbl[]) {
4367 { 0x12, 0x99a3092f }, /* int-mic */
4368 { 0x14, 0x99130110 }, /* speaker */
4369 { 0x15, 0x0121401f }, /* HP out */
4370 { 0x18, 0x01a19c20 }, /* mic */
4371 { }
4372 },
4373 },
4374 [ALC269VB_FIXUP_AMIC] = {
4375 .type = HDA_FIXUP_PINS,
4376 .v.pins = (const struct hda_pintbl[]) {
4377 { 0x14, 0x99130110 }, /* speaker */
4378 { 0x18, 0x01a19c20 }, /* mic */
4379 { 0x19, 0x99a3092f }, /* int-mic */
4380 { 0x21, 0x0121401f }, /* HP out */
4381 { }
4382 },
4383 },
4384 [ALC269VB_FIXUP_DMIC] = {
4385 .type = HDA_FIXUP_PINS,
4386 .v.pins = (const struct hda_pintbl[]) {
4387 { 0x12, 0x99a3092f }, /* int-mic */
4388 { 0x14, 0x99130110 }, /* speaker */
4389 { 0x18, 0x01a19c20 }, /* mic */
4390 { 0x21, 0x0121401f }, /* HP out */
4391 { }
4392 },
4393 },
4394 [ALC269_FIXUP_HP_MUTE_LED] = {
4395 .type = HDA_FIXUP_FUNC,
4396 .v.func = alc269_fixup_hp_mute_led,
4397 },
4398 [ALC269_FIXUP_HP_MUTE_LED_MIC1] = {
4399 .type = HDA_FIXUP_FUNC,
4400 .v.func = alc269_fixup_hp_mute_led_mic1,
4401 },
4402 [ALC269_FIXUP_HP_MUTE_LED_MIC2] = {
4403 .type = HDA_FIXUP_FUNC,
4404 .v.func = alc269_fixup_hp_mute_led_mic2,
4405 },
4406 [ALC269_FIXUP_HP_MUTE_LED_MIC3] = {
4407 .type = HDA_FIXUP_FUNC,
4408 .v.func = alc269_fixup_hp_mute_led_mic3,
4409 .chained = true,
4410 .chain_id = ALC295_FIXUP_HP_AUTO_MUTE
4411 },
4412 [ALC269_FIXUP_HP_GPIO_LED] = {
4413 .type = HDA_FIXUP_FUNC,
4414 .v.func = alc269_fixup_hp_gpio_led,
4415 },
4416 [ALC269_FIXUP_HP_GPIO_MIC1_LED] = {
4417 .type = HDA_FIXUP_FUNC,
4418 .v.func = alc269_fixup_hp_gpio_mic1_led,
4419 },
4420 [ALC269_FIXUP_HP_LINE1_MIC1_LED] = {
4421 .type = HDA_FIXUP_FUNC,
4422 .v.func = alc269_fixup_hp_line1_mic1_led,
4423 },
4424 [ALC269_FIXUP_INV_DMIC] = {
4425 .type = HDA_FIXUP_FUNC,
4426 .v.func = alc_fixup_inv_dmic,
4427 },
4428 [ALC269_FIXUP_NO_SHUTUP] = {
4429 .type = HDA_FIXUP_FUNC,
4430 .v.func = alc_fixup_no_shutup,
4431 },
4432 [ALC269_FIXUP_LENOVO_DOCK] = {
4433 .type = HDA_FIXUP_PINS,
4434 .v.pins = (const struct hda_pintbl[]) {
4435 { 0x19, 0x23a11040 }, /* dock mic */
4436 { 0x1b, 0x2121103f }, /* dock headphone */
4437 { }
4438 },
4439 .chained = true,
4440 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
4441 },
4442 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = {
4443 .type = HDA_FIXUP_FUNC,
4444 .v.func = alc269_fixup_limit_int_mic_boost,
4445 .chained = true,
4446 .chain_id = ALC269_FIXUP_LENOVO_DOCK,
4447 },
4448 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
4449 .type = HDA_FIXUP_FUNC,
4450 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4451 .chained = true,
4452 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4453 },
4454 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4455 .type = HDA_FIXUP_PINS,
4456 .v.pins = (const struct hda_pintbl[]) {
4457 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4458 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4459 { }
4460 },
4461 .chained = true,
4462 .chain_id = ALC269_FIXUP_HEADSET_MODE
4463 },
4464 [ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
4465 .type = HDA_FIXUP_FUNC,
4466 .v.func = alc269_fixup_limit_int_mic_boost,
4467 .chained = true,
4468 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
4469 },
4470 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
4471 .type = HDA_FIXUP_PINS,
4472 .v.pins = (const struct hda_pintbl[]) {
4473 { 0x16, 0x21014020 }, /* dock line out */
4474 { 0x19, 0x21a19030 }, /* dock mic */
4475 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4476 { }
4477 },
4478 .chained = true,
4479 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4480 },
4481 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
4482 .type = HDA_FIXUP_PINS,
4483 .v.pins = (const struct hda_pintbl[]) {
4484 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4485 { }
4486 },
4487 .chained = true,
4488 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
4489 },
4490 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = {
4491 .type = HDA_FIXUP_PINS,
4492 .v.pins = (const struct hda_pintbl[]) {
4493 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4494 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4495 { }
4496 },
4497 .chained = true,
4498 .chain_id = ALC269_FIXUP_HEADSET_MODE
4499 },
4500 [ALC269_FIXUP_HEADSET_MODE] = {
4501 .type = HDA_FIXUP_FUNC,
4502 .v.func = alc_fixup_headset_mode,
4503 .chained = true,
4504 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4505 },
4506 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4507 .type = HDA_FIXUP_FUNC,
4508 .v.func = alc_fixup_headset_mode_no_hp_mic,
4509 },
4510 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
4511 .type = HDA_FIXUP_PINS,
4512 .v.pins = (const struct hda_pintbl[]) {
4513 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
4514 { }
4515 },
4516 .chained = true,
4517 .chain_id = ALC269_FIXUP_HEADSET_MODE,
4518 },
4519 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
4520 .type = HDA_FIXUP_PINS,
4521 .v.pins = (const struct hda_pintbl[]) {
4522 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4523 { }
4524 },
4525 .chained = true,
4526 .chain_id = ALC269_FIXUP_HEADSET_MIC
4527 },
4528 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = {
4529 .type = HDA_FIXUP_PINS,
4530 .v.pins = (const struct hda_pintbl[]) {
4531 {0x12, 0x90a60130},
4532 {0x13, 0x40000000},
4533 {0x14, 0x90170110},
4534 {0x18, 0x411111f0},
4535 {0x19, 0x04a11040},
4536 {0x1a, 0x411111f0},
4537 {0x1b, 0x90170112},
4538 {0x1d, 0x40759a05},
4539 {0x1e, 0x411111f0},
4540 {0x21, 0x04211020},
4541 { }
4542 },
4543 .chained = true,
4544 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4545 },
4546 [ALC298_FIXUP_HUAWEI_MBX_STEREO] = {
4547 .type = HDA_FIXUP_FUNC,
4548 .v.func = alc298_fixup_huawei_mbx_stereo,
4549 .chained = true,
4550 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4551 },
4552 [ALC269_FIXUP_ASUS_X101_FUNC] = {
4553 .type = HDA_FIXUP_FUNC,
4554 .v.func = alc269_fixup_x101_headset_mic,
4555 },
4556 [ALC269_FIXUP_ASUS_X101_VERB] = {
4557 .type = HDA_FIXUP_VERBS,
4558 .v.verbs = (const struct hda_verb[]) {
4559 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
4560 {0x20, AC_VERB_SET_COEF_INDEX, 0x08},
4561 {0x20, AC_VERB_SET_PROC_COEF, 0x0310},
4562 { }
4563 },
4564 .chained = true,
4565 .chain_id = ALC269_FIXUP_ASUS_X101_FUNC
4566 },
4567 [ALC269_FIXUP_ASUS_X101] = {
4568 .type = HDA_FIXUP_PINS,
4569 .v.pins = (const struct hda_pintbl[]) {
4570 { 0x18, 0x04a1182c }, /* Headset mic */
4571 { }
4572 },
4573 .chained = true,
4574 .chain_id = ALC269_FIXUP_ASUS_X101_VERB
4575 },
4576 [ALC271_FIXUP_AMIC_MIC2] = {
4577 .type = HDA_FIXUP_PINS,
4578 .v.pins = (const struct hda_pintbl[]) {
4579 { 0x14, 0x99130110 }, /* speaker */
4580 { 0x19, 0x01a19c20 }, /* mic */
4581 { 0x1b, 0x99a7012f }, /* int-mic */
4582 { 0x21, 0x0121401f }, /* HP out */
4583 { }
4584 },
4585 },
4586 [ALC271_FIXUP_HP_GATE_MIC_JACK] = {
4587 .type = HDA_FIXUP_FUNC,
4588 .v.func = alc271_hp_gate_mic_jack,
4589 .chained = true,
4590 .chain_id = ALC271_FIXUP_AMIC_MIC2,
4591 },
4592 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = {
4593 .type = HDA_FIXUP_FUNC,
4594 .v.func = alc269_fixup_limit_int_mic_boost,
4595 .chained = true,
4596 .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK,
4597 },
4598 [ALC269_FIXUP_ACER_AC700] = {
4599 .type = HDA_FIXUP_PINS,
4600 .v.pins = (const struct hda_pintbl[]) {
4601 { 0x12, 0x99a3092f }, /* int-mic */
4602 { 0x14, 0x99130110 }, /* speaker */
4603 { 0x18, 0x03a11c20 }, /* mic */
4604 { 0x1e, 0x0346101e }, /* SPDIF1 */
4605 { 0x21, 0x0321101f }, /* HP out */
4606 { }
4607 },
4608 .chained = true,
4609 .chain_id = ALC271_FIXUP_DMIC,
4610 },
4611 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = {
4612 .type = HDA_FIXUP_FUNC,
4613 .v.func = alc269_fixup_limit_int_mic_boost,
4614 .chained = true,
4615 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4616 },
4617 [ALC269VB_FIXUP_ASUS_ZENBOOK] = {
4618 .type = HDA_FIXUP_FUNC,
4619 .v.func = alc269_fixup_limit_int_mic_boost,
4620 .chained = true,
4621 .chain_id = ALC269VB_FIXUP_DMIC,
4622 },
4623 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = {
4624 .type = HDA_FIXUP_VERBS,
4625 .v.verbs = (const struct hda_verb[]) {
4626 /* class-D output amp +5dB */
4627 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 },
4628 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 },
4629 {}
4630 },
4631 .chained = true,
4632 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
4633 },
4634 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4635 .type = HDA_FIXUP_PINS,
4636 .v.pins = (const struct hda_pintbl[]) {
4637 { 0x18, 0x01a110f0 }, /* use as headset mic */
4638 { }
4639 },
4640 .chained = true,
4641 .chain_id = ALC269_FIXUP_HEADSET_MIC
4642 },
4643 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
4644 .type = HDA_FIXUP_FUNC,
4645 .v.func = alc269_fixup_limit_int_mic_boost,
4646 .chained = true,
4647 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1,
4648 },
4649 [ALC269VB_FIXUP_ORDISSIMO_EVE2] = {
4650 .type = HDA_FIXUP_PINS,
4651 .v.pins = (const struct hda_pintbl[]) {
4652 { 0x12, 0x99a3092f }, /* int-mic */
4653 { 0x18, 0x03a11d20 }, /* mic */
4654 { 0x19, 0x411111f0 }, /* Unused bogus pin */
4655 { }
4656 },
4657 },
4658 [ALC283_FIXUP_CHROME_BOOK] = {
4659 .type = HDA_FIXUP_FUNC,
4660 .v.func = alc283_fixup_chromebook,
4661 },
4662 [ALC283_FIXUP_SENSE_COMBO_JACK] = {
4663 .type = HDA_FIXUP_FUNC,
4664 .v.func = alc283_fixup_sense_combo_jack,
4665 .chained = true,
4666 .chain_id = ALC283_FIXUP_CHROME_BOOK,
4667 },
4668 [ALC282_FIXUP_ASUS_TX300] = {
4669 .type = HDA_FIXUP_FUNC,
4670 .v.func = alc282_fixup_asus_tx300,
4671 },
4672 [ALC283_FIXUP_INT_MIC] = {
4673 .type = HDA_FIXUP_VERBS,
4674 .v.verbs = (const struct hda_verb[]) {
4675 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a},
4676 {0x20, AC_VERB_SET_PROC_COEF, 0x0011},
4677 { }
4678 },
4679 .chained = true,
4680 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4681 },
4682 [ALC290_FIXUP_SUBWOOFER_HSJACK] = {
4683 .type = HDA_FIXUP_PINS,
4684 .v.pins = (const struct hda_pintbl[]) {
4685 { 0x17, 0x90170112 }, /* subwoofer */
4686 { }
4687 },
4688 .chained = true,
4689 .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
4690 },
4691 [ALC290_FIXUP_SUBWOOFER] = {
4692 .type = HDA_FIXUP_PINS,
4693 .v.pins = (const struct hda_pintbl[]) {
4694 { 0x17, 0x90170112 }, /* subwoofer */
4695 { }
4696 },
4697 .chained = true,
4698 .chain_id = ALC290_FIXUP_MONO_SPEAKERS,
4699 },
4700 [ALC290_FIXUP_MONO_SPEAKERS] = {
4701 .type = HDA_FIXUP_FUNC,
4702 .v.func = alc290_fixup_mono_speakers,
4703 },
4704 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = {
4705 .type = HDA_FIXUP_FUNC,
4706 .v.func = alc290_fixup_mono_speakers,
4707 .chained = true,
4708 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
4709 },
4710 [ALC269_FIXUP_THINKPAD_ACPI] = {
4711 .type = HDA_FIXUP_FUNC,
4712 .v.func = alc_fixup_thinkpad_acpi,
4713 .chained = true,
4714 .chain_id = ALC269_FIXUP_SKU_IGNORE,
4715 },
4716 [ALC269_FIXUP_LENOVO_XPAD_ACPI] = {
4717 .type = HDA_FIXUP_FUNC,
4718 .v.func = alc_fixup_ideapad_acpi,
4719 .chained = true,
4720 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4721 },
4722 [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = {
4723 .type = HDA_FIXUP_FUNC,
4724 .v.func = alc_fixup_inv_dmic,
4725 .chained = true,
4726 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4727 },
4728 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = {
4729 .type = HDA_FIXUP_PINS,
4730 .v.pins = (const struct hda_pintbl[]) {
4731 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4732 { }
4733 },
4734 .chained = true,
4735 .chain_id = ALC255_FIXUP_HEADSET_MODE
4736 },
4737 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = {
4738 .type = HDA_FIXUP_PINS,
4739 .v.pins = (const struct hda_pintbl[]) {
4740 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4741 { }
4742 },
4743 .chained = true,
4744 .chain_id = ALC255_FIXUP_HEADSET_MODE
4745 },
4746 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4747 .type = HDA_FIXUP_PINS,
4748 .v.pins = (const struct hda_pintbl[]) {
4749 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4750 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4751 { }
4752 },
4753 .chained = true,
4754 .chain_id = ALC255_FIXUP_HEADSET_MODE
4755 },
4756 [ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
4757 .type = HDA_FIXUP_FUNC,
4758 .v.func = alc269_fixup_limit_int_mic_boost,
4759 .chained = true,
4760 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4761 },
4762 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
4763 .type = HDA_FIXUP_PINS,
4764 .v.pins = (const struct hda_pintbl[]) {
4765 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4766 { }
4767 },
4768 .chained = true,
4769 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
4770 },
4771 [ALC255_FIXUP_HEADSET_MODE] = {
4772 .type = HDA_FIXUP_FUNC,
4773 .v.func = alc_fixup_headset_mode_alc255,
4774 .chained = true,
4775 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4776 },
4777 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4778 .type = HDA_FIXUP_FUNC,
4779 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic,
4780 },
4781 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4782 .type = HDA_FIXUP_PINS,
4783 .v.pins = (const struct hda_pintbl[]) {
4784 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4785 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4786 { }
4787 },
4788 .chained = true,
4789 .chain_id = ALC269_FIXUP_HEADSET_MODE
4790 },
4791 [ALC292_FIXUP_TPT440_DOCK] = {
4792 .type = HDA_FIXUP_FUNC,
4793 .v.func = alc_fixup_tpt440_dock,
4794 .chained = true,
4795 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4796 },
4797 [ALC292_FIXUP_TPT440] = {
4798 .type = HDA_FIXUP_FUNC,
4799 .v.func = alc_fixup_disable_aamix,
4800 .chained = true,
4801 .chain_id = ALC292_FIXUP_TPT440_DOCK,
4802 },
4803 [ALC283_FIXUP_HEADSET_MIC] = {
4804 .type = HDA_FIXUP_PINS,
4805 .v.pins = (const struct hda_pintbl[]) {
4806 { 0x19, 0x04a110f0 },
4807 { },
4808 },
4809 },
4810 [ALC255_FIXUP_MIC_MUTE_LED] = {
4811 .type = HDA_FIXUP_FUNC,
4812 .v.func = alc_fixup_micmute_led,
4813 },
4814 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
4815 .type = HDA_FIXUP_PINS,
4816 .v.pins = (const struct hda_pintbl[]) {
4817 { 0x12, 0x90a60130 },
4818 { 0x14, 0x90170110 },
4819 { 0x17, 0x40000008 },
4820 { 0x18, 0x411111f0 },
4821 { 0x19, 0x01a1913c },
4822 { 0x1a, 0x411111f0 },
4823 { 0x1b, 0x411111f0 },
4824 { 0x1d, 0x40f89b2d },
4825 { 0x1e, 0x411111f0 },
4826 { 0x21, 0x0321101f },
4827 { },
4828 },
4829 },
4830 [ALC269VB_FIXUP_ASPIRE_E1_COEF] = {
4831 .type = HDA_FIXUP_FUNC,
4832 .v.func = alc269vb_fixup_aspire_e1_coef,
4833 },
4834 [ALC280_FIXUP_HP_GPIO4] = {
4835 .type = HDA_FIXUP_FUNC,
4836 .v.func = alc280_fixup_hp_gpio4,
4837 },
4838 [ALC286_FIXUP_HP_GPIO_LED] = {
4839 .type = HDA_FIXUP_FUNC,
4840 .v.func = alc286_fixup_hp_gpio_led,
4841 },
4842 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = {
4843 .type = HDA_FIXUP_FUNC,
4844 .v.func = alc280_fixup_hp_gpio2_mic_hotkey,
4845 },
4846 [ALC280_FIXUP_HP_DOCK_PINS] = {
4847 .type = HDA_FIXUP_PINS,
4848 .v.pins = (const struct hda_pintbl[]) {
4849 { 0x1b, 0x21011020 }, /* line-out */
4850 { 0x1a, 0x01a1903c }, /* headset mic */
4851 { 0x18, 0x2181103f }, /* line-in */
4852 { },
4853 },
4854 .chained = true,
4855 .chain_id = ALC280_FIXUP_HP_GPIO4
4856 },
4857 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = {
4858 .type = HDA_FIXUP_PINS,
4859 .v.pins = (const struct hda_pintbl[]) {
4860 { 0x1b, 0x21011020 }, /* line-out */
4861 { 0x18, 0x2181103f }, /* line-in */
4862 { },
4863 },
4864 .chained = true,
4865 .chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED
4866 },
4867 [ALC280_FIXUP_HP_9480M] = {
4868 .type = HDA_FIXUP_FUNC,
4869 .v.func = alc280_fixup_hp_9480m,
4870 },
4871 [ALC245_FIXUP_HP_X360_AMP] = {
4872 .type = HDA_FIXUP_FUNC,
4873 .v.func = alc245_fixup_hp_x360_amp,
4874 .chained = true,
4875 .chain_id = ALC245_FIXUP_HP_GPIO_LED
4876 },
4877 [ALC288_FIXUP_DELL_HEADSET_MODE] = {
4878 .type = HDA_FIXUP_FUNC,
4879 .v.func = alc_fixup_headset_mode_dell_alc288,
4880 .chained = true,
4881 .chain_id = ALC255_FIXUP_MIC_MUTE_LED
4882 },
4883 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4884 .type = HDA_FIXUP_PINS,
4885 .v.pins = (const struct hda_pintbl[]) {
4886 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4887 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4888 { }
4889 },
4890 .chained = true,
4891 .chain_id = ALC288_FIXUP_DELL_HEADSET_MODE
4892 },
4893 [ALC288_FIXUP_DISABLE_AAMIX] = {
4894 .type = HDA_FIXUP_FUNC,
4895 .v.func = alc_fixup_disable_aamix,
4896 .chained = true,
4897 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
4898 },
4899 [ALC288_FIXUP_DELL_XPS_13] = {
4900 .type = HDA_FIXUP_FUNC,
4901 .v.func = alc_fixup_dell_xps13,
4902 .chained = true,
4903 .chain_id = ALC288_FIXUP_DISABLE_AAMIX
4904 },
4905 [ALC292_FIXUP_DISABLE_AAMIX] = {
4906 .type = HDA_FIXUP_FUNC,
4907 .v.func = alc_fixup_disable_aamix,
4908 .chained = true,
4909 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
4910 },
4911 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = {
4912 .type = HDA_FIXUP_FUNC,
4913 .v.func = alc_fixup_disable_aamix,
4914 .chained = true,
4915 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
4916 },
4917 [ALC292_FIXUP_DELL_E7X_AAMIX] = {
4918 .type = HDA_FIXUP_FUNC,
4919 .v.func = alc_fixup_dell_xps13,
4920 .chained = true,
4921 .chain_id = ALC292_FIXUP_DISABLE_AAMIX
4922 },
4923 [ALC292_FIXUP_DELL_E7X] = {
4924 .type = HDA_FIXUP_FUNC,
4925 .v.func = alc_fixup_micmute_led,
4926 /* micmute fixup must be applied at last */
4927 .chained_before = true,
4928 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
4929 },
4930 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
4931 .type = HDA_FIXUP_PINS,
4932 .v.pins = (const struct hda_pintbl[]) {
4933 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
4934 { }
4935 },
4936 .chained_before = true,
4937 .chain_id = ALC269_FIXUP_HEADSET_MODE,
4938 },
4939 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4940 .type = HDA_FIXUP_PINS,
4941 .v.pins = (const struct hda_pintbl[]) {
4942 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4943 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
4944 { }
4945 },
4946 .chained = true,
4947 .chain_id = ALC269_FIXUP_HEADSET_MODE
4948 },
4949 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = {
4950 .type = HDA_FIXUP_PINS,
4951 .v.pins = (const struct hda_pintbl[]) {
4952 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
4953 { }
4954 },
4955 .chained = true,
4956 .chain_id = ALC269_FIXUP_HEADSET_MODE
4957 },
4958 [ALC275_FIXUP_DELL_XPS] = {
4959 .type = HDA_FIXUP_VERBS,
4960 .v.verbs = (const struct hda_verb[]) {
4961 /* Enables internal speaker */
4962 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f},
4963 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0},
4964 {0x20, AC_VERB_SET_COEF_INDEX, 0x30},
4965 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1},
4966 {}
4967 }
4968 },
4969 [ALC293_FIXUP_LENOVO_SPK_NOISE] = {
4970 .type = HDA_FIXUP_FUNC,
4971 .v.func = alc_fixup_disable_aamix,
4972 .chained = true,
4973 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
4974 },
4975 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = {
4976 .type = HDA_FIXUP_FUNC,
4977 .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
4978 },
4979 [ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED] = {
4980 .type = HDA_FIXUP_FUNC,
4981 .v.func = alc233_fixup_lenovo_low_en_micmute_led,
4982 },
4983 [ALC233_FIXUP_INTEL_NUC8_DMIC] = {
4984 .type = HDA_FIXUP_FUNC,
4985 .v.func = alc_fixup_inv_dmic,
4986 .chained = true,
4987 .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST,
4988 },
4989 [ALC233_FIXUP_INTEL_NUC8_BOOST] = {
4990 .type = HDA_FIXUP_FUNC,
4991 .v.func = alc269_fixup_limit_int_mic_boost
4992 },
4993 [ALC255_FIXUP_DELL_SPK_NOISE] = {
4994 .type = HDA_FIXUP_FUNC,
4995 .v.func = alc_fixup_disable_aamix,
4996 .chained = true,
4997 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4998 },
4999 [ALC225_FIXUP_DISABLE_MIC_VREF] = {
5000 .type = HDA_FIXUP_FUNC,
5001 .v.func = alc_fixup_disable_mic_vref,
5002 .chained = true,
5003 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
5004 },
5005 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5006 .type = HDA_FIXUP_VERBS,
5007 .v.verbs = (const struct hda_verb[]) {
5008 /* Disable pass-through path for FRONT 14h */
5009 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
5010 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
5011 {}
5012 },
5013 .chained = true,
5014 .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
5015 },
5016 [ALC280_FIXUP_HP_HEADSET_MIC] = {
5017 .type = HDA_FIXUP_FUNC,
5018 .v.func = alc_fixup_disable_aamix,
5019 .chained = true,
5020 .chain_id = ALC269_FIXUP_HEADSET_MIC,
5021 },
5022 [ALC221_FIXUP_HP_FRONT_MIC] = {
5023 .type = HDA_FIXUP_PINS,
5024 .v.pins = (const struct hda_pintbl[]) {
5025 { 0x19, 0x02a19020 }, /* Front Mic */
5026 { }
5027 },
5028 },
5029 [ALC292_FIXUP_TPT460] = {
5030 .type = HDA_FIXUP_FUNC,
5031 .v.func = alc_fixup_tpt440_dock,
5032 .chained = true,
5033 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
5034 },
5035 [ALC298_FIXUP_SPK_VOLUME] = {
5036 .type = HDA_FIXUP_FUNC,
5037 .v.func = alc298_fixup_speaker_volume,
5038 .chained = true,
5039 .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
5040 },
5041 [ALC298_FIXUP_LENOVO_SPK_VOLUME] = {
5042 .type = HDA_FIXUP_FUNC,
5043 .v.func = alc298_fixup_speaker_volume,
5044 },
5045 [ALC295_FIXUP_DISABLE_DAC3] = {
5046 .type = HDA_FIXUP_FUNC,
5047 .v.func = alc295_fixup_disable_dac3,
5048 },
5049 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = {
5050 .type = HDA_FIXUP_FUNC,
5051 .v.func = alc285_fixup_speaker2_to_dac1,
5052 .chained = true,
5053 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5054 },
5055 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = {
5056 .type = HDA_FIXUP_FUNC,
5057 .v.func = alc285_fixup_speaker2_to_dac1,
5058 .chained = true,
5059 .chain_id = ALC245_FIXUP_CS35L41_SPI_2
5060 },
5061 [ALC285_FIXUP_ASUS_HEADSET_MIC] = {
5062 .type = HDA_FIXUP_PINS,
5063 .v.pins = (const struct hda_pintbl[]) {
5064 { 0x19, 0x03a11050 },
5065 { 0x1b, 0x03a11c30 },
5066 { }
5067 },
5068 .chained = true,
5069 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1
5070 },
5071 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = {
5072 .type = HDA_FIXUP_PINS,
5073 .v.pins = (const struct hda_pintbl[]) {
5074 { 0x14, 0x90170120 },
5075 { }
5076 },
5077 .chained = true,
5078 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC
5079 },
5080 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = {
5081 .type = HDA_FIXUP_FUNC,
5082 .v.func = alc285_fixup_speaker2_to_dac1,
5083 .chained = true,
5084 .chain_id = ALC287_FIXUP_CS35L41_I2C_2
5085 },
5086 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = {
5087 .type = HDA_FIXUP_PINS,
5088 .v.pins = (const struct hda_pintbl[]) {
5089 { 0x19, 0x03a11050 },
5090 { 0x1b, 0x03a11c30 },
5091 { }
5092 },
5093 .chained = true,
5094 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1
5095 },
5096 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = {
5097 .type = HDA_FIXUP_PINS,
5098 .v.pins = (const struct hda_pintbl[]) {
5099 { 0x1b, 0x90170151 },
5100 { }
5101 },
5102 .chained = true,
5103 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5104 },
5105 [ALC269_FIXUP_ATIV_BOOK_8] = {
5106 .type = HDA_FIXUP_FUNC,
5107 .v.func = alc_fixup_auto_mute_via_amp,
5108 .chained = true,
5109 .chain_id = ALC269_FIXUP_NO_SHUTUP
5110 },
5111 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
5112 .type = HDA_FIXUP_PINS,
5113 .v.pins = (const struct hda_pintbl[]) {
5114 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5115 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
5116 { }
5117 },
5118 .chained = true,
5119 .chain_id = ALC269_FIXUP_HEADSET_MODE
5120 },
5121 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
5122 .type = HDA_FIXUP_PINS,
5123 .v.pins = (const struct hda_pintbl[]) {
5124 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5125 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
5126 { }
5127 },
5128 .chained = true,
5129 .chain_id = ALC269_FIXUP_HEADSET_MODE
5130 },
5131 [ALC256_FIXUP_ASUS_HEADSET_MODE] = {
5132 .type = HDA_FIXUP_FUNC,
5133 .v.func = alc_fixup_headset_mode,
5134 },
5135 [ALC256_FIXUP_ASUS_MIC] = {
5136 .type = HDA_FIXUP_PINS,
5137 .v.pins = (const struct hda_pintbl[]) {
5138 { 0x13, 0x90a60160 }, /* use as internal mic */
5139 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5140 { }
5141 },
5142 .chained = true,
5143 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5144 },
5145 [ALC256_FIXUP_ASUS_AIO_GPIO2] = {
5146 .type = HDA_FIXUP_FUNC,
5147 /* Set up GPIO2 for the speaker amp */
5148 .v.func = alc_fixup_gpio4,
5149 },
5150 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5151 .type = HDA_FIXUP_PINS,
5152 .v.pins = (const struct hda_pintbl[]) {
5153 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5154 { }
5155 },
5156 .chained = true,
5157 .chain_id = ALC269_FIXUP_HEADSET_MIC
5158 },
5159 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = {
5160 .type = HDA_FIXUP_VERBS,
5161 .v.verbs = (const struct hda_verb[]) {
5162 /* Enables internal speaker */
5163 {0x20, AC_VERB_SET_COEF_INDEX, 0x40},
5164 {0x20, AC_VERB_SET_PROC_COEF, 0x8800},
5165 {}
5166 },
5167 .chained = true,
5168 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
5169 },
5170 [ALC233_FIXUP_LENOVO_MULTI_CODECS] = {
5171 .type = HDA_FIXUP_FUNC,
5172 .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
5173 .chained = true,
5174 .chain_id = ALC269_FIXUP_GPIO2
5175 },
5176 [ALC233_FIXUP_ACER_HEADSET_MIC] = {
5177 .type = HDA_FIXUP_VERBS,
5178 .v.verbs = (const struct hda_verb[]) {
5179 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5180 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5181 { }
5182 },
5183 .chained = true,
5184 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
5185 },
5186 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
5187 .type = HDA_FIXUP_PINS,
5188 .v.pins = (const struct hda_pintbl[]) {
5189 /* Change the mic location from front to right, otherwise there are
5190 two front mics with the same name, pulseaudio can't handle them.
5191 This is just a temporary workaround, after applying this fixup,
5192 there will be one "Front Mic" and one "Mic" in this machine.
5193 */
5194 { 0x1a, 0x04a19040 },
5195 { }
5196 },
5197 },
5198 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = {
5199 .type = HDA_FIXUP_PINS,
5200 .v.pins = (const struct hda_pintbl[]) {
5201 { 0x16, 0x0101102f }, /* Rear Headset HP */
5202 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
5203 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */
5204 { 0x1b, 0x02011020 },
5205 { }
5206 },
5207 .chained = true,
5208 .chain_id = ALC225_FIXUP_S3_POP_NOISE
5209 },
5210 [ALC225_FIXUP_S3_POP_NOISE] = {
5211 .type = HDA_FIXUP_FUNC,
5212 .v.func = alc225_fixup_s3_pop_noise,
5213 .chained = true,
5214 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5215 },
5216 [ALC700_FIXUP_INTEL_REFERENCE] = {
5217 .type = HDA_FIXUP_VERBS,
5218 .v.verbs = (const struct hda_verb[]) {
5219 /* Enables internal speaker */
5220 {0x20, AC_VERB_SET_COEF_INDEX, 0x45},
5221 {0x20, AC_VERB_SET_PROC_COEF, 0x5289},
5222 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A},
5223 {0x20, AC_VERB_SET_PROC_COEF, 0x001b},
5224 {0x58, AC_VERB_SET_COEF_INDEX, 0x00},
5225 {0x58, AC_VERB_SET_PROC_COEF, 0x3888},
5226 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f},
5227 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b},
5228 {}
5229 }
5230 },
5231 [ALC274_FIXUP_DELL_BIND_DACS] = {
5232 .type = HDA_FIXUP_FUNC,
5233 .v.func = alc274_fixup_bind_dacs,
5234 .chained = true,
5235 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
5236 },
5237 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
5238 .type = HDA_FIXUP_PINS,
5239 .v.pins = (const struct hda_pintbl[]) {
5240 { 0x1b, 0x0401102f },
5241 { }
5242 },
5243 .chained = true,
5244 .chain_id = ALC274_FIXUP_DELL_BIND_DACS
5245 },
5246 [ALC298_FIXUP_TPT470_DOCK_FIX] = {
5247 .type = HDA_FIXUP_FUNC,
5248 .v.func = alc_fixup_tpt470_dock,
5249 .chained = true,
5250 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE
5251 },
5252 [ALC298_FIXUP_TPT470_DOCK] = {
5253 .type = HDA_FIXUP_FUNC,
5254 .v.func = alc_fixup_tpt470_dacs,
5255 .chained = true,
5256 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX
5257 },
5258 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
5259 .type = HDA_FIXUP_PINS,
5260 .v.pins = (const struct hda_pintbl[]) {
5261 { 0x14, 0x0201101f },
5262 { }
5263 },
5264 .chained = true,
5265 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5266 },
5267 [ALC255_FIXUP_DELL_HEADSET_MIC] = {
5268 .type = HDA_FIXUP_PINS,
5269 .v.pins = (const struct hda_pintbl[]) {
5270 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5271 { }
5272 },
5273 .chained = true,
5274 .chain_id = ALC269_FIXUP_HEADSET_MIC
5275 },
5276 [ALC295_FIXUP_HP_X360] = {
5277 .type = HDA_FIXUP_FUNC,
5278 .v.func = alc295_fixup_hp_top_speakers,
5279 .chained = true,
5280 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3
5281 },
5282 [ALC221_FIXUP_HP_HEADSET_MIC] = {
5283 .type = HDA_FIXUP_PINS,
5284 .v.pins = (const struct hda_pintbl[]) {
5285 { 0x19, 0x0181313f},
5286 { }
5287 },
5288 .chained = true,
5289 .chain_id = ALC269_FIXUP_HEADSET_MIC
5290 },
5291 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = {
5292 .type = HDA_FIXUP_FUNC,
5293 .v.func = alc285_fixup_invalidate_dacs,
5294 .chained = true,
5295 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5296 },
5297 [ALC295_FIXUP_HP_AUTO_MUTE] = {
5298 .type = HDA_FIXUP_FUNC,
5299 .v.func = alc_fixup_auto_mute_via_amp,
5300 },
5301 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = {
5302 .type = HDA_FIXUP_PINS,
5303 .v.pins = (const struct hda_pintbl[]) {
5304 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5305 { }
5306 },
5307 .chained = true,
5308 .chain_id = ALC269_FIXUP_HEADSET_MIC
5309 },
5310 [ALC294_FIXUP_ASUS_MIC] = {
5311 .type = HDA_FIXUP_PINS,
5312 .v.pins = (const struct hda_pintbl[]) {
5313 { 0x13, 0x90a60160 }, /* use as internal mic */
5314 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5315 { }
5316 },
5317 .chained = true,
5318 .chain_id = ALC269_FIXUP_HEADSET_MIC
5319 },
5320 [ALC294_FIXUP_ASUS_HEADSET_MIC] = {
5321 .type = HDA_FIXUP_PINS,
5322 .v.pins = (const struct hda_pintbl[]) {
5323 { 0x19, 0x01a1103c }, /* use as headset mic */
5324 { }
5325 },
5326 .chained = true,
5327 .chain_id = ALC269_FIXUP_HEADSET_MIC
5328 },
5329 [ALC294_FIXUP_ASUS_I2C_HEADSET_MIC] = {
5330 .type = HDA_FIXUP_PINS,
5331 .v.pins = (const struct hda_pintbl[]) {
5332 { 0x19, 0x03a19020 }, /* use as headset mic */
5333 { }
5334 },
5335 .chained = true,
5336 .chain_id = ALC287_FIXUP_CS35L41_I2C_2
5337 },
5338 [ALC294_FIXUP_ASUS_SPI_HEADSET_MIC] = {
5339 .type = HDA_FIXUP_PINS,
5340 .v.pins = (const struct hda_pintbl[]) {
5341 { 0x19, 0x04a11020 }, /* use as headset mic */
5342 { }
5343 },
5344 .chained = true,
5345 .chain_id = ALC245_FIXUP_CS35L41_SPI_2
5346 },
5347 [ALC294_FIXUP_ASUS_SPK] = {
5348 .type = HDA_FIXUP_VERBS,
5349 .v.verbs = (const struct hda_verb[]) {
5350 /* Set EAPD high */
5351 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
5352 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
5353 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5354 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
5355 { }
5356 },
5357 .chained = true,
5358 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5359 },
5360 [ALC295_FIXUP_CHROME_BOOK] = {
5361 .type = HDA_FIXUP_FUNC,
5362 .v.func = alc295_fixup_chromebook,
5363 .chained = true,
5364 .chain_id = ALC225_FIXUP_HEADSET_JACK
5365 },
5366 [ALC225_FIXUP_HEADSET_JACK] = {
5367 .type = HDA_FIXUP_FUNC,
5368 .v.func = alc_fixup_headset_jack,
5369 },
5370 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
5371 .type = HDA_FIXUP_PINS,
5372 .v.pins = (const struct hda_pintbl[]) {
5373 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5374 { }
5375 },
5376 .chained = true,
5377 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5378 },
5379 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = {
5380 .type = HDA_FIXUP_VERBS,
5381 .v.verbs = (const struct hda_verb[]) {
5382 /* Disable PCBEEP-IN passthrough */
5383 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
5384 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
5385 { }
5386 },
5387 .chained = true,
5388 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
5389 },
5390 [ALC255_FIXUP_ACER_HEADSET_MIC] = {
5391 .type = HDA_FIXUP_PINS,
5392 .v.pins = (const struct hda_pintbl[]) {
5393 { 0x19, 0x03a11130 },
5394 { 0x1a, 0x90a60140 }, /* use as internal mic */
5395 { }
5396 },
5397 .chained = true,
5398 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
5399 },
5400 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = {
5401 .type = HDA_FIXUP_PINS,
5402 .v.pins = (const struct hda_pintbl[]) {
5403 { 0x16, 0x01011020 }, /* Rear Line out */
5404 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
5405 { }
5406 },
5407 .chained = true,
5408 .chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE
5409 },
5410 [ALC225_FIXUP_WYSE_AUTO_MUTE] = {
5411 .type = HDA_FIXUP_FUNC,
5412 .v.func = alc_fixup_auto_mute_via_amp,
5413 .chained = true,
5414 .chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
5415 },
5416 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = {
5417 .type = HDA_FIXUP_FUNC,
5418 .v.func = alc_fixup_disable_mic_vref,
5419 .chained = true,
5420 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
5421 },
5422 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = {
5423 .type = HDA_FIXUP_VERBS,
5424 .v.verbs = (const struct hda_verb[]) {
5425 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
5426 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
5427 { }
5428 },
5429 .chained = true,
5430 .chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
5431 },
5432 [ALC256_FIXUP_ASUS_HEADSET_MIC] = {
5433 .type = HDA_FIXUP_PINS,
5434 .v.pins = (const struct hda_pintbl[]) {
5435 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
5436 { }
5437 },
5438 .chained = true,
5439 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5440 },
5441 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5442 .type = HDA_FIXUP_PINS,
5443 .v.pins = (const struct hda_pintbl[]) {
5444 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
5445 { }
5446 },
5447 .chained = true,
5448 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5449 },
5450 [ALC255_FIXUP_PREDATOR_SUBWOOFER] = {
5451 .type = HDA_FIXUP_PINS,
5452 .v.pins = (const struct hda_pintbl[]) {
5453 { 0x17, 0x90170151 }, /* use as internal speaker (LFE) */
5454 { 0x1b, 0x90170152 } /* use as internal speaker (back) */
5455 }
5456 },
5457 [ALC299_FIXUP_PREDATOR_SPK] = {
5458 .type = HDA_FIXUP_PINS,
5459 .v.pins = (const struct hda_pintbl[]) {
5460 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
5461 { }
5462 }
5463 },
5464 [ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2] = {
5465 .type = HDA_FIXUP_FUNC,
5466 .v.func = cs35l41_fixup_i2c_two,
5467 .chained = true,
5468 .chain_id = ALC255_FIXUP_PREDATOR_SUBWOOFER
5469 },
5470 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
5471 .type = HDA_FIXUP_PINS,
5472 .v.pins = (const struct hda_pintbl[]) {
5473 { 0x19, 0x04a11040 },
5474 { 0x21, 0x04211020 },
5475 { }
5476 },
5477 .chained = true,
5478 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5479 },
5480 [ALC289_FIXUP_DELL_SPK1] = {
5481 .type = HDA_FIXUP_PINS,
5482 .v.pins = (const struct hda_pintbl[]) {
5483 { 0x14, 0x90170140 },
5484 { }
5485 },
5486 .chained = true,
5487 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5488 },
5489 [ALC289_FIXUP_DELL_SPK2] = {
5490 .type = HDA_FIXUP_PINS,
5491 .v.pins = (const struct hda_pintbl[]) {
5492 { 0x17, 0x90170130 }, /* bass spk */
5493 { }
5494 },
5495 .chained = true,
5496 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
5497 },
5498 [ALC289_FIXUP_DUAL_SPK] = {
5499 .type = HDA_FIXUP_FUNC,
5500 .v.func = alc285_fixup_speaker2_to_dac1,
5501 .chained = true,
5502 .chain_id = ALC289_FIXUP_DELL_SPK2
5503 },
5504 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = {
5505 .type = HDA_FIXUP_FUNC,
5506 .v.func = alc285_fixup_speaker2_to_dac1,
5507 .chained = true,
5508 .chain_id = ALC289_FIXUP_DELL_SPK1
5509 },
5510 [ALC294_FIXUP_SPK2_TO_DAC1] = {
5511 .type = HDA_FIXUP_FUNC,
5512 .v.func = alc285_fixup_speaker2_to_dac1,
5513 .chained = true,
5514 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5515 },
5516 [ALC294_FIXUP_ASUS_DUAL_SPK] = {
5517 .type = HDA_FIXUP_FUNC,
5518 /* The GPIO must be pulled to initialize the AMP */
5519 .v.func = alc_fixup_gpio4,
5520 .chained = true,
5521 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1
5522 },
5523 [ALC294_FIXUP_ASUS_ALLY] = {
5524 .type = HDA_FIXUP_FUNC,
5525 .v.func = cs35l41_fixup_i2c_two,
5526 .chained = true,
5527 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
5528 },
5529 [ALC294_FIXUP_ASUS_ALLY_PINS] = {
5530 .type = HDA_FIXUP_PINS,
5531 .v.pins = (const struct hda_pintbl[]) {
5532 { 0x19, 0x03a11050 },
5533 { 0x1a, 0x03a11c30 },
5534 { 0x21, 0x03211420 },
5535 { }
5536 },
5537 .chained = true,
5538 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS
5539 },
5540 [ALC294_FIXUP_ASUS_ALLY_VERBS] = {
5541 .type = HDA_FIXUP_VERBS,
5542 .v.verbs = (const struct hda_verb[]) {
5543 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5544 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5545 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 },
5546 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 },
5547 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 },
5548 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a },
5549 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
5550 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049},
5551 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
5552 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b },
5553 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
5554 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278},
5555 { }
5556 },
5557 .chained = true,
5558 .chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER
5559 },
5560 [ALC294_FIXUP_ASUS_ALLY_SPEAKER] = {
5561 .type = HDA_FIXUP_FUNC,
5562 .v.func = alc285_fixup_speaker2_to_dac1,
5563 },
5564 [ALC285_FIXUP_THINKPAD_X1_GEN7] = {
5565 .type = HDA_FIXUP_FUNC,
5566 .v.func = alc285_fixup_thinkpad_x1_gen7,
5567 .chained = true,
5568 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
5569 },
5570 [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = {
5571 .type = HDA_FIXUP_FUNC,
5572 .v.func = alc_fixup_headset_jack,
5573 .chained = true,
5574 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7
5575 },
5576 [ALC294_FIXUP_ASUS_HPE] = {
5577 .type = HDA_FIXUP_VERBS,
5578 .v.verbs = (const struct hda_verb[]) {
5579 /* Set EAPD high */
5580 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5581 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
5582 { }
5583 },
5584 .chained = true,
5585 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5586 },
5587 [ALC294_FIXUP_ASUS_GX502_PINS] = {
5588 .type = HDA_FIXUP_PINS,
5589 .v.pins = (const struct hda_pintbl[]) {
5590 { 0x19, 0x03a11050 }, /* front HP mic */
5591 { 0x1a, 0x01a11830 }, /* rear external mic */
5592 { 0x21, 0x03211020 }, /* front HP out */
5593 { }
5594 },
5595 .chained = true,
5596 .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS
5597 },
5598 [ALC294_FIXUP_ASUS_GX502_VERBS] = {
5599 .type = HDA_FIXUP_VERBS,
5600 .v.verbs = (const struct hda_verb[]) {
5601 /* set 0x15 to HP-OUT ctrl */
5602 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5603 /* unmute the 0x15 amp */
5604 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5605 { }
5606 },
5607 .chained = true,
5608 .chain_id = ALC294_FIXUP_ASUS_GX502_HP
5609 },
5610 [ALC294_FIXUP_ASUS_GX502_HP] = {
5611 .type = HDA_FIXUP_FUNC,
5612 .v.func = alc294_fixup_gx502_hp,
5613 },
5614 [ALC295_FIXUP_DELL_TAS2781_I2C] = {
5615 .type = HDA_FIXUP_FUNC,
5616 .v.func = tas2781_fixup_tias_i2c,
5617 .chained = true,
5618 .chain_id = ALC289_FIXUP_DUAL_SPK
5619 },
5620 [ALC294_FIXUP_ASUS_GU502_PINS] = {
5621 .type = HDA_FIXUP_PINS,
5622 .v.pins = (const struct hda_pintbl[]) {
5623 { 0x19, 0x01a11050 }, /* rear HP mic */
5624 { 0x1a, 0x01a11830 }, /* rear external mic */
5625 { 0x21, 0x012110f0 }, /* rear HP out */
5626 { }
5627 },
5628 .chained = true,
5629 .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS
5630 },
5631 [ALC294_FIXUP_ASUS_GU502_VERBS] = {
5632 .type = HDA_FIXUP_VERBS,
5633 .v.verbs = (const struct hda_verb[]) {
5634 /* set 0x15 to HP-OUT ctrl */
5635 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 },
5636 /* unmute the 0x15 amp */
5637 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 },
5638 /* set 0x1b to HP-OUT */
5639 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
5640 { }
5641 },
5642 .chained = true,
5643 .chain_id = ALC294_FIXUP_ASUS_GU502_HP
5644 },
5645 [ALC294_FIXUP_ASUS_GU502_HP] = {
5646 .type = HDA_FIXUP_FUNC,
5647 .v.func = alc294_fixup_gu502_hp,
5648 },
5649 [ALC294_FIXUP_ASUS_G513_PINS] = {
5650 .type = HDA_FIXUP_PINS,
5651 .v.pins = (const struct hda_pintbl[]) {
5652 { 0x19, 0x03a11050 }, /* front HP mic */
5653 { 0x1a, 0x03a11c30 }, /* rear external mic */
5654 { 0x21, 0x03211420 }, /* front HP out */
5655 { }
5656 },
5657 },
5658 [ALC285_FIXUP_ASUS_G533Z_PINS] = {
5659 .type = HDA_FIXUP_PINS,
5660 .v.pins = (const struct hda_pintbl[]) {
5661 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */
5662 { 0x19, 0x03a19020 }, /* Mic Boost Volume */
5663 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */
5664 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
5665 { 0x21, 0x03211420 },
5666 { }
5667 },
5668 },
5669 [ALC294_FIXUP_ASUS_COEF_1B] = {
5670 .type = HDA_FIXUP_VERBS,
5671 .v.verbs = (const struct hda_verb[]) {
5672 /* Set bit 10 to correct noisy output after reboot from
5673 * Windows 10 (due to pop noise reduction?)
5674 */
5675 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b },
5676 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b },
5677 { }
5678 },
5679 .chained = true,
5680 .chain_id = ALC289_FIXUP_ASUS_GA401,
5681 },
5682 [ALC285_FIXUP_HP_GPIO_LED] = {
5683 .type = HDA_FIXUP_FUNC,
5684 .v.func = alc285_fixup_hp_gpio_led,
5685 },
5686 [ALC285_FIXUP_HP_MUTE_LED] = {
5687 .type = HDA_FIXUP_FUNC,
5688 .v.func = alc285_fixup_hp_mute_led,
5689 },
5690 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
5691 .type = HDA_FIXUP_FUNC,
5692 .v.func = alc285_fixup_hp_spectre_x360_mute_led,
5693 },
5694 [ALC245_FIXUP_HP_ENVY_X360_MUTE_LED] = {
5695 .type = HDA_FIXUP_FUNC,
5696 .v.func = alc245_fixup_hp_envy_x360_mute_led,
5697 },
5698 [ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
5699 .type = HDA_FIXUP_FUNC,
5700 .v.func = alc285_fixup_hp_beep,
5701 .chained = true,
5702 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
5703 },
5704 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
5705 .type = HDA_FIXUP_FUNC,
5706 .v.func = alc236_fixup_hp_mute_led_coefbit2,
5707 },
5708 [ALC236_FIXUP_HP_GPIO_LED] = {
5709 .type = HDA_FIXUP_FUNC,
5710 .v.func = alc236_fixup_hp_gpio_led,
5711 },
5712 [ALC236_FIXUP_HP_MUTE_LED] = {
5713 .type = HDA_FIXUP_FUNC,
5714 .v.func = alc236_fixup_hp_mute_led,
5715 },
5716 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = {
5717 .type = HDA_FIXUP_FUNC,
5718 .v.func = alc236_fixup_hp_mute_led_micmute_vref,
5719 },
5720 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
5721 .type = HDA_FIXUP_FUNC,
5722 .v.func = alc236_fixup_hp_mute_led_micmute_gpio,
5723 },
5724 [ALC236_FIXUP_LENOVO_INV_DMIC] = {
5725 .type = HDA_FIXUP_FUNC,
5726 .v.func = alc_fixup_inv_dmic,
5727 .chained = true,
5728 .chain_id = ALC283_FIXUP_INT_MIC,
5729 },
5730 [ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = {
5731 .type = HDA_FIXUP_FUNC,
5732 .v.func = alc295_fixup_hp_mute_led_coefbit11,
5733 },
5734 [ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B] = {
5735 .type = HDA_FIXUP_FUNC,
5736 .v.func = alc295_fixup_hp_pavilion_mute_led_1b,
5737 },
5738 [ALC298_FIXUP_SAMSUNG_AMP] = {
5739 .type = HDA_FIXUP_FUNC,
5740 .v.func = alc298_fixup_samsung_amp,
5741 .chained = true,
5742 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
5743 },
5744 [ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS] = {
5745 .type = HDA_FIXUP_FUNC,
5746 .v.func = alc298_fixup_samsung_amp_v2_2_amps
5747 },
5748 [ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS] = {
5749 .type = HDA_FIXUP_FUNC,
5750 .v.func = alc298_fixup_samsung_amp_v2_4_amps
5751 },
5752 [ALC298_FIXUP_LG_GRAM_STYLE_14] = {
5753 .type = HDA_FIXUP_FUNC,
5754 .v.func = alc298_fixup_lg_gram_style_14
5755 },
5756 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
5757 .type = HDA_FIXUP_VERBS,
5758 .v.verbs = (const struct hda_verb[]) {
5759 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 },
5760 { }
5761 },
5762 },
5763 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
5764 .type = HDA_FIXUP_VERBS,
5765 .v.verbs = (const struct hda_verb[]) {
5766 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08},
5767 { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf},
5768 { }
5769 },
5770 },
5771 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = {
5772 .type = HDA_FIXUP_PINS,
5773 .v.pins = (const struct hda_pintbl[]) {
5774 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5775 { }
5776 },
5777 .chained = true,
5778 .chain_id = ALC269_FIXUP_HEADSET_MODE
5779 },
5780 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = {
5781 .type = HDA_FIXUP_PINS,
5782 .v.pins = (const struct hda_pintbl[]) {
5783 { 0x14, 0x90100120 }, /* use as internal speaker */
5784 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
5785 { 0x1a, 0x01011020 }, /* use as line out */
5786 { },
5787 },
5788 .chained = true,
5789 .chain_id = ALC269_FIXUP_HEADSET_MIC
5790 },
5791 [ALC269VC_FIXUP_ACER_HEADSET_MIC] = {
5792 .type = HDA_FIXUP_PINS,
5793 .v.pins = (const struct hda_pintbl[]) {
5794 { 0x18, 0x02a11030 }, /* use as headset mic */
5795 { }
5796 },
5797 .chained = true,
5798 .chain_id = ALC269_FIXUP_HEADSET_MIC
5799 },
5800 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = {
5801 .type = HDA_FIXUP_PINS,
5802 .v.pins = (const struct hda_pintbl[]) {
5803 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
5804 { }
5805 },
5806 .chained = true,
5807 .chain_id = ALC269_FIXUP_HEADSET_MIC
5808 },
5809 [ALC289_FIXUP_ASUS_GA401] = {
5810 .type = HDA_FIXUP_FUNC,
5811 .v.func = alc289_fixup_asus_ga401,
5812 .chained = true,
5813 .chain_id = ALC289_FIXUP_ASUS_GA502,
5814 },
5815 [ALC289_FIXUP_ASUS_GA502] = {
5816 .type = HDA_FIXUP_PINS,
5817 .v.pins = (const struct hda_pintbl[]) {
5818 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
5819 { }
5820 },
5821 },
5822 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
5823 .type = HDA_FIXUP_PINS,
5824 .v.pins = (const struct hda_pintbl[]) {
5825 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
5826 { }
5827 },
5828 .chained = true,
5829 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
5830 },
5831 [ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
5832 .type = HDA_FIXUP_FUNC,
5833 .v.func = alc285_fixup_hp_gpio_amp_init,
5834 .chained = true,
5835 .chain_id = ALC285_FIXUP_HP_GPIO_LED
5836 },
5837 [ALC269_FIXUP_CZC_B20] = {
5838 .type = HDA_FIXUP_PINS,
5839 .v.pins = (const struct hda_pintbl[]) {
5840 { 0x12, 0x411111f0 },
5841 { 0x14, 0x90170110 }, /* speaker */
5842 { 0x15, 0x032f1020 }, /* HP out */
5843 { 0x17, 0x411111f0 },
5844 { 0x18, 0x03ab1040 }, /* mic */
5845 { 0x19, 0xb7a7013f },
5846 { 0x1a, 0x0181305f },
5847 { 0x1b, 0x411111f0 },
5848 { 0x1d, 0x411111f0 },
5849 { 0x1e, 0x411111f0 },
5850 { }
5851 },
5852 .chain_id = ALC269_FIXUP_DMIC,
5853 },
5854 [ALC269_FIXUP_CZC_TMI] = {
5855 .type = HDA_FIXUP_PINS,
5856 .v.pins = (const struct hda_pintbl[]) {
5857 { 0x12, 0x4000c000 },
5858 { 0x14, 0x90170110 }, /* speaker */
5859 { 0x15, 0x0421401f }, /* HP out */
5860 { 0x17, 0x411111f0 },
5861 { 0x18, 0x04a19020 }, /* mic */
5862 { 0x19, 0x411111f0 },
5863 { 0x1a, 0x411111f0 },
5864 { 0x1b, 0x411111f0 },
5865 { 0x1d, 0x40448505 },
5866 { 0x1e, 0x411111f0 },
5867 { 0x20, 0x8000ffff },
5868 { }
5869 },
5870 .chain_id = ALC269_FIXUP_DMIC,
5871 },
5872 [ALC269_FIXUP_CZC_L101] = {
5873 .type = HDA_FIXUP_PINS,
5874 .v.pins = (const struct hda_pintbl[]) {
5875 { 0x12, 0x40000000 },
5876 { 0x14, 0x01014010 }, /* speaker */
5877 { 0x15, 0x411111f0 }, /* HP out */
5878 { 0x16, 0x411111f0 },
5879 { 0x18, 0x01a19020 }, /* mic */
5880 { 0x19, 0x02a19021 },
5881 { 0x1a, 0x0181302f },
5882 { 0x1b, 0x0221401f },
5883 { 0x1c, 0x411111f0 },
5884 { 0x1d, 0x4044c601 },
5885 { 0x1e, 0x411111f0 },
5886 { }
5887 },
5888 .chain_id = ALC269_FIXUP_DMIC,
5889 },
5890 [ALC269_FIXUP_LEMOTE_A1802] = {
5891 .type = HDA_FIXUP_PINS,
5892 .v.pins = (const struct hda_pintbl[]) {
5893 { 0x12, 0x40000000 },
5894 { 0x14, 0x90170110 }, /* speaker */
5895 { 0x17, 0x411111f0 },
5896 { 0x18, 0x03a19040 }, /* mic1 */
5897 { 0x19, 0x90a70130 }, /* mic2 */
5898 { 0x1a, 0x411111f0 },
5899 { 0x1b, 0x411111f0 },
5900 { 0x1d, 0x40489d2d },
5901 { 0x1e, 0x411111f0 },
5902 { 0x20, 0x0003ffff },
5903 { 0x21, 0x03214020 },
5904 { }
5905 },
5906 .chain_id = ALC269_FIXUP_DMIC,
5907 },
5908 [ALC269_FIXUP_LEMOTE_A190X] = {
5909 .type = HDA_FIXUP_PINS,
5910 .v.pins = (const struct hda_pintbl[]) {
5911 { 0x14, 0x99130110 }, /* speaker */
5912 { 0x15, 0x0121401f }, /* HP out */
5913 { 0x18, 0x01a19c20 }, /* rear mic */
5914 { 0x19, 0x99a3092f }, /* front mic */
5915 { 0x1b, 0x0201401f }, /* front lineout */
5916 { }
5917 },
5918 .chain_id = ALC269_FIXUP_DMIC,
5919 },
5920 [ALC256_FIXUP_INTEL_NUC8_RUGGED] = {
5921 .type = HDA_FIXUP_PINS,
5922 .v.pins = (const struct hda_pintbl[]) {
5923 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5924 { }
5925 },
5926 .chained = true,
5927 .chain_id = ALC269_FIXUP_HEADSET_MODE
5928 },
5929 [ALC256_FIXUP_INTEL_NUC10] = {
5930 .type = HDA_FIXUP_PINS,
5931 .v.pins = (const struct hda_pintbl[]) {
5932 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5933 { }
5934 },
5935 .chained = true,
5936 .chain_id = ALC269_FIXUP_HEADSET_MODE
5937 },
5938 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = {
5939 .type = HDA_FIXUP_VERBS,
5940 .v.verbs = (const struct hda_verb[]) {
5941 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5942 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5943 { }
5944 },
5945 .chained = true,
5946 .chain_id = ALC289_FIXUP_ASUS_GA502
5947 },
5948 [ALC274_FIXUP_HP_MIC] = {
5949 .type = HDA_FIXUP_VERBS,
5950 .v.verbs = (const struct hda_verb[]) {
5951 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
5952 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
5953 { }
5954 },
5955 },
5956 [ALC274_FIXUP_HP_HEADSET_MIC] = {
5957 .type = HDA_FIXUP_FUNC,
5958 .v.func = alc274_fixup_hp_headset_mic,
5959 .chained = true,
5960 .chain_id = ALC274_FIXUP_HP_MIC
5961 },
5962 [ALC274_FIXUP_HP_ENVY_GPIO] = {
5963 .type = HDA_FIXUP_FUNC,
5964 .v.func = alc274_fixup_hp_envy_gpio,
5965 },
5966 [ALC274_FIXUP_ASUS_ZEN_AIO_27] = {
5967 .type = HDA_FIXUP_VERBS,
5968 .v.verbs = (const struct hda_verb[]) {
5969 { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 },
5970 { 0x20, AC_VERB_SET_PROC_COEF, 0xc420 },
5971 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
5972 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
5973 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 },
5974 { 0x20, AC_VERB_SET_PROC_COEF, 0x0249 },
5975 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a },
5976 { 0x20, AC_VERB_SET_PROC_COEF, 0x202b },
5977 { 0x20, AC_VERB_SET_COEF_INDEX, 0x62 },
5978 { 0x20, AC_VERB_SET_PROC_COEF, 0xa007 },
5979 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b },
5980 { 0x20, AC_VERB_SET_PROC_COEF, 0x5060 },
5981 {}
5982 },
5983 .chained = true,
5984 .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
5985 },
5986 [ALC256_FIXUP_ASUS_HPE] = {
5987 .type = HDA_FIXUP_VERBS,
5988 .v.verbs = (const struct hda_verb[]) {
5989 /* Set EAPD high */
5990 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
5991 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 },
5992 { }
5993 },
5994 .chained = true,
5995 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
5996 },
5997 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = {
5998 .type = HDA_FIXUP_FUNC,
5999 .v.func = alc_fixup_headset_jack,
6000 .chained = true,
6001 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
6002 },
6003 [ALC287_FIXUP_HP_GPIO_LED] = {
6004 .type = HDA_FIXUP_FUNC,
6005 .v.func = alc287_fixup_hp_gpio_led,
6006 },
6007 [ALC256_FIXUP_HP_HEADSET_MIC] = {
6008 .type = HDA_FIXUP_FUNC,
6009 .v.func = alc274_fixup_hp_headset_mic,
6010 },
6011 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = {
6012 .type = HDA_FIXUP_FUNC,
6013 .v.func = alc_fixup_no_int_mic,
6014 .chained = true,
6015 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
6016 },
6017 [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = {
6018 .type = HDA_FIXUP_PINS,
6019 .v.pins = (const struct hda_pintbl[]) {
6020 { 0x1b, 0x411111f0 },
6021 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
6022 { },
6023 },
6024 .chained = true,
6025 .chain_id = ALC269_FIXUP_HEADSET_MODE
6026 },
6027 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
6028 .type = HDA_FIXUP_FUNC,
6029 .v.func = alc269_fixup_limit_int_mic_boost,
6030 .chained = true,
6031 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
6032 },
6033 [ALC256_FIXUP_ACER_HEADSET_MIC] = {
6034 .type = HDA_FIXUP_PINS,
6035 .v.pins = (const struct hda_pintbl[]) {
6036 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
6037 { 0x1a, 0x90a1092f }, /* use as internal mic */
6038 { }
6039 },
6040 .chained = true,
6041 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6042 },
6043 [ALC285_FIXUP_IDEAPAD_S740_COEF] = {
6044 .type = HDA_FIXUP_FUNC,
6045 .v.func = alc285_fixup_ideapad_s740_coef,
6046 .chained = true,
6047 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
6048 },
6049 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
6050 .type = HDA_FIXUP_FUNC,
6051 .v.func = alc269_fixup_limit_int_mic_boost,
6052 .chained = true,
6053 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6054 },
6055 [ALC295_FIXUP_ASUS_DACS] = {
6056 .type = HDA_FIXUP_FUNC,
6057 .v.func = alc295_fixup_asus_dacs,
6058 },
6059 [ALC295_FIXUP_HP_OMEN] = {
6060 .type = HDA_FIXUP_PINS,
6061 .v.pins = (const struct hda_pintbl[]) {
6062 { 0x12, 0xb7a60130 },
6063 { 0x13, 0x40000000 },
6064 { 0x14, 0x411111f0 },
6065 { 0x16, 0x411111f0 },
6066 { 0x17, 0x90170110 },
6067 { 0x18, 0x411111f0 },
6068 { 0x19, 0x02a11030 },
6069 { 0x1a, 0x411111f0 },
6070 { 0x1b, 0x04a19030 },
6071 { 0x1d, 0x40600001 },
6072 { 0x1e, 0x411111f0 },
6073 { 0x21, 0x03211020 },
6074 {}
6075 },
6076 .chained = true,
6077 .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
6078 },
6079 [ALC285_FIXUP_HP_SPECTRE_X360] = {
6080 .type = HDA_FIXUP_FUNC,
6081 .v.func = alc285_fixup_hp_spectre_x360,
6082 },
6083 [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
6084 .type = HDA_FIXUP_FUNC,
6085 .v.func = alc285_fixup_hp_spectre_x360_eb1
6086 },
6087 [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
6088 .type = HDA_FIXUP_FUNC,
6089 .v.func = alc285_fixup_hp_spectre_x360_df1
6090 },
6091 [ALC285_FIXUP_HP_ENVY_X360] = {
6092 .type = HDA_FIXUP_FUNC,
6093 .v.func = alc285_fixup_hp_envy_x360,
6094 .chained = true,
6095 .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT,
6096 },
6097 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
6098 .type = HDA_FIXUP_FUNC,
6099 .v.func = alc285_fixup_ideapad_s740_coef,
6100 .chained = true,
6101 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6102 },
6103 [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = {
6104 .type = HDA_FIXUP_FUNC,
6105 .v.func = alc_fixup_no_shutup,
6106 .chained = true,
6107 .chain_id = ALC283_FIXUP_HEADSET_MIC,
6108 },
6109 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = {
6110 .type = HDA_FIXUP_PINS,
6111 .v.pins = (const struct hda_pintbl[]) {
6112 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */
6113 { }
6114 },
6115 .chained = true,
6116 .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC
6117 },
6118 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
6119 .type = HDA_FIXUP_FUNC,
6120 .v.func = alc269_fixup_limit_int_mic_boost,
6121 .chained = true,
6122 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
6123 },
6124 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
6125 .type = HDA_FIXUP_FUNC,
6126 .v.func = alc285_fixup_ideapad_s740_coef,
6127 .chained = true,
6128 .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
6129 },
6130 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
6131 .type = HDA_FIXUP_FUNC,
6132 .v.func = alc287_fixup_legion_15imhg05_speakers,
6133 .chained = true,
6134 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
6135 },
6136 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
6137 .type = HDA_FIXUP_VERBS,
6138 //.v.verbs = legion_15imhg05_coefs,
6139 .v.verbs = (const struct hda_verb[]) {
6140 // set left speaker Legion 7i.
6141 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6142 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6143
6144 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6145 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6146 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6147 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
6148 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6149
6150 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6151 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6152 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6153 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6154 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6155
6156 // set right speaker Legion 7i.
6157 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6158 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6159
6160 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6161 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6162 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6163 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6164 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6165
6166 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6167 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6168 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6169 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6170 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6171 {}
6172 },
6173 .chained = true,
6174 .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
6175 },
6176 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
6177 .type = HDA_FIXUP_FUNC,
6178 .v.func = alc287_fixup_legion_15imhg05_speakers,
6179 .chained = true,
6180 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6181 },
6182 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
6183 .type = HDA_FIXUP_VERBS,
6184 .v.verbs = (const struct hda_verb[]) {
6185 // set left speaker Yoga 7i.
6186 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6187 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6188
6189 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6190 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6191 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6192 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
6193 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6194
6195 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6196 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6197 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6198 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6199 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6200
6201 // set right speaker Yoga 7i.
6202 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6203 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6204
6205 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6206 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6207 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6208 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6209 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6210
6211 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6212 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6213 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6214 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6215 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6216 {}
6217 },
6218 .chained = true,
6219 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6220 },
6221 [ALC298_FIXUP_LENOVO_C940_DUET7] = {
6222 .type = HDA_FIXUP_FUNC,
6223 .v.func = alc298_fixup_lenovo_c940_duet7,
6224 },
6225 [ALC287_FIXUP_LENOVO_YOGA_BOOK_9I] = {
6226 .type = HDA_FIXUP_FUNC,
6227 .v.func = alc287_fixup_lenovo_yoga_book_9i,
6228 },
6229 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
6230 .type = HDA_FIXUP_VERBS,
6231 .v.verbs = (const struct hda_verb[]) {
6232 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6233 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6234 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6235 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6236 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6237 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6238 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6239 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6240 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6241 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6242 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6243 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6244 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6245 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6246 {}
6247 },
6248 .chained = true,
6249 .chain_id = ALC269_FIXUP_HEADSET_MODE,
6250 },
6251 [ALC256_FIXUP_SET_COEF_DEFAULTS] = {
6252 .type = HDA_FIXUP_FUNC,
6253 .v.func = alc256_fixup_set_coef_defaults,
6254 },
6255 [ALC245_FIXUP_HP_GPIO_LED] = {
6256 .type = HDA_FIXUP_FUNC,
6257 .v.func = alc245_fixup_hp_gpio_led,
6258 },
6259 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
6260 .type = HDA_FIXUP_PINS,
6261 .v.pins = (const struct hda_pintbl[]) {
6262 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
6263 { }
6264 },
6265 .chained = true,
6266 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
6267 },
6268 [ALC233_FIXUP_NO_AUDIO_JACK] = {
6269 .type = HDA_FIXUP_FUNC,
6270 .v.func = alc233_fixup_no_audio_jack,
6271 },
6272 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = {
6273 .type = HDA_FIXUP_FUNC,
6274 .v.func = alc256_fixup_mic_no_presence_and_resume,
6275 .chained = true,
6276 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6277 },
6278 [ALC256_FIXUP_XIAOMI_PRO15_RESUME] = {
6279 .type = HDA_FIXUP_FUNC,
6280 .v.func = alc256_fixup_xiaomi_pro15_resume,
6281 },
6282 [ALC287_FIXUP_LEGION_16ACHG6] = {
6283 .type = HDA_FIXUP_FUNC,
6284 .v.func = alc287_fixup_legion_16achg6_speakers,
6285 },
6286 [ALC287_FIXUP_CS35L41_I2C_2] = {
6287 .type = HDA_FIXUP_FUNC,
6288 .v.func = cs35l41_fixup_i2c_two,
6289 },
6290 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
6291 .type = HDA_FIXUP_FUNC,
6292 .v.func = cs35l41_fixup_i2c_two,
6293 .chained = true,
6294 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6295 },
6296 [ALC287_FIXUP_CS35L41_I2C_4] = {
6297 .type = HDA_FIXUP_FUNC,
6298 .v.func = cs35l41_fixup_i2c_four,
6299 },
6300 [ALC245_FIXUP_CS35L41_SPI_2] = {
6301 .type = HDA_FIXUP_FUNC,
6302 .v.func = cs35l41_fixup_spi_two,
6303 },
6304 [ALC245_FIXUP_CS35L41_SPI_1] = {
6305 .type = HDA_FIXUP_FUNC,
6306 .v.func = cs35l41_fixup_spi_one,
6307 },
6308 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = {
6309 .type = HDA_FIXUP_FUNC,
6310 .v.func = cs35l41_fixup_spi_two,
6311 .chained = true,
6312 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6313 },
6314 [ALC245_FIXUP_CS35L41_SPI_4] = {
6315 .type = HDA_FIXUP_FUNC,
6316 .v.func = cs35l41_fixup_spi_four,
6317 },
6318 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = {
6319 .type = HDA_FIXUP_FUNC,
6320 .v.func = cs35l41_fixup_spi_four,
6321 .chained = true,
6322 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6323 },
6324 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
6325 .type = HDA_FIXUP_VERBS,
6326 .v.verbs = (const struct hda_verb[]) {
6327 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
6328 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
6329 { }
6330 },
6331 .chained = true,
6332 .chain_id = ALC285_FIXUP_HP_MUTE_LED,
6333 },
6334 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
6335 .type = HDA_FIXUP_FUNC,
6336 .v.func = alc_fixup_dell4_mic_no_presence_quiet,
6337 .chained = true,
6338 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
6339 },
6340 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = {
6341 .type = HDA_FIXUP_PINS,
6342 .v.pins = (const struct hda_pintbl[]) {
6343 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
6344 { }
6345 },
6346 .chained = true,
6347 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6348 },
6349 [ALC287_FIXUP_LEGION_16ITHG6] = {
6350 .type = HDA_FIXUP_FUNC,
6351 .v.func = alc287_fixup_legion_16ithg6_speakers,
6352 },
6353 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = {
6354 .type = HDA_FIXUP_VERBS,
6355 .v.verbs = (const struct hda_verb[]) {
6356 // enable left speaker
6357 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6358 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
6359
6360 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6361 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6362 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6363 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
6364 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6365
6366 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6367 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
6368 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6369 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
6370 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6371
6372 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6373 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
6374 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6375 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 },
6376 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6377
6378 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6379 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6380 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6381 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6382 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6383
6384 // enable right speaker
6385 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
6386 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6387
6388 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6389 { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
6390 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6391 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
6392 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6393
6394 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6395 { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
6396 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6397 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
6398 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6399
6400 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6401 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
6402 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6403 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 },
6404 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6405
6406 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
6407 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
6408 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6409 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
6410 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
6411
6412 { },
6413 },
6414 },
6415 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = {
6416 .type = HDA_FIXUP_FUNC,
6417 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
6418 .chained = true,
6419 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
6420 },
6421 [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
6422 .type = HDA_FIXUP_FUNC,
6423 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
6424 .chained = true,
6425 .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
6426 },
6427 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
6428 .type = HDA_FIXUP_FUNC,
6429 .v.func = alc295_fixup_dell_inspiron_top_speakers,
6430 .chained = true,
6431 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
6432 },
6433 [ALC236_FIXUP_DELL_DUAL_CODECS] = {
6434 .type = HDA_FIXUP_PINS,
6435 .v.func = alc1220_fixup_gb_dual_codecs,
6436 .chained = true,
6437 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
6438 },
6439 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = {
6440 .type = HDA_FIXUP_FUNC,
6441 .v.func = cs35l41_fixup_i2c_two,
6442 .chained = true,
6443 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6444 },
6445 [ALC287_FIXUP_TAS2781_I2C] = {
6446 .type = HDA_FIXUP_FUNC,
6447 .v.func = tas2781_fixup_tias_i2c,
6448 .chained = true,
6449 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6450 },
6451 [ALC245_FIXUP_TAS2781_SPI_2] = {
6452 .type = HDA_FIXUP_FUNC,
6453 .v.func = tas2781_fixup_spi,
6454 .chained = true,
6455 .chain_id = ALC285_FIXUP_HP_GPIO_LED,
6456 },
6457 [ALC287_FIXUP_TXNW2781_I2C] = {
6458 .type = HDA_FIXUP_FUNC,
6459 .v.func = tas2781_fixup_txnw_i2c,
6460 .chained = true,
6461 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6462 },
6463 [ALC287_FIXUP_TXNW2781_I2C_ASUS] = {
6464 .type = HDA_FIXUP_FUNC,
6465 .v.func = tas2781_fixup_txnw_i2c,
6466 .chained = true,
6467 .chain_id = ALC294_FIXUP_ASUS_SPK,
6468 },
6469 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
6470 .type = HDA_FIXUP_FUNC,
6471 .v.func = yoga7_14arb7_fixup_i2c,
6472 .chained = true,
6473 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
6474 },
6475 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = {
6476 .type = HDA_FIXUP_FUNC,
6477 .v.func = alc245_fixup_hp_mute_led_coefbit,
6478 },
6479 [ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = {
6480 .type = HDA_FIXUP_FUNC,
6481 .v.func = alc245_fixup_hp_mute_led_v1_coefbit,
6482 },
6483 [ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT] = {
6484 .type = HDA_FIXUP_FUNC,
6485 .v.func = alc245_fixup_hp_mute_led_v2_coefbit,
6486 },
6487 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
6488 .type = HDA_FIXUP_FUNC,
6489 .v.func = alc245_fixup_hp_mute_led_coefbit,
6490 .chained = true,
6491 .chain_id = ALC245_FIXUP_HP_GPIO_LED
6492 },
6493 [ALC287_FIXUP_THINKPAD_I2S_SPK] = {
6494 .type = HDA_FIXUP_FUNC,
6495 .v.func = alc287_fixup_bind_dacs,
6496 .chained = true,
6497 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
6498 },
6499 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = {
6500 .type = HDA_FIXUP_FUNC,
6501 .v.func = alc287_fixup_tb_vmaster_led,
6502 .chained = true,
6503 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
6504 },
6505 [ALC2XX_FIXUP_HEADSET_MIC] = {
6506 .type = HDA_FIXUP_FUNC,
6507 .v.func = alc2xx_fixup_headset_mic,
6508 },
6509 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = {
6510 .type = HDA_FIXUP_FUNC,
6511 .v.func = cs35l41_fixup_spi_two,
6512 .chained = true,
6513 .chain_id = ALC289_FIXUP_DUAL_SPK
6514 },
6515 [ALC294_FIXUP_CS35L41_I2C_2] = {
6516 .type = HDA_FIXUP_FUNC,
6517 .v.func = cs35l41_fixup_i2c_two,
6518 },
6519 [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = {
6520 .type = HDA_FIXUP_FUNC,
6521 .v.func = alc256_fixup_acer_sfg16_micmute_led,
6522 },
6523 [ALC256_FIXUP_HEADPHONE_AMP_VOL] = {
6524 .type = HDA_FIXUP_FUNC,
6525 .v.func = alc256_decrease_headphone_amp_val,
6526 },
6527 [ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = {
6528 .type = HDA_FIXUP_FUNC,
6529 .v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
6530 },
6531 [ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX] = {
6532 .type = HDA_FIXUP_FUNC,
6533 .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
6534 },
6535 [ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
6536 .type = HDA_FIXUP_FUNC,
6537 .v.func = alc245_fixup_hp_zbook_firefly_g12a,
6538 },
6539 [ALC285_FIXUP_ASUS_GA403U] = {
6540 .type = HDA_FIXUP_FUNC,
6541 .v.func = alc285_fixup_asus_ga403u,
6542 },
6543 [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = {
6544 .type = HDA_FIXUP_PINS,
6545 .v.pins = (const struct hda_pintbl[]) {
6546 { 0x19, 0x03a11050 },
6547 { 0x1b, 0x03a11c30 },
6548 { }
6549 },
6550 .chained = true,
6551 .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1
6552 },
6553 [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = {
6554 .type = HDA_FIXUP_FUNC,
6555 .v.func = alc285_fixup_speaker2_to_dac1,
6556 .chained = true,
6557 .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC,
6558 },
6559 [ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = {
6560 .type = HDA_FIXUP_PINS,
6561 .v.pins = (const struct hda_pintbl[]) {
6562 { 0x19, 0x03a11050 },
6563 { 0x1b, 0x03a11c30 },
6564 { }
6565 },
6566 },
6567 [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = {
6568 .type = HDA_FIXUP_FUNC,
6569 .v.func = alc285_fixup_speaker2_to_dac1,
6570 .chained = true,
6571 .chain_id = ALC285_FIXUP_ASUS_GA403U,
6572 },
6573 [ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = {
6574 .type = HDA_FIXUP_FUNC,
6575 .v.func = alc287_fixup_lenovo_thinkpad_with_alc1318,
6576 .chained = true,
6577 .chain_id = ALC269_FIXUP_THINKPAD_ACPI
6578 },
6579 [ALC256_FIXUP_CHROME_BOOK] = {
6580 .type = HDA_FIXUP_FUNC,
6581 .v.func = alc256_fixup_chromebook,
6582 .chained = true,
6583 .chain_id = ALC225_FIXUP_HEADSET_JACK
6584 },
6585 [ALC245_FIXUP_CLEVO_NOISY_MIC] = {
6586 .type = HDA_FIXUP_FUNC,
6587 .v.func = alc269_fixup_limit_int_mic_boost,
6588 .chained = true,
6589 .chain_id = ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
6590 },
6591 [ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE] = {
6592 .type = HDA_FIXUP_PINS,
6593 .v.pins = (const struct hda_pintbl[]) {
6594 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
6595 { 0x1b, 0x20a11040 }, /* dock mic */
6596 { }
6597 },
6598 .chained = true,
6599 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
6600 },
6601 [ALC233_FIXUP_MEDION_MTL_SPK] = {
6602 .type = HDA_FIXUP_PINS,
6603 .v.pins = (const struct hda_pintbl[]) {
6604 { 0x1b, 0x90170110 },
6605 { }
6606 },
6607 },
6608 [ALC233_FIXUP_STARLABS_STARFIGHTER] = {
6609 .type = HDA_FIXUP_FUNC,
6610 .v.func = alc233_fixup_starlabs_starfighter,
6611 },
6612 [ALC294_FIXUP_BASS_SPEAKER_15] = {
6613 .type = HDA_FIXUP_FUNC,
6614 .v.func = alc294_fixup_bass_speaker_15,
6615 },
6616 [ALC283_FIXUP_DELL_HP_RESUME] = {
6617 .type = HDA_FIXUP_FUNC,
6618 .v.func = alc283_fixup_dell_hp_resume,
6619 },
6620 [ALC294_FIXUP_ASUS_CS35L41_SPI_2] = {
6621 .type = HDA_FIXUP_FUNC,
6622 .v.func = cs35l41_fixup_spi_two,
6623 .chained = true,
6624 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC,
6625 },
6626 [ALC274_FIXUP_HP_AIO_BIND_DACS] = {
6627 .type = HDA_FIXUP_FUNC,
6628 .v.func = alc274_fixup_hp_aio_bind_dacs,
6629 },
6630 [ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC] = {
6631 .type = HDA_FIXUP_PINS,
6632 .v.pins = (const struct hda_pintbl[]) {
6633 { 0x19, 0x03a11050 },
6634 { 0x1b, 0x03a11c30 },
6635 { }
6636 },
6637 .chained = true,
6638 .chain_id = ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1
6639 },
6640 [ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1] = {
6641 .type = HDA_FIXUP_FUNC,
6642 .v.func = alc285_fixup_speaker2_to_dac1,
6643 },
6644 [ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC] = {
6645 .type = HDA_FIXUP_FUNC,
6646 .v.func = alc269_fixup_limit_int_mic_boost,
6647 .chained = true,
6648 .chain_id = ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
6649 },
6650 [ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK] = {
6651 .type = HDA_FIXUP_PINS,
6652 .v.pins = (const struct hda_pintbl[]) {
6653 { 0x17, 0x90170151 }, /* Internal Speaker LFE */
6654 { 0x1e, 0x90170150 }, /* Internal Speaker */
6655 { }
6656 },
6657 },
6658 [ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE] = {
6659 .type = HDA_FIXUP_PINS,
6660 .v.pins = (const struct hda_pintbl[]) {
6661 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
6662 { 0x1a, 0x22a190a0 }, /* dock mic */
6663 { }
6664 },
6665 .chained = true,
6666 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
6667 },
6668 [ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED] = {
6669 .type = HDA_FIXUP_FUNC,
6670 .v.func = alc245_tas2781_spi_hp_fixup_muteled,
6671 },
6672 [ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED] = {
6673 .type = HDA_FIXUP_FUNC,
6674 .v.func = alc245_tas2781_i2c_hp_fixup_muteled,
6675 },
6676 [ALC288_FIXUP_SURFACE_SWAP_DACS] = {
6677 .type = HDA_FIXUP_FUNC,
6678 .v.func = alc288_fixup_surface_swap_dacs,
6679 },
6680 [ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY] = {
6681 .type = HDA_FIXUP_FUNC,
6682 .v.func = alc233_fixup_lenovo_gpio2_mic_hotkey,
6683 },
6684 [ALC245_FIXUP_BASS_HP_DAC] = {
6685 .type = HDA_FIXUP_FUNC,
6686 /* Borrow the DAC routing selected for those Thinkpads */
6687 .v.func = alc285_fixup_thinkpad_x1_gen7,
6688 },
6689 [ALC245_FIXUP_ACER_MICMUTE_LED] = {
6690 .type = HDA_FIXUP_FUNC,
6691 .v.func = alc285_fixup_hp_coef_micmute_led,
6692 .chained = true,
6693 .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
6694 },
6695 [ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED] = {
6696 .type = HDA_FIXUP_FUNC,
6697 .v.func = alc245_fixup_hp_mute_led_coefbit,
6698 .chained = true,
6699 .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
6700 },
6701 [ALC236_FIXUP_HP_DMIC] = {
6702 .type = HDA_FIXUP_PINS,
6703 .v.pins = (const struct hda_pintbl[]) {
6704 { 0x12, 0x90a60160 }, /* use as internal mic */
6705 { }
6706 },
6707 },
6708 [ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO] = {
6709 .type = HDA_FIXUP_PINS,
6710 .v.pins = (const struct hda_pintbl[]) {
6711 { 0x14, 0x90170111 },
6712 { 0x19, 0x03a1113c },
6713 { 0x1a, 0x22a190a0 },
6714 { 0x1b, 0x90170110 },
6715 { }
6716 }
6717 },
6718 [ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX] = {
6719 .type = HDA_FIXUP_FUNC,
6720 .v.func = cs35l41_fixup_i2c_two,
6721 .chained = true,
6722 .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS
6723 }
6724 };
6725
6726 static const struct hda_quirk alc269_fixup_tbl[] = {
6727 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
6728 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
6729 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
6730 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
6731 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6732 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
6733 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
6734 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
6735 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
6736 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
6737 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6738 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF),
6739 SND_PCI_QUIRK(0x1025, 0x0943, "Acer Aspire V3-572G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
6740 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
6741 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK),
6742 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6743 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
6744 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
6745 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
6746 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6747 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6748 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
6749 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
6750 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
6751 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
6752 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
6753 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
6754 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
6755 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
6756 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6757 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6758 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6759 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6760 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
6761 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6762 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6763 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6764 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
6765 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
6766 SND_PCI_QUIRK(0x1025, 0x1360, "Acer Aspire A115", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6767 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6768 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6769 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
6770 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
6771 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
6772 SND_PCI_QUIRK(0x1025, 0x1539, "Acer Nitro 5 AN515-57", ALC2XX_FIXUP_HEADSET_MIC),
6773 SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
6774 SND_PCI_QUIRK(0x1025, 0x1597, "Acer Nitro 5 AN517-55", ALC2XX_FIXUP_HEADSET_MIC),
6775 SND_PCI_QUIRK(0x1025, 0x160e, "Acer PT316-51S", ALC2XX_FIXUP_HEADSET_MIC),
6776 SND_PCI_QUIRK(0x1025, 0x1640, "Acer Aspire A315-44P", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
6777 SND_PCI_QUIRK(0x1025, 0x1679, "Acer Nitro 16 AN16-41", ALC2XX_FIXUP_HEADSET_MIC),
6778 SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
6779 SND_PCI_QUIRK(0x1025, 0x171e, "Acer Nitro ANV15-51", ALC245_FIXUP_ACER_MICMUTE_LED),
6780 SND_PCI_QUIRK(0x1025, 0x173a, "Acer Swift SFG14-73", ALC245_FIXUP_ACER_MICMUTE_LED),
6781 SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6782 SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6783 SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
6784 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
6785 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
6786 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
6787 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
6788 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
6789 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
6790 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
6791 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
6792 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6793 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6794 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
6795 SND_PCI_QUIRK(0x1028, 0x0604, "Dell Venue 11 Pro 7130", ALC283_FIXUP_DELL_HP_RESUME),
6796 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
6797 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
6798 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X),
6799 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
6800 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
6801 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6802 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6803 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
6804 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
6805 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK),
6806 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
6807 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6808 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6809 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6810 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6811 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6812 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6813 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
6814 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
6815 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
6816 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP),
6817 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME),
6818 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
6819 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
6820 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3),
6821 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
6822 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6823 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6824 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
6825 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
6826 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
6827 SND_PCI_QUIRK(0x1028, 0x0879, "Dell Latitude 5420 Rugged", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6828 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
6829 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
6830 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
6831 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
6832 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK),
6833 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
6834 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
6835 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
6836 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
6837 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
6838 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
6839 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
6840 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
6841 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6842 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6843 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
6844 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
6845 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
6846 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2),
6847 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6848 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6849 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6850 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
6851 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6852 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6853 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6854 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
6855 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
6856 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
6857 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
6858 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
6859 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
6860 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
6861 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
6862 SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC295_FIXUP_DELL_TAS2781_I2C),
6863 SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC295_FIXUP_DELL_TAS2781_I2C),
6864 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6865 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6866 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6867 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6868 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6869 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6870 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6871 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
6872 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
6873 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6874 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
6875 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
6876 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
6877 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
6878 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6879 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6880 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6881 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6882 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
6883 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6884 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6885 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6886 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6887 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6888 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6889 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6890 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6891 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6892 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6893 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6894 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6895 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6896 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED),
6897 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY),
6898 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6899 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6900 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6901 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6902 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6903 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6904 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6905 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6906 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
6907 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6908 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS),
6909 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6910 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS),
6911 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6912 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6913 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6914 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6915 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6916 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6917 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6918 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6919 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6920 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6921 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6922 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6923 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6924 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6925 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M),
6926 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6927 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
6928 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6929 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6930 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6931 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
6932 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
6933 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6934 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6935 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
6936 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
6937 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360),
6938 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
6939 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
6940 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6941 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6942 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6943 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6944 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6945 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6946 SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED),
6947 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6948 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
6949 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6950 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
6951 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6952 SND_PCI_QUIRK(0x103c, 0x8548, "HP EliteBook x360 830 G6", ALC285_FIXUP_HP_GPIO_LED),
6953 SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED),
6954 SND_PCI_QUIRK(0x103c, 0x856a, "HP Pavilion 15-cs1xxx", ALC295_FIXUP_HP_PAVILION_MUTE_LED_1B),
6955 SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
6956 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
6957 SND_PCI_QUIRK(0x103c, 0x8603, "HP Omen 17-cb0xxx", ALC285_FIXUP_HP_MUTE_LED),
6958 SND_PCI_QUIRK(0x103c, 0x860c, "HP ZBook 17 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6959 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6960 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6961 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
6962 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6963 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
6964 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6965 SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
6966 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
6967 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
6968 SND_PCI_QUIRK(0x103c, 0x8706, "HP Laptop 15s-eq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6969 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6970 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6971 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
6972 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
6973 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
6974 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6975 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
6976 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
6977 SND_PCI_QUIRK(0x103c, 0x8756, "HP ENVY Laptop 13-ba0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6978 SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
6979 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
6980 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
6981 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
6982 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
6983 ALC285_FIXUP_HP_GPIO_AMP_INIT),
6984 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
6985 ALC285_FIXUP_HP_GPIO_AMP_INIT),
6986 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6987 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6988 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
6989 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6990 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
6991 SND_PCI_QUIRK(0x103c, 0x87cb, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
6992 SND_PCI_QUIRK(0x103c, 0x87cc, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
6993 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
6994 SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6995 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6996 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6997 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6998 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
6999 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
7000 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
7001 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
7002 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
7003 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7004 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7005 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7006 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7007 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7008 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
7009 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7010 SND_PCI_QUIRK(0x103c, 0x881e, "HP Laptop 15s-du3xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7011 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7012 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7013 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7014 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
7015 HDA_CODEC_QUIRK(0x103c, 0x885b, "HP Spectre x360 14-ea", ALC245_FIXUP_HP_X360_AMP),
7016 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7017 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7018 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7019 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7020 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
7021 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7022 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7023 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7024 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
7025 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
7026 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
7027 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7028 SND_PCI_QUIRK(0x103c, 0x88b3, "HP ENVY x360 Convertible 15-es0xxx", ALC245_FIXUP_HP_ENVY_X360_MUTE_LED),
7029 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
7030 SND_PCI_QUIRK(0x103c, 0x88d1, "HP Pavilion 15-eh1xxx (mainboard 88D1)", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
7031 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED),
7032 SND_PCI_QUIRK(0x103c, 0x88eb, "HP Victus 16-e0xxx", ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT),
7033 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
7034 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7035 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
7036 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7037 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7038 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7039 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7040 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7041 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7042 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7043 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
7044 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
7045 SND_PCI_QUIRK(0x103c, 0x898a, "HP Pavilion 15-eg100", ALC287_FIXUP_HP_GPIO_LED),
7046 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
7047 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
7048 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7049 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
7050 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7051 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
7052 SND_PCI_QUIRK(0x103c, 0x89a0, "HP Laptop 15-dw4xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7053 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
7054 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
7055 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
7056 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
7057 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
7058 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7059 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7060 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7061 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7062 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7063 SND_PCI_QUIRK(0x103c, 0x89da, "HP Spectre x360 14t-ea100", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7064 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7065 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
7066 SND_PCI_QUIRK(0x103c, 0x8a1f, "HP Laptop 14s-dr5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7067 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7068 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7069 SND_PCI_QUIRK(0x103c, 0x8a26, "HP Victus 16-d1xxx (MB 8A26)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7070 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2),
7071 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7072 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7073 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7074 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7075 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7076 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7077 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7078 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7079 SND_PCI_QUIRK(0x103c, 0x8a34, "HP Pavilion x360 2-in-1 Laptop 14-ek0xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7080 SND_PCI_QUIRK(0x103c, 0x8a3d, "HP Victus 15-fb0xxx (MB 8A3D)", ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT),
7081 SND_PCI_QUIRK(0x103c, 0x8a4f, "HP Victus 15-fa0xxx (MB 8A4F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7082 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4),
7083 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7084 SND_PCI_QUIRK(0x103c, 0x8a75, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7085 SND_PCI_QUIRK(0x103c, 0x8a76, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7086 SND_PCI_QUIRK(0x103c, 0x8a77, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
7087 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
7088 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
7089 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
7090 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
7091 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
7092 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED),
7093 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7094 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7095 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7096 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7097 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7098 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7099 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7100 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED),
7101 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7102 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7103 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7104 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7105 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7106 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7107 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7108 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7109 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7110 SND_PCI_QUIRK(0x103c, 0x8b5f, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7111 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7112 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7113 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7114 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7115 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7116 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7117 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2),
7118 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
7119 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
7120 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),
7121 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED),
7122 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED),
7123 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED),
7124 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7125 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7126 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7127 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7128 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
7129 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
7130 SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7131 SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7132 SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
7133 SND_PCI_QUIRK(0x103c, 0x8bd4, "HP Victus 16-s0xxx (MB 8BD4)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7134 SND_PCI_QUIRK(0x103c, 0x8bd6, "HP Pavilion Aero Laptop 13z-be200", ALC287_FIXUP_HP_GPIO_LED),
7135 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7136 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7137 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7138 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7139 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7140 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7141 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7142 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7143 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7144 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7145 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7146 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy x360 2-in-1 Laptop 15-fh0xxx", ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX),
7147 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
7148 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7149 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
7150 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
7151 SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7152 SND_PCI_QUIRK(0x103c, 0x8c2d, "HP Victus 15-fa1xxx (MB 8C2D)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7153 SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7154 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7155 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7156 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7157 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7158 SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
7159 SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2),
7160 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
7161 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7162 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7163 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC285_FIXUP_HP_GPIO_LED),
7164 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED),
7165 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7166 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7167 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
7168 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
7169 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7170 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7171 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7172 SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7173 SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7174 SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7175 SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7176 SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7177 SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7178 SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7179 SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
7180 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
7181 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
7182 SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED),
7183 SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
7184 SND_PCI_QUIRK(0x103c, 0x8c8f, "HP EliteBook 630 G11", ALC236_FIXUP_HP_GPIO_LED),
7185 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
7186 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
7187 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7188 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7189 SND_PCI_QUIRK(0x103c, 0x8c99, "HP Victus 16-r1xxx (MB 8C99)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7190 SND_PCI_QUIRK(0x103c, 0x8c9c, "HP Victus 16-s1xxx (MB 8C9C)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7191 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
7192 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
7193 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7194 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
7195 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7196 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
7197 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7198 SND_PCI_QUIRK(0x103c, 0x8cde, "HP OmniBook Ultra Flip Laptop 14t", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
7199 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7200 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
7201 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
7202 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7203 SND_PCI_QUIRK(0x103c, 0x8d07, "HP Victus 15-fb2xxx (MB 8D07)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7204 SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
7205 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED),
7206 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7207 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7208 SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 13 G12", ALC285_FIXUP_HP_GPIO_LED),
7209 SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite X360 13 G12", ALC285_FIXUP_HP_GPIO_LED),
7210 SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7211 SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7212 SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7213 SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED),
7214 SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7215 SND_PCI_QUIRK(0x103c, 0x8dcd, "HP Victus 15-fa2xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
7216 SND_PCI_QUIRK(0x103c, 0x8d9b, "HP 17 Turbine OmniBook 7 UMA", ALC287_FIXUP_CS35L41_I2C_2),
7217 SND_PCI_QUIRK(0x103c, 0x8d9c, "HP 17 Turbine OmniBook 7 DIS", ALC287_FIXUP_CS35L41_I2C_2),
7218 SND_PCI_QUIRK(0x103c, 0x8d9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7219 SND_PCI_QUIRK(0x103c, 0x8d9e, "HP 17 Turbine OmniBook X DIS", ALC287_FIXUP_CS35L41_I2C_2),
7220 SND_PCI_QUIRK(0x103c, 0x8d9f, "HP 14 Cadet (x360)", ALC287_FIXUP_CS35L41_I2C_2),
7221 SND_PCI_QUIRK(0x103c, 0x8da0, "HP 16 Clipper OmniBook 7(X360)", ALC287_FIXUP_CS35L41_I2C_2),
7222 SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7223 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7224 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7225 SND_PCI_QUIRK(0x103c, 0x8dc9, "HP Laptop 15-fc0xxx", ALC236_FIXUP_HP_DMIC),
7226 SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
7227 SND_PCI_QUIRK(0x103c, 0x8dd7, "HP Laptop 15-fd0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
7228 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
7229 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
7230 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
7231 SND_PCI_QUIRK(0x103c, 0x8ded, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
7232 SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
7233 SND_PCI_QUIRK(0x103c, 0x8def, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED),
7234 SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
7235 SND_PCI_QUIRK(0x103c, 0x8df1, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED),
7236 SND_PCI_QUIRK(0x103c, 0x8dfb, "HP EliteBook 6 G1a 14", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7237 SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED),
7238 SND_PCI_QUIRK(0x103c, 0x8dfd, "HP EliteBook 6 G1a 16", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7239 SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED),
7240 SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7241 SND_PCI_QUIRK(0x103c, 0x8e12, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7242 SND_PCI_QUIRK(0x103c, 0x8e13, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2),
7243 SND_PCI_QUIRK(0x103c, 0x8e14, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7244 SND_PCI_QUIRK(0x103c, 0x8e15, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7245 SND_PCI_QUIRK(0x103c, 0x8e16, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7246 SND_PCI_QUIRK(0x103c, 0x8e17, "HP ZBook Firefly 14 G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7247 SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7248 SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7249 SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7250 SND_PCI_QUIRK(0x103c, 0x8e1b, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7251 SND_PCI_QUIRK(0x103c, 0x8e1c, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
7252 SND_PCI_QUIRK(0x103c, 0x8e1d, "HP ZBook X Gli 16 G12", ALC236_FIXUP_HP_GPIO_LED),
7253 SND_PCI_QUIRK(0x103c, 0x8e2c, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
7254 SND_PCI_QUIRK(0x103c, 0x8e36, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7255 SND_PCI_QUIRK(0x103c, 0x8e37, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
7256 SND_PCI_QUIRK(0x103c, 0x8e3a, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
7257 SND_PCI_QUIRK(0x103c, 0x8e3b, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
7258 SND_PCI_QUIRK(0x103c, 0x8e60, "HP OmniBook 7 Laptop 16-bh0xxx", ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED),
7259 SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
7260 SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
7261 SND_PCI_QUIRK(0x103c, 0x8e75, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
7262 SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7263 SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2),
7264 SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7265 SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
7266 SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7267 SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7268 SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7269 SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7270 SND_PCI_QUIRK(0x103c, 0x8ec5, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7271 SND_PCI_QUIRK(0x103c, 0x8ece, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7272 SND_PCI_QUIRK(0x103c, 0x8ecf, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7273 SND_PCI_QUIRK(0x103c, 0x8ed2, "HP Abe I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7274 SND_PCI_QUIRK(0x103c, 0x8ed5, "HP EliteBook 8 Flip G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7275 SND_PCI_QUIRK(0x103c, 0x8ed6, "HP EliteBook 8 G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7276 SND_PCI_QUIRK(0x103c, 0x8ed7, "HP EliteBook 8 G2i 14", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7277 SND_PCI_QUIRK(0x103c, 0x8ed8, "HP EliteBook 8 G2i 16", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7278 SND_PCI_QUIRK(0x103c, 0x8ed9, "HP ZBook Firefly 14W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7279 SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
7280 SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7281 SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7282 SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
7283 SND_PCI_QUIRK(0x103c, 0x8f07, "HP Agusta G7KX", ALC287_FIXUP_CS35L41_I2C_2),
7284 SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
7285 SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
7286 SND_PCI_QUIRK(0x103c, 0x8f2d, "HP Auster 14", ALC287_FIXUP_CS35L41_I2C_2),
7287 SND_PCI_QUIRK(0x103c, 0x8f2e, "HP Auster 14", ALC287_FIXUP_CS35L41_I2C_2),
7288 SND_PCI_QUIRK(0x103c, 0x8f3c, "HP EliteBook 6 G2a", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7289 SND_PCI_QUIRK(0x103c, 0x8f3d, "HP EliteBook 6 G2a", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
7290 SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7291 SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7292 SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7293 SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
7294 SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
7295 SND_PCI_QUIRK(0x1043, 0x1024, "ASUS Zephyrus G14 2025", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
7296 SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7297 SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7298 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
7299 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
7300 SND_PCI_QUIRK(0x1043, 0x1054, "ASUS G614FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
7301 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7302 SND_PCI_QUIRK(0x1043, 0x106f, "ASUS VivoBook X515UA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7303 SND_PCI_QUIRK(0x1043, 0x1074, "ASUS G614PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
7304 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
7305 SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C),
7306 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
7307 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7308 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
7309 SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C),
7310 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7311 SND_PCI_QUIRK(0x1043, 0x1194, "ASUS UM3406KA", ALC287_FIXUP_CS35L41_I2C_2),
7312 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7313 HDA_CODEC_QUIRK(0x1043, 0x1204, "ASUS Strix G16 G615JMR", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7314 SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C),
7315 SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TAS2781_I2C),
7316 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7317 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7318 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
7319 SND_PCI_QUIRK(0x1043, 0x1294, "ASUS B3405CVA", ALC245_FIXUP_CS35L41_SPI_2),
7320 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
7321 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM),
7322 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
7323 SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7324 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7325 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7326 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
7327 SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
7328 SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7329 SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
7330 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7331 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
7332 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
7333 SND_PCI_QUIRK(0x1043, 0x1454, "ASUS PM3406CKA", ALC287_FIXUP_CS35L41_I2C_2),
7334 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7335 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
7336 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC),
7337 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7338 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7339 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
7340 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2),
7341 SND_PCI_QUIRK(0x1043, 0x14f2, "ASUS VivoBook X515JA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7342 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2),
7343 SND_PCI_QUIRK(0x1043, 0x1514, "ASUS ROG Flow Z13 GZ302EAC", ALC287_FIXUP_CS35L41_I2C_2),
7344 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
7345 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2),
7346 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC),
7347 SND_PCI_QUIRK(0x1043, 0x1584, "ASUS UM3406GA ", ALC287_FIXUP_CS35L41_I2C_2),
7348 SND_PCI_QUIRK(0x1043, 0x1602, "ASUS ROG Strix SCAR 15", ALC285_FIXUP_ASUS_G533Z_PINS),
7349 SND_PCI_QUIRK(0x1043, 0x1652, "ASUS ROG Zephyrus Do 15 SE", ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK),
7350 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
7351 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC),
7352 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2),
7353 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
7354 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
7355 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2),
7356 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
7357 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2),
7358 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
7359 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
7360 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
7361 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
7362 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
7363 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
7364 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2),
7365 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
7366 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
7367 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
7368 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
7369 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
7370 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
7371 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
7372 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC294_FIXUP_ASUS_SPI_HEADSET_MIC),
7373 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2),
7374 SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7375 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
7376 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
7377 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
7378 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
7379 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
7380 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC),
7381 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7382 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
7383 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
7384 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
7385 SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7386 SND_PCI_QUIRK(0x1043, 0x1c80, "ASUS VivoBook TP401", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7387 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
7388 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
7389 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7390 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7391 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2),
7392 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2),
7393 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC),
7394 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2),
7395 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
7396 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
7397 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2),
7398 SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606WA", ALC294_FIXUP_BASS_SPEAKER_15),
7399 SND_PCI_QUIRK(0x1043, 0x1264, "ASUS UM5606KA", ALC294_FIXUP_BASS_SPEAKER_15),
7400 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
7401 SND_PCI_QUIRK(0x1043, 0x1e10, "ASUS VivoBook X507UAR", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7402 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
7403 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
7404 SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC),
7405 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
7406 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
7407 SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7408 SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
7409 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
7410 SND_PCI_QUIRK(0x1043, 0x1e93, "ASUS ExpertBook B9403CVAR", ALC294_FIXUP_ASUS_HPE),
7411 SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RCLA72", ALC287_FIXUP_TAS2781_I2C),
7412 SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2),
7413 HDA_CODEC_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1),
7414 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2),
7415 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),
7416 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
7417 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2),
7418 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
7419 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
7420 SND_PCI_QUIRK(0x1043, 0x1f63, "ASUS P5405CSA", ALC245_FIXUP_CS35L41_SPI_2),
7421 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
7422 SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC287_FIXUP_CS35L41_I2C_2),
7423 SND_PCI_QUIRK(0x1043, 0x3011, "ASUS B5605CVA", ALC245_FIXUP_CS35L41_SPI_2),
7424 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
7425 SND_PCI_QUIRK(0x1043, 0x3061, "ASUS B3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7426 SND_PCI_QUIRK(0x1043, 0x3071, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7427 SND_PCI_QUIRK(0x1043, 0x30c1, "ASUS B3605CCA / P3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7428 SND_PCI_QUIRK(0x1043, 0x30d1, "ASUS B5405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7429 SND_PCI_QUIRK(0x1043, 0x30e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7430 SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27),
7431 SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7432 SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
7433 SND_PCI_QUIRK(0x1043, 0x3391, "ASUS PM3606CKA", ALC287_FIXUP_CS35L41_I2C_2),
7434 SND_PCI_QUIRK(0x1043, 0x3601, "ASUS PM5406CGA", ALC287_FIXUP_CS35L41_I2C_2),
7435 SND_PCI_QUIRK(0x1043, 0x3611, "ASUS PM5606CGA", ALC287_FIXUP_CS35L41_I2C_2),
7436 SND_PCI_QUIRK(0x1043, 0x3701, "ASUS P5406CCA", ALC245_FIXUP_CS35L41_SPI_2),
7437 SND_PCI_QUIRK(0x1043, 0x3711, "ASUS P5606CCA", ALC245_FIXUP_CS35L41_SPI_2),
7438 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7439 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7440 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7441 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7442 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
7443 SND_PCI_QUIRK(0x1043, 0x3d78, "ASUS GA603KH", ALC287_FIXUP_CS35L41_I2C_2),
7444 SND_PCI_QUIRK(0x1043, 0x3d88, "ASUS GA603KM", ALC287_FIXUP_CS35L41_I2C_2),
7445 SND_PCI_QUIRK(0x1043, 0x3e00, "ASUS G814FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
7446 SND_PCI_QUIRK(0x1043, 0x3e20, "ASUS G814PH/PM/PP", ALC287_FIXUP_CS35L41_I2C_2),
7447 SND_PCI_QUIRK(0x1043, 0x3e30, "ASUS TP3607SA", ALC287_FIXUP_TAS2781_I2C),
7448 SND_PCI_QUIRK(0x1043, 0x3ee0, "ASUS Strix G815_JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C),
7449 SND_PCI_QUIRK(0x1043, 0x3ef0, "ASUS Strix G635LR_LW_LX", ALC287_FIXUP_TAS2781_I2C),
7450 SND_PCI_QUIRK(0x1043, 0x3f00, "ASUS Strix G815LH_LM_LP", ALC287_FIXUP_TAS2781_I2C),
7451 SND_PCI_QUIRK(0x1043, 0x3f10, "ASUS Strix G835LR_LW_LX", ALC287_FIXUP_TAS2781_I2C),
7452 SND_PCI_QUIRK(0x1043, 0x3f20, "ASUS Strix G615LR_LW", ALC287_FIXUP_TAS2781_I2C),
7453 SND_PCI_QUIRK(0x1043, 0x3f30, "ASUS Strix G815LR_LW", ALC287_FIXUP_TAS2781_I2C),
7454 SND_PCI_QUIRK(0x1043, 0x3fd0, "ASUS B3605CVA", ALC245_FIXUP_CS35L41_SPI_2),
7455 SND_PCI_QUIRK(0x1043, 0x3ff0, "ASUS B5405CVA", ALC245_FIXUP_CS35L41_SPI_2),
7456 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
7457 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
7458 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
7459 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
7460 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
7461 SND_PCI_QUIRK(0x1043, 0x88f4, "ASUS NUC14LNS", ALC245_FIXUP_CS35L41_SPI_1),
7462 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
7463 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
7464 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
7465 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
7466 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7467 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7468 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
7469 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
7470 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
7471 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
7472 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
7473 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
7474 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
7475 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
7476 SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7477 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7478 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7479 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7480 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7481 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7482 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7483 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
7484 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7485 SND_PCI_QUIRK(0x1414, 0x9c20, "Microsoft Surface Pro 2/3", ALC288_FIXUP_SURFACE_SWAP_DACS),
7486 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
7487 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
7488 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
7489 SND_PCI_QUIRK(0x144d, 0xc188, "Samsung Galaxy Book Flex (NT950QCT-A38A)", ALC298_FIXUP_SAMSUNG_AMP),
7490 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Book Flex (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
7491 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
7492 SND_PCI_QUIRK(0x144d, 0xc1ac, "Samsung Galaxy Book2 Pro 360 (NP950QED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7493 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
7494 SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP),
7495 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
7496 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
7497 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
7498 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
7499 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7500 SND_PCI_QUIRK(0x144d, 0xc876, "Samsung 730QED (NP730QED-KA2US)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7501 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
7502 SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7503 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
7504 SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7505 SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
7506 SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7507 SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7508 SND_PCI_QUIRK(0x144d, 0xc1cb, "Samsung Galaxy Book3 Pro 360 (NP965QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7509 SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7510 SND_PCI_QUIRK(0x1458, 0x900e, "Gigabyte G5 KF5 (2023)", ALC2XX_FIXUP_HEADSET_MIC),
7511 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
7512 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
7513 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
7514 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
7515 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC),
7516 SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7517 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7518 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7519 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7520 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7521 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7522 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7523 SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7524 SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC),
7525 SND_PCI_QUIRK(0x1558, 0x35a1, "Clevo V3[56]0EN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7526 SND_PCI_QUIRK(0x1558, 0x35b1, "Clevo V3[57]0WN[MNP]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7527 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7528 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7529 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7530 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7531 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7532 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7533 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7534 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7535 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7536 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7537 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7538 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7539 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7540 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7541 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7542 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7543 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7544 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7545 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7546 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7547 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7548 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7549 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7550 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7551 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7552 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7553 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7554 SND_PCI_QUIRK(0x1558, 0x5700, "Clevo X560WN[RST]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7555 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7556 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7557 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7558 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7559 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7560 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7561 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7562 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7563 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7564 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7565 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7566 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7567 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7568 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7569 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7570 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7571 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7572 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
7573 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
7574 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
7575 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7576 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7577 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7578 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7579 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7580 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
7581 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7582 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7583 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7584 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7585 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7586 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7587 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7588 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7589 SND_PCI_QUIRK(0x1558, 0xa554, "VAIO VJFH52", ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE),
7590 SND_PCI_QUIRK(0x1558, 0xa559, "VAIO RPL", ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE),
7591 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7592 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7593 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7594 SND_PCI_QUIRK(0x1558, 0xa741, "Clevo V54x_6x_TNE", ALC245_FIXUP_CLEVO_NOISY_MIC),
7595 SND_PCI_QUIRK(0x1558, 0xa743, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
7596 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC),
7597 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7598 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7599 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7600 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7601 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7602 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
7603 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
7604 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
7605 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
7606 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
7607 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
7608 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
7609 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
7610 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
7611 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST),
7612 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
7613 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
7614 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
7615 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
7616 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440),
7617 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK),
7618 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
7619 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK),
7620 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK),
7621 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK),
7622 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7623 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
7624 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
7625 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
7626 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7627 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7628 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
7629 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
7630 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C),
7631 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK),
7632 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7633 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7634 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460),
7635 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7636 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7637 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7638 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7639 SND_PCI_QUIRK(0x17aa, 0x2288, "Thinkpad X390", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
7640 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
7641 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK),
7642 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
7643 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK),
7644 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7645 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7646 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7647 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7648 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7649 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7650 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7651 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7652 SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
7653 SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
7654 SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C),
7655 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7656 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7657 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7658 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7659 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7660 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7661 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7662 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7663 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7664 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
7665 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
7666 SND_PCI_QUIRK(0x17aa, 0x3341, "Lenovo ThinkCentre M90 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
7667 SND_PCI_QUIRK(0x17aa, 0x3342, "Lenovo ThinkCentre M90 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
7668 SND_PCI_QUIRK(0x17aa, 0x3343, "Lenovo ThinkCentre M70 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
7669 SND_PCI_QUIRK(0x17aa, 0x3344, "Lenovo ThinkCentre M70 Gen4", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
7670 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
7671 SND_PCI_QUIRK(0x17aa, 0x334f, "Lenovo ThinkCentre M90a Gen5", ALC233_FIXUP_LENOVO_GPIO2_MIC_HOTKEY),
7672 SND_PCI_QUIRK(0x17aa, 0x3384, "ThinkCentre M90a PRO", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7673 SND_PCI_QUIRK(0x17aa, 0x3386, "ThinkCentre M90a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7674 SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED),
7675 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7676 HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7677 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
7678 /* Yoga Pro 9 16IMH9 shares PCI SSID 17aa:3811 with Legion S7 15IMH05;
7679 * use codec SSID to distinguish them
7680 */
7681 HDA_CODEC_QUIRK(0x17aa, 0x38d6, "Lenovo Yoga Pro 9 16IMH9", ALC287_FIXUP_TAS2781_I2C),
7682 SND_PCI_QUIRK(0x17aa, 0x3811, "Legion S7 15IMH05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
7683 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
7684 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
7685 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
7686 HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
7687 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7688 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
7689 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
7690 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7691 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
7692 SND_PCI_QUIRK(0x17aa, 0x3843, "Lenovo Yoga 9i / Yoga Book 9i", ALC287_FIXUP_LENOVO_YOGA_BOOK_9I),
7693 /* Yoga Pro 7 14IMH9 shares PCI SSID 17aa:3847 with Legion 7 16ACHG6;
7694 * use codec SSID to distinguish them
7695 */
7696 HDA_CODEC_QUIRK(0x17aa, 0x38cf, "Lenovo Yoga Pro 7 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
7697 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6),
7698 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7699 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7700 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
7701 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
7702 SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
7703 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
7704 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7705 HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
7706 SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1),
7707 HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
7708 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
7709 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
7710 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
7711 SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
7712 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
7713 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
7714 SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C),
7715 SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C),
7716 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C),
7717 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7718 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7719 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
7720 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7721 SND_PCI_QUIRK(0x17aa, 0x38a5, "Y580P AMD dual", ALC287_FIXUP_TAS2781_I2C),
7722 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
7723 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C),
7724 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7725 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7726 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
7727 HDA_CODEC_QUIRK(0x17aa, 0x391c, "Lenovo Yoga 7 2-in-1 14AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7728 HDA_CODEC_QUIRK(0x17aa, 0x391d, "Lenovo Yoga 7 2-in-1 16AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7729 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2),
7730 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
7731 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
7732 SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C),
7733 SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C),
7734 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
7735 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
7736 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
7737 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
7738 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C),
7739 SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7740 SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7741 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7742 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
7743 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
7744 SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C),
7745 SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C),
7746 SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C),
7747 SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C),
7748 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
7749 SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C),
7750 SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C),
7751 SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C),
7752 SND_PCI_QUIRK(0x17aa, 0x38df, "Y990 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
7753 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7754 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7755 SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
7756 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
7757 SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7758 SND_PCI_QUIRK(0x17aa, 0x3911, "Lenovo Yoga Pro 7 14IAH10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7759 SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
7760 SND_PCI_QUIRK(0x17aa, 0x391a, "Lenovo Yoga Slim 7 14AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
7761 SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
7762 SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
7763 SND_PCI_QUIRK(0x17aa, 0x3929, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7764 SND_PCI_QUIRK(0x17aa, 0x392b, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
7765 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
7766 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
7767 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
7768 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7769 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
7770 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
7771 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7772 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
7773 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
7774 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
7775 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
7776 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
7777 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
7778 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
7779 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
7780 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7781 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7782 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7783 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
7784 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7785 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7786 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
7787 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
7788 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
7789 SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK),
7790 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
7791 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
7792 SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL),
7793 SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL),
7794 SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7795 SND_PCI_QUIRK(0x1854, 0x0489, "LG gram 16 (16Z90R-A)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7796 SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
7797 SND_PCI_QUIRK(0x1854, 0x0490, "LG Gram Style 14 (14Z90RS)", ALC298_FIXUP_LG_GRAM_STYLE_14),
7798 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
7799 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
7800 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC),
7801 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
7802 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
7803 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
7804 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
7805 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
7806 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
7807 SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7808 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
7809 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
7810 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
7811 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
7812 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7813 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7814 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
7815 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
7816 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
7817 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
7818 SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
7819 SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
7820 SND_PCI_QUIRK(0x1d05, 0x300f, "TongFang X6AR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
7821 SND_PCI_QUIRK(0x1d05, 0x3019, "TongFang X6FR5xxY", ALC2XX_FIXUP_HEADSET_MIC),
7822 SND_PCI_QUIRK(0x1d05, 0x3031, "TongFang X6AR55xU", ALC2XX_FIXUP_HEADSET_MIC),
7823 SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
7824 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
7825 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
7826 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
7827 SND_PCI_QUIRK(0x1d72, 0x1905, "Xiaomi Mi Laptop Pro 15", ALC256_FIXUP_XIAOMI_PRO15_RESUME),
7828 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
7829 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
7830 SND_PCI_QUIRK(0x1e39, 0xca14, "MEDION NM14LNL", ALC233_FIXUP_MEDION_MTL_SPK),
7831 SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
7832 SND_PCI_QUIRK(0x1ee7, 0x2081, "HONOR MRB-XXX M1020", ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO),
7833 SND_PCI_QUIRK(0x1f4c, 0xe001, "Minisforum V3 (SE)", ALC245_FIXUP_BASS_HP_DAC),
7834 SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
7835 SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7836 SND_PCI_QUIRK(0x2039, 0x0001, "Inspur S14-G1", ALC295_FIXUP_CHROME_BOOK),
7837 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
7838 SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13),
7839 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
7840 SND_PCI_QUIRK(0x2782, 0x1407, "Positivo P15X", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
7841 SND_PCI_QUIRK(0x2782, 0x1409, "Positivo K116J", ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC),
7842 SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX),
7843 SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX),
7844 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
7845 SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK),
7846 SND_PCI_QUIRK(0x7017, 0x2014, "Star Labs StarFighter", ALC233_FIXUP_STARLABS_STARFIGHTER),
7847 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
7848 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
7849 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
7850 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
7851 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7852 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7853 SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7854 SND_PCI_QUIRK(0xf111, 0x000b, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7855 SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7856 SND_PCI_QUIRK(0xf111, 0x000f, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
7857
7858 #if 0
7859 /* Below is a quirk table taken from the old code.
7860 * Basically the device should work as is without the fixup table.
7861 * If BIOS doesn't give a proper info, enable the corresponding
7862 * fixup entry.
7863 */
7864 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
7865 ALC269_FIXUP_AMIC),
7866 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
7867 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC),
7868 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC),
7869 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC),
7870 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC),
7871 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC),
7872 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC),
7873 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC),
7874 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC),
7875 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC),
7876 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC),
7877 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC),
7878 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC),
7879 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC),
7880 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC),
7881 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC),
7882 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC),
7883 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC),
7884 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC),
7885 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC),
7886 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC),
7887 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC),
7888 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC),
7889 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC),
7890 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC),
7891 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC),
7892 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC),
7893 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC),
7894 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC),
7895 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC),
7896 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC),
7897 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC),
7898 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC),
7899 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC),
7900 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC),
7901 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC),
7902 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC),
7903 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC),
7904 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC),
7905 #endif
7906 {}
7907 };
7908
7909 static const struct hda_quirk alc269_fixup_vendor_tbl[] = {
7910 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
7911 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
7912 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
7913 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo XPAD", ALC269_FIXUP_LENOVO_XPAD_ACPI),
7914 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED),
7915 {}
7916 };
7917
7918 static const struct hda_model_fixup alc269_fixup_models[] = {
7919 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
7920 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
7921 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
7922 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
7923 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
7924 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
7925 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
7926 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
7927 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
7928 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
7929 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
7930 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
7931 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
7932 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
7933 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
7934 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
7935 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
7936 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
7937 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
7938 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
7939 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
7940 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
7941 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
7942 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
7943 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
7944 {.id = ALC233_FIXUP_STARLABS_STARFIGHTER, .name = "starlabs-starfighter"},
7945 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
7946 {.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"},
7947 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
7948 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
7949 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
7950 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
7951 {.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"},
7952 {.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"},
7953 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
7954 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
7955 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
7956 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
7957 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
7958 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
7959 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
7960 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
7961 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
7962 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
7963 {.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"},
7964 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
7965 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
7966 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
7967 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
7968 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
7969 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
7970 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
7971 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
7972 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
7973 {.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"},
7974 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
7975 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
7976 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
7977 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
7978 {.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"},
7979 {.id = ALC269_FIXUP_LENOVO_XPAD_ACPI, .name = "lenovo-xpad-led"},
7980 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
7981 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
7982 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
7983 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
7984 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
7985 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
7986 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
7987 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
7988 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
7989 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
7990 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
7991 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
7992 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
7993 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
7994 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
7995 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
7996 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
7997 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
7998 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
7999 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
8000 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
8001 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
8002 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
8003 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
8004 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
8005 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
8006 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
8007 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
8008 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
8009 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
8010 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
8011 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
8012 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
8013 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
8014 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
8015 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
8016 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
8017 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
8018 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
8019 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
8020 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
8021 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
8022 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
8023 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
8024 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
8025 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
8026 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
8027 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
8028 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
8029 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"},
8030 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
8031 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
8032 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
8033 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
8034 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
8035 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
8036 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
8037 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
8038 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
8039 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
8040 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
8041 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
8042 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
8043 {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
8044 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
8045 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
8046 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
8047 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
8048 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
8049 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
8050 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
8051 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
8052 {.id = ALC245_FIXUP_BASS_HP_DAC, .name = "alc245-fixup-bass-hp-dac"},
8053 {.id = ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO, .name = "alc256-honor-mrb-xxx-m1020-audio"},
8054 {}
8055 };
8056 #define ALC225_STANDARD_PINS \
8057 {0x21, 0x04211020}
8058
8059 #define ALC256_STANDARD_PINS \
8060 {0x12, 0x90a60140}, \
8061 {0x14, 0x90170110}, \
8062 {0x21, 0x02211020}
8063
8064 #define ALC282_STANDARD_PINS \
8065 {0x14, 0x90170110}
8066
8067 #define ALC290_STANDARD_PINS \
8068 {0x12, 0x99a30130}
8069
8070 #define ALC292_STANDARD_PINS \
8071 {0x14, 0x90170110}, \
8072 {0x15, 0x0221401f}
8073
8074 #define ALC295_STANDARD_PINS \
8075 {0x12, 0xb7a60130}, \
8076 {0x14, 0x90170110}, \
8077 {0x21, 0x04211020}
8078
8079 #define ALC298_STANDARD_PINS \
8080 {0x12, 0x90a60130}, \
8081 {0x21, 0x03211020}
8082
8083 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
8084 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC,
8085 {0x14, 0x01014020},
8086 {0x17, 0x90170110},
8087 {0x18, 0x02a11030},
8088 {0x19, 0x0181303F},
8089 {0x21, 0x0221102f}),
8090 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
8091 {0x12, 0x90a601c0},
8092 {0x14, 0x90171120},
8093 {0x21, 0x02211030}),
8094 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
8095 {0x14, 0x90170110},
8096 {0x1b, 0x90a70130},
8097 {0x21, 0x03211020}),
8098 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
8099 {0x1a, 0x90a70130},
8100 {0x1b, 0x90170110},
8101 {0x21, 0x03211020}),
8102 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8103 ALC225_STANDARD_PINS,
8104 {0x12, 0xb7a60130},
8105 {0x14, 0x901701a0}),
8106 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8107 ALC225_STANDARD_PINS,
8108 {0x12, 0xb7a60130},
8109 {0x14, 0x901701b0}),
8110 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8111 ALC225_STANDARD_PINS,
8112 {0x12, 0xb7a60150},
8113 {0x14, 0x901701a0}),
8114 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8115 ALC225_STANDARD_PINS,
8116 {0x12, 0xb7a60150},
8117 {0x14, 0x901701b0}),
8118 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
8119 ALC225_STANDARD_PINS,
8120 {0x12, 0xb7a60130},
8121 {0x1b, 0x90170110}),
8122 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8123 {0x1b, 0x01111010},
8124 {0x1e, 0x01451130},
8125 {0x21, 0x02211020}),
8126 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
8127 {0x12, 0x90a60140},
8128 {0x14, 0x90170110},
8129 {0x19, 0x02a11030},
8130 {0x21, 0x02211020}),
8131 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8132 {0x14, 0x90170110},
8133 {0x19, 0x02a11030},
8134 {0x1a, 0x02a11040},
8135 {0x1b, 0x01014020},
8136 {0x21, 0x0221101f}),
8137 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8138 {0x14, 0x90170110},
8139 {0x19, 0x02a11030},
8140 {0x1a, 0x02a11040},
8141 {0x1b, 0x01011020},
8142 {0x21, 0x0221101f}),
8143 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
8144 {0x14, 0x90170110},
8145 {0x19, 0x02a11020},
8146 {0x1a, 0x02a11030},
8147 {0x21, 0x0221101f}),
8148 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
8149 {0x21, 0x02211010}),
8150 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
8151 {0x14, 0x90170110},
8152 {0x19, 0x02a11020},
8153 {0x21, 0x02211030}),
8154 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
8155 {0x14, 0x90170110},
8156 {0x21, 0x02211020}),
8157 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8158 {0x14, 0x90170130},
8159 {0x21, 0x02211040}),
8160 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8161 {0x12, 0x90a60140},
8162 {0x14, 0x90170110},
8163 {0x21, 0x02211020}),
8164 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8165 {0x12, 0x90a60160},
8166 {0x14, 0x90170120},
8167 {0x21, 0x02211030}),
8168 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8169 {0x14, 0x90170110},
8170 {0x1b, 0x02011020},
8171 {0x21, 0x0221101f}),
8172 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8173 {0x14, 0x90170110},
8174 {0x1b, 0x01011020},
8175 {0x21, 0x0221101f}),
8176 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8177 {0x14, 0x90170130},
8178 {0x1b, 0x01014020},
8179 {0x21, 0x0221103f}),
8180 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8181 {0x14, 0x90170130},
8182 {0x1b, 0x01011020},
8183 {0x21, 0x0221103f}),
8184 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8185 {0x14, 0x90170130},
8186 {0x1b, 0x02011020},
8187 {0x21, 0x0221103f}),
8188 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8189 {0x14, 0x90170150},
8190 {0x1b, 0x02011020},
8191 {0x21, 0x0221105f}),
8192 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8193 {0x14, 0x90170110},
8194 {0x1b, 0x01014020},
8195 {0x21, 0x0221101f}),
8196 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8197 {0x12, 0x90a60160},
8198 {0x14, 0x90170120},
8199 {0x17, 0x90170140},
8200 {0x21, 0x0321102f}),
8201 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8202 {0x12, 0x90a60160},
8203 {0x14, 0x90170130},
8204 {0x21, 0x02211040}),
8205 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8206 {0x12, 0x90a60160},
8207 {0x14, 0x90170140},
8208 {0x21, 0x02211050}),
8209 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8210 {0x12, 0x90a60170},
8211 {0x14, 0x90170120},
8212 {0x21, 0x02211030}),
8213 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8214 {0x12, 0x90a60170},
8215 {0x14, 0x90170130},
8216 {0x21, 0x02211040}),
8217 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8218 {0x12, 0x90a60170},
8219 {0x14, 0x90171130},
8220 {0x21, 0x02211040}),
8221 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8222 {0x12, 0x90a60170},
8223 {0x14, 0x90170140},
8224 {0x21, 0x02211050}),
8225 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8226 {0x12, 0x90a60180},
8227 {0x14, 0x90170130},
8228 {0x21, 0x02211040}),
8229 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8230 {0x12, 0x90a60180},
8231 {0x14, 0x90170120},
8232 {0x21, 0x02211030}),
8233 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8234 {0x1b, 0x01011020},
8235 {0x21, 0x02211010}),
8236 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
8237 {0x14, 0x90170110},
8238 {0x1b, 0x90a70130},
8239 {0x21, 0x04211020}),
8240 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
8241 {0x14, 0x90170110},
8242 {0x1b, 0x90a70130},
8243 {0x21, 0x03211020}),
8244 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8245 {0x12, 0x90a60130},
8246 {0x14, 0x90170110},
8247 {0x21, 0x03211020}),
8248 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8249 {0x12, 0x90a60130},
8250 {0x14, 0x90170110},
8251 {0x21, 0x04211020}),
8252 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
8253 {0x1a, 0x90a70130},
8254 {0x1b, 0x90170110},
8255 {0x21, 0x03211020}),
8256 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC,
8257 {0x14, 0x90170110},
8258 {0x19, 0x02a11020},
8259 {0x21, 0x0221101f}),
8260 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC,
8261 {0x17, 0x90170110},
8262 {0x19, 0x03a11030},
8263 {0x21, 0x03211020}),
8264 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
8265 {0x12, 0x90a60130},
8266 {0x14, 0x90170110},
8267 {0x15, 0x0421101f},
8268 {0x1a, 0x04a11020}),
8269 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED,
8270 {0x12, 0x90a60140},
8271 {0x14, 0x90170110},
8272 {0x15, 0x0421101f},
8273 {0x18, 0x02811030},
8274 {0x1a, 0x04a1103f},
8275 {0x1b, 0x02011020}),
8276 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8277 ALC282_STANDARD_PINS,
8278 {0x12, 0x99a30130},
8279 {0x19, 0x03a11020},
8280 {0x21, 0x0321101f}),
8281 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8282 ALC282_STANDARD_PINS,
8283 {0x12, 0x99a30130},
8284 {0x19, 0x03a11020},
8285 {0x21, 0x03211040}),
8286 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8287 ALC282_STANDARD_PINS,
8288 {0x12, 0x99a30130},
8289 {0x19, 0x03a11030},
8290 {0x21, 0x03211020}),
8291 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8292 ALC282_STANDARD_PINS,
8293 {0x12, 0x99a30130},
8294 {0x19, 0x04a11020},
8295 {0x21, 0x0421101f}),
8296 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
8297 ALC282_STANDARD_PINS,
8298 {0x12, 0x90a60140},
8299 {0x19, 0x04a11030},
8300 {0x21, 0x04211020}),
8301 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
8302 ALC282_STANDARD_PINS,
8303 {0x12, 0x90a609c0},
8304 {0x18, 0x03a11830},
8305 {0x19, 0x04a19831},
8306 {0x1a, 0x0481303f},
8307 {0x1b, 0x04211020},
8308 {0x21, 0x0321101f}),
8309 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT,
8310 ALC282_STANDARD_PINS,
8311 {0x12, 0x90a60940},
8312 {0x18, 0x03a11830},
8313 {0x19, 0x04a19831},
8314 {0x1a, 0x0481303f},
8315 {0x1b, 0x04211020},
8316 {0x21, 0x0321101f}),
8317 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8318 ALC282_STANDARD_PINS,
8319 {0x12, 0x90a60130},
8320 {0x21, 0x0321101f}),
8321 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8322 {0x12, 0x90a60160},
8323 {0x14, 0x90170120},
8324 {0x21, 0x02211030}),
8325 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
8326 ALC282_STANDARD_PINS,
8327 {0x12, 0x90a60130},
8328 {0x19, 0x03a11020},
8329 {0x21, 0x0321101f}),
8330 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8331 {0x12, 0x90a60130},
8332 {0x14, 0x90170110},
8333 {0x19, 0x04a11040},
8334 {0x21, 0x04211020}),
8335 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8336 {0x14, 0x90170110},
8337 {0x19, 0x04a11040},
8338 {0x1d, 0x40600001},
8339 {0x21, 0x04211020}),
8340 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
8341 {0x14, 0x90170110},
8342 {0x19, 0x04a11040},
8343 {0x21, 0x04211020}),
8344 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK,
8345 {0x14, 0x90170110},
8346 {0x17, 0x90170111},
8347 {0x19, 0x03a11030},
8348 {0x21, 0x03211020}),
8349 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
8350 {0x17, 0x90170110},
8351 {0x19, 0x03a11030},
8352 {0x21, 0x03211020}),
8353 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
8354 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */
8355 {0x19, 0x04a11040},
8356 {0x21, 0x04211020}),
8357 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
8358 {0x12, 0x90a60130},
8359 {0x17, 0x90170110},
8360 {0x21, 0x02211020}),
8361 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
8362 {0x12, 0x90a60120},
8363 {0x14, 0x90170110},
8364 {0x21, 0x0321101f}),
8365 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8366 ALC290_STANDARD_PINS,
8367 {0x15, 0x04211040},
8368 {0x18, 0x90170112},
8369 {0x1a, 0x04a11020}),
8370 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8371 ALC290_STANDARD_PINS,
8372 {0x15, 0x04211040},
8373 {0x18, 0x90170110},
8374 {0x1a, 0x04a11020}),
8375 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8376 ALC290_STANDARD_PINS,
8377 {0x15, 0x0421101f},
8378 {0x1a, 0x04a11020}),
8379 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8380 ALC290_STANDARD_PINS,
8381 {0x15, 0x04211020},
8382 {0x1a, 0x04a11040}),
8383 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8384 ALC290_STANDARD_PINS,
8385 {0x14, 0x90170110},
8386 {0x15, 0x04211020},
8387 {0x1a, 0x04a11040}),
8388 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8389 ALC290_STANDARD_PINS,
8390 {0x14, 0x90170110},
8391 {0x15, 0x04211020},
8392 {0x1a, 0x04a11020}),
8393 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
8394 ALC290_STANDARD_PINS,
8395 {0x14, 0x90170110},
8396 {0x15, 0x0421101f},
8397 {0x1a, 0x04a11020}),
8398 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
8399 ALC292_STANDARD_PINS,
8400 {0x12, 0x90a60140},
8401 {0x16, 0x01014020},
8402 {0x19, 0x01a19030}),
8403 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
8404 ALC292_STANDARD_PINS,
8405 {0x12, 0x90a60140},
8406 {0x16, 0x01014020},
8407 {0x18, 0x02a19031},
8408 {0x19, 0x01a1903e}),
8409 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
8410 ALC292_STANDARD_PINS,
8411 {0x12, 0x90a60140}),
8412 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
8413 ALC292_STANDARD_PINS,
8414 {0x13, 0x90a60140},
8415 {0x16, 0x21014020},
8416 {0x19, 0x21a19030}),
8417 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
8418 ALC292_STANDARD_PINS,
8419 {0x13, 0x90a60140}),
8420 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE,
8421 {0x17, 0x90170110},
8422 {0x21, 0x04211020}),
8423 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
8424 {0x14, 0x90170110},
8425 {0x1b, 0x90a70130},
8426 {0x21, 0x04211020}),
8427 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8428 {0x12, 0x90a60130},
8429 {0x17, 0x90170110},
8430 {0x21, 0x03211020}),
8431 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8432 {0x12, 0x90a60130},
8433 {0x17, 0x90170110},
8434 {0x21, 0x04211020}),
8435 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
8436 {0x12, 0x90a60130},
8437 {0x17, 0x90170110},
8438 {0x21, 0x03211020}),
8439 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8440 {0x12, 0x90a60120},
8441 {0x17, 0x90170110},
8442 {0x21, 0x04211030}),
8443 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8444 {0x12, 0x90a60130},
8445 {0x17, 0x90170110},
8446 {0x21, 0x03211020}),
8447 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
8448 {0x12, 0x90a60130},
8449 {0x17, 0x90170110},
8450 {0x21, 0x03211020}),
8451 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8452 ALC298_STANDARD_PINS,
8453 {0x17, 0x90170110}),
8454 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8455 ALC298_STANDARD_PINS,
8456 {0x17, 0x90170140}),
8457 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
8458 ALC298_STANDARD_PINS,
8459 {0x17, 0x90170150}),
8460 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME,
8461 {0x12, 0xb7a60140},
8462 {0x13, 0xb7a60150},
8463 {0x17, 0x90170110},
8464 {0x1a, 0x03011020},
8465 {0x21, 0x03211030}),
8466 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
8467 {0x12, 0xb7a60140},
8468 {0x17, 0x90170110},
8469 {0x1a, 0x03a11030},
8470 {0x21, 0x03211020}),
8471 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
8472 ALC225_STANDARD_PINS,
8473 {0x12, 0xb7a60130},
8474 {0x17, 0x90170110}),
8475 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC,
8476 {0x14, 0x01014010},
8477 {0x17, 0x90170120},
8478 {0x18, 0x02a11030},
8479 {0x19, 0x02a1103f},
8480 {0x21, 0x0221101f}),
8481 {}
8482 };
8483
8484 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match
8485 * more machines, don't need to match all valid pins, just need to match
8486 * all the pins defined in the tbl. Just because of this reason, it is possible
8487 * that a single machine matches multiple tbls, so there is one limitation:
8488 * at most one tbl is allowed to define for the same vendor and same codec
8489 */
8490 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
8491 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC,
8492 {0x19, 0x40000000}),
8493 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
8494 {0x19, 0x40000000},
8495 {0x1b, 0x40000000}),
8496 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
8497 {0x19, 0x40000000},
8498 {0x1b, 0x40000000}),
8499 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
8500 {0x19, 0x40000000},
8501 {0x1a, 0x40000000}),
8502 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
8503 {0x19, 0x40000000},
8504 {0x1a, 0x40000000}),
8505 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
8506 {0x19, 0x40000000},
8507 {0x1a, 0x40000000}),
8508 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
8509 {0x19, 0x40000000}),
8510 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1558, "Clevo", ALC2XX_FIXUP_HEADSET_MIC,
8511 {0x19, 0x40000000}),
8512 {}
8513 };
8514
alc269_fill_coef(struct hda_codec * codec)8515 static void alc269_fill_coef(struct hda_codec *codec)
8516 {
8517 struct alc_spec *spec = codec->spec;
8518 int val;
8519
8520 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
8521 return;
8522
8523 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
8524 alc_write_coef_idx(codec, 0xf, 0x960b);
8525 alc_write_coef_idx(codec, 0xe, 0x8817);
8526 }
8527
8528 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) {
8529 alc_write_coef_idx(codec, 0xf, 0x960b);
8530 alc_write_coef_idx(codec, 0xe, 0x8814);
8531 }
8532
8533 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) {
8534 /* Power up output pin */
8535 alc_update_coef_idx(codec, 0x04, 0, 1<<11);
8536 }
8537
8538 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
8539 val = alc_read_coef_idx(codec, 0xd);
8540 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) {
8541 /* Capless ramp up clock control */
8542 alc_write_coef_idx(codec, 0xd, val | (1<<10));
8543 }
8544 val = alc_read_coef_idx(codec, 0x17);
8545 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) {
8546 /* Class D power on reset */
8547 alc_write_coef_idx(codec, 0x17, val | (1<<7));
8548 }
8549 }
8550
8551 /* HP */
8552 alc_update_coef_idx(codec, 0x4, 0, 1<<11);
8553 }
8554
alc269_remove(struct hda_codec * codec)8555 static void alc269_remove(struct hda_codec *codec)
8556 {
8557 struct alc_spec *spec = codec->spec;
8558
8559 if (spec)
8560 hda_component_manager_free(&spec->comps, &comp_master_ops);
8561
8562 snd_hda_gen_remove(codec);
8563 }
8564
8565 /*
8566 */
alc269_probe(struct hda_codec * codec,const struct hda_device_id * id)8567 static int alc269_probe(struct hda_codec *codec, const struct hda_device_id *id)
8568 {
8569 struct alc_spec *spec;
8570 int err;
8571
8572 err = alc_alloc_spec(codec, 0x0b);
8573 if (err < 0)
8574 return err;
8575
8576 spec = codec->spec;
8577 spec->gen.shared_mic_vref_pin = 0x18;
8578 codec->power_save_node = 0;
8579 spec->en_3kpull_low = true;
8580
8581 spec->shutup = alc_default_shutup;
8582 spec->init_hook = alc_default_init;
8583
8584 switch (codec->core.vendor_id) {
8585 case 0x10ec0269:
8586 spec->codec_variant = ALC269_TYPE_ALC269VA;
8587 switch (alc_get_coef0(codec) & 0x00f0) {
8588 case 0x0010:
8589 if (codec->bus->pci &&
8590 codec->bus->pci->subsystem_vendor == 0x1025 &&
8591 spec->cdefine.platform_type == 1)
8592 err = alc_codec_rename(codec, "ALC271X");
8593 spec->codec_variant = ALC269_TYPE_ALC269VB;
8594 break;
8595 case 0x0020:
8596 if (codec->bus->pci &&
8597 codec->bus->pci->subsystem_vendor == 0x17aa &&
8598 codec->bus->pci->subsystem_device == 0x21f3)
8599 err = alc_codec_rename(codec, "ALC3202");
8600 spec->codec_variant = ALC269_TYPE_ALC269VC;
8601 break;
8602 case 0x0030:
8603 spec->codec_variant = ALC269_TYPE_ALC269VD;
8604 break;
8605 default:
8606 alc_fix_pll_init(codec, 0x20, 0x04, 15);
8607 }
8608 if (err < 0)
8609 goto error;
8610 spec->shutup = alc269_shutup;
8611 spec->init_hook = alc269_fill_coef;
8612 alc269_fill_coef(codec);
8613 break;
8614
8615 case 0x10ec0280:
8616 case 0x10ec0290:
8617 spec->codec_variant = ALC269_TYPE_ALC280;
8618 break;
8619 case 0x10ec0282:
8620 spec->codec_variant = ALC269_TYPE_ALC282;
8621 spec->shutup = alc282_shutup;
8622 spec->init_hook = alc282_init;
8623 break;
8624 case 0x10ec0233:
8625 case 0x10ec0283:
8626 spec->codec_variant = ALC269_TYPE_ALC283;
8627 spec->shutup = alc283_shutup;
8628 spec->init_hook = alc283_init;
8629 break;
8630 case 0x10ec0284:
8631 case 0x10ec0292:
8632 spec->codec_variant = ALC269_TYPE_ALC284;
8633 break;
8634 case 0x10ec0293:
8635 spec->codec_variant = ALC269_TYPE_ALC293;
8636 break;
8637 case 0x10ec0286:
8638 case 0x10ec0288:
8639 spec->codec_variant = ALC269_TYPE_ALC286;
8640 break;
8641 case 0x10ec0298:
8642 spec->codec_variant = ALC269_TYPE_ALC298;
8643 break;
8644 case 0x10ec0235:
8645 case 0x10ec0255:
8646 spec->codec_variant = ALC269_TYPE_ALC255;
8647 spec->shutup = alc256_shutup;
8648 spec->init_hook = alc256_init;
8649 break;
8650 case 0x10ec0230:
8651 case 0x10ec0236:
8652 case 0x10ec0256:
8653 case 0x19e58326:
8654 spec->codec_variant = ALC269_TYPE_ALC256;
8655 spec->shutup = alc256_shutup;
8656 spec->init_hook = alc256_init;
8657 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
8658 if (codec->core.vendor_id == 0x10ec0236 &&
8659 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
8660 spec->en_3kpull_low = false;
8661 break;
8662 case 0x10ec0257:
8663 spec->codec_variant = ALC269_TYPE_ALC257;
8664 spec->shutup = alc256_shutup;
8665 spec->init_hook = alc256_init;
8666 spec->gen.mixer_nid = 0;
8667 spec->en_3kpull_low = false;
8668 break;
8669 case 0x10ec0215:
8670 case 0x10ec0245:
8671 case 0x10ec0285:
8672 case 0x10ec0289:
8673 if (alc_get_coef0(codec) & 0x0010)
8674 spec->codec_variant = ALC269_TYPE_ALC245;
8675 else
8676 spec->codec_variant = ALC269_TYPE_ALC215;
8677 spec->shutup = alc225_shutup;
8678 spec->init_hook = alc225_init;
8679 spec->gen.mixer_nid = 0;
8680 break;
8681 case 0x10ec0225:
8682 case 0x10ec0295:
8683 case 0x10ec0299:
8684 spec->codec_variant = ALC269_TYPE_ALC225;
8685 spec->shutup = alc225_shutup;
8686 spec->init_hook = alc225_init;
8687 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
8688 break;
8689 case 0x10ec0287:
8690 spec->codec_variant = ALC269_TYPE_ALC287;
8691 spec->shutup = alc225_shutup;
8692 spec->init_hook = alc225_init;
8693 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
8694 break;
8695 case 0x10ec0234:
8696 case 0x10ec0274:
8697 case 0x10ec0294:
8698 spec->codec_variant = ALC269_TYPE_ALC294;
8699 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
8700 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
8701 spec->init_hook = alc294_init;
8702 break;
8703 case 0x10ec0300:
8704 spec->codec_variant = ALC269_TYPE_ALC300;
8705 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
8706 break;
8707 case 0x10ec0222:
8708 case 0x10ec0623:
8709 spec->codec_variant = ALC269_TYPE_ALC623;
8710 spec->shutup = alc222_shutup;
8711 spec->init_hook = alc222_init;
8712 break;
8713 case 0x10ec0700:
8714 case 0x10ec0701:
8715 case 0x10ec0703:
8716 case 0x10ec0711:
8717 spec->codec_variant = ALC269_TYPE_ALC700;
8718 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
8719 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
8720 spec->init_hook = alc294_init;
8721 break;
8722
8723 }
8724
8725 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
8726 spec->has_alc5505_dsp = 1;
8727 spec->init_hook = alc5505_dsp_init;
8728 }
8729
8730 alc_pre_init(codec);
8731
8732 snd_hda_pick_fixup(codec, alc269_fixup_models,
8733 alc269_fixup_tbl, alc269_fixups);
8734 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
8735 * the quirk breaks the latter (bko#214101).
8736 * Clear the wrong entry.
8737 */
8738 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
8739 codec->core.vendor_id == 0x10ec0294) {
8740 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
8741 codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
8742 }
8743
8744 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
8745 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
8746 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
8747 alc269_fixups);
8748
8749 /*
8750 * Check whether ACPI describes companion amplifiers that require
8751 * component binding
8752 */
8753 find_cirrus_companion_amps(codec);
8754
8755 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
8756
8757 alc_auto_parse_customize_define(codec);
8758
8759 if (has_cdefine_beep(codec))
8760 spec->gen.beep_nid = 0x01;
8761
8762 /* automatic parse from the BIOS config */
8763 err = alc269_parse_auto_config(codec);
8764 if (err < 0)
8765 goto error;
8766
8767 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
8768 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
8769 if (err < 0)
8770 goto error;
8771 }
8772
8773 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
8774
8775 return 0;
8776
8777 error:
8778 alc269_remove(codec);
8779 return err;
8780 }
8781
8782 static const struct hda_codec_ops alc269_codec_ops = {
8783 .probe = alc269_probe,
8784 .remove = alc269_remove,
8785 .build_controls = alc_build_controls,
8786 .build_pcms = snd_hda_gen_build_pcms,
8787 .init = alc_init,
8788 .unsol_event = snd_hda_jack_unsol_event,
8789 .suspend = alc269_suspend,
8790 .resume = alc269_resume,
8791 .check_power_status = snd_hda_gen_check_power_status,
8792 .stream_pm = snd_hda_gen_stream_pm,
8793 };
8794
8795 /*
8796 * driver entries
8797 */
8798 static const struct hda_device_id snd_hda_id_alc269[] = {
8799 HDA_CODEC_ID(0x10ec0215, "ALC215"),
8800 HDA_CODEC_ID(0x10ec0221, "ALC221"),
8801 HDA_CODEC_ID(0x10ec0222, "ALC222"),
8802 HDA_CODEC_ID(0x10ec0225, "ALC225"),
8803 HDA_CODEC_ID(0x10ec0230, "ALC236"),
8804 HDA_CODEC_ID(0x10ec0231, "ALC231"),
8805 HDA_CODEC_ID(0x10ec0233, "ALC233"),
8806 HDA_CODEC_ID(0x10ec0234, "ALC234"),
8807 HDA_CODEC_ID(0x10ec0235, "ALC233"),
8808 HDA_CODEC_ID(0x10ec0236, "ALC236"),
8809 HDA_CODEC_ID(0x10ec0245, "ALC245"),
8810 HDA_CODEC_ID(0x10ec0255, "ALC255"),
8811 HDA_CODEC_ID(0x10ec0256, "ALC256"),
8812 HDA_CODEC_ID(0x10ec0257, "ALC257"),
8813 HDA_CODEC_ID(0x10ec0269, "ALC269"),
8814 HDA_CODEC_ID(0x10ec0270, "ALC270"),
8815 HDA_CODEC_ID(0x10ec0274, "ALC274"),
8816 HDA_CODEC_ID(0x10ec0275, "ALC275"),
8817 HDA_CODEC_ID(0x10ec0276, "ALC276"),
8818 HDA_CODEC_ID(0x10ec0280, "ALC280"),
8819 HDA_CODEC_ID(0x10ec0282, "ALC282"),
8820 HDA_CODEC_ID(0x10ec0283, "ALC283"),
8821 HDA_CODEC_ID(0x10ec0284, "ALC284"),
8822 HDA_CODEC_ID(0x10ec0285, "ALC285"),
8823 HDA_CODEC_ID(0x10ec0286, "ALC286"),
8824 HDA_CODEC_ID(0x10ec0287, "ALC287"),
8825 HDA_CODEC_ID(0x10ec0288, "ALC288"),
8826 HDA_CODEC_ID(0x10ec0289, "ALC289"),
8827 HDA_CODEC_ID(0x10ec0290, "ALC290"),
8828 HDA_CODEC_ID(0x10ec0292, "ALC292"),
8829 HDA_CODEC_ID(0x10ec0293, "ALC293"),
8830 HDA_CODEC_ID(0x10ec0294, "ALC294"),
8831 HDA_CODEC_ID(0x10ec0295, "ALC295"),
8832 HDA_CODEC_ID(0x10ec0298, "ALC298"),
8833 HDA_CODEC_ID(0x10ec0299, "ALC299"),
8834 HDA_CODEC_ID(0x10ec0300, "ALC300"),
8835 HDA_CODEC_ID(0x10ec0623, "ALC623"),
8836 HDA_CODEC_ID(0x10ec0700, "ALC700"),
8837 HDA_CODEC_ID(0x10ec0701, "ALC701"),
8838 HDA_CODEC_ID(0x10ec0703, "ALC703"),
8839 HDA_CODEC_ID(0x10ec0711, "ALC711"),
8840 HDA_CODEC_ID(0x19e58326, "HW8326"),
8841 {} /* terminator */
8842 };
8843 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_alc269);
8844
8845 MODULE_LICENSE("GPL");
8846 MODULE_DESCRIPTION("Realtek ALC269 and compatible HD-audio codecs");
8847 MODULE_IMPORT_NS("SND_HDA_CODEC_REALTEK");
8848 MODULE_IMPORT_NS("SND_HDA_SCODEC_COMPONENT");
8849
8850 static struct hda_codec_driver alc269_driver = {
8851 .id = snd_hda_id_alc269,
8852 .ops = &alc269_codec_ops,
8853 };
8854
8855 module_hda_codec_driver(alc269_driver);
8856