1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Universal Interface for Intel High Definition Audio Codec 4 * 5 * HD audio interface patch for Realtek ALC codecs 6 * 7 * Copyright (c) 2004 Kailang Yang <kailang@realtek.com.tw> 8 * PeiSen Hou <pshou@realtek.com.tw> 9 * Takashi Iwai <tiwai@suse.de> 10 * Jonathan Woithe <jwoithe@just42.net> 11 */ 12 13 #include <linux/acpi.h> 14 #include <linux/cleanup.h> 15 #include <linux/init.h> 16 #include <linux/delay.h> 17 #include <linux/slab.h> 18 #include <linux/pci.h> 19 #include <linux/dmi.h> 20 #include <linux/module.h> 21 #include <linux/i2c.h> 22 #include <linux/input.h> 23 #include <linux/leds.h> 24 #include <linux/ctype.h> 25 #include <linux/spi/spi.h> 26 #include <sound/core.h> 27 #include <sound/jack.h> 28 #include <sound/hda_codec.h> 29 #include "hda_local.h" 30 #include "hda_auto_parser.h" 31 #include "hda_jack.h" 32 #include "hda_generic.h" 33 #include "hda_component.h" 34 35 /* keep halting ALC5505 DSP, for power saving */ 36 #define HALT_REALTEK_ALC5505 37 38 /* extra amp-initialization sequence types */ 39 enum { 40 ALC_INIT_UNDEFINED, 41 ALC_INIT_NONE, 42 ALC_INIT_DEFAULT, 43 }; 44 45 enum { 46 ALC_HEADSET_MODE_UNKNOWN, 47 ALC_HEADSET_MODE_UNPLUGGED, 48 ALC_HEADSET_MODE_HEADSET, 49 ALC_HEADSET_MODE_MIC, 50 ALC_HEADSET_MODE_HEADPHONE, 51 }; 52 53 enum { 54 ALC_HEADSET_TYPE_UNKNOWN, 55 ALC_HEADSET_TYPE_CTIA, 56 ALC_HEADSET_TYPE_OMTP, 57 }; 58 59 enum { 60 ALC_KEY_MICMUTE_INDEX, 61 }; 62 63 struct alc_customize_define { 64 unsigned int sku_cfg; 65 unsigned char port_connectivity; 66 unsigned char check_sum; 67 unsigned char customization; 68 unsigned char external_amp; 69 unsigned int enable_pcbeep:1; 70 unsigned int platform_type:1; 71 unsigned int swap:1; 72 unsigned int override:1; 73 unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */ 74 }; 75 76 struct alc_coef_led { 77 unsigned int idx; 78 unsigned int mask; 79 unsigned int on; 80 unsigned int off; 81 }; 82 83 struct alc_spec { 84 struct hda_gen_spec gen; /* must be at head */ 85 86 /* codec parameterization */ 87 struct alc_customize_define cdefine; 88 unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */ 89 90 /* GPIO bits */ 91 unsigned int gpio_mask; 92 unsigned int gpio_dir; 93 unsigned int gpio_data; 94 bool gpio_write_delay; /* add a delay before writing gpio_data */ 95 96 /* mute LED for HP laptops, see vref_mute_led_set() */ 97 int mute_led_polarity; 98 int micmute_led_polarity; 99 hda_nid_t mute_led_nid; 100 hda_nid_t cap_mute_led_nid; 101 102 unsigned int gpio_mute_led_mask; 103 unsigned int gpio_mic_led_mask; 104 struct alc_coef_led mute_led_coef; 105 struct alc_coef_led mic_led_coef; 106 struct mutex coef_mutex; 107 108 hda_nid_t headset_mic_pin; 109 hda_nid_t headphone_mic_pin; 110 int current_headset_mode; 111 int current_headset_type; 112 113 /* hooks */ 114 void (*init_hook)(struct hda_codec *codec); 115 void (*power_hook)(struct hda_codec *codec); 116 void (*shutup)(struct hda_codec *codec); 117 118 int init_amp; 119 int codec_variant; /* flag for other variants */ 120 unsigned int has_alc5505_dsp:1; 121 unsigned int no_depop_delay:1; 122 unsigned int done_hp_init:1; 123 unsigned int no_shutup_pins:1; 124 unsigned int ultra_low_power:1; 125 unsigned int has_hs_key:1; 126 unsigned int no_internal_mic_pin:1; 127 unsigned int en_3kpull_low:1; 128 129 /* for PLL fix */ 130 hda_nid_t pll_nid; 131 unsigned int pll_coef_idx, pll_coef_bit; 132 unsigned int coef0; 133 struct input_dev *kb_dev; 134 u8 alc_mute_keycode_map[1]; 135 136 /* component binding */ 137 struct hda_component_parent comps; 138 }; 139 140 /* 141 * COEF access helper functions 142 */ 143 144 static void coef_mutex_lock(struct hda_codec *codec) 145 { 146 struct alc_spec *spec = codec->spec; 147 148 snd_hda_power_up_pm(codec); 149 mutex_lock(&spec->coef_mutex); 150 } 151 152 static void coef_mutex_unlock(struct hda_codec *codec) 153 { 154 struct alc_spec *spec = codec->spec; 155 156 mutex_unlock(&spec->coef_mutex); 157 snd_hda_power_down_pm(codec); 158 } 159 160 static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 161 unsigned int coef_idx) 162 { 163 unsigned int val; 164 165 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); 166 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); 167 return val; 168 } 169 170 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 171 unsigned int coef_idx) 172 { 173 unsigned int val; 174 175 coef_mutex_lock(codec); 176 val = __alc_read_coefex_idx(codec, nid, coef_idx); 177 coef_mutex_unlock(codec); 178 return val; 179 } 180 181 #define alc_read_coef_idx(codec, coef_idx) \ 182 alc_read_coefex_idx(codec, 0x20, coef_idx) 183 184 static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 185 unsigned int coef_idx, unsigned int coef_val) 186 { 187 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); 188 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); 189 } 190 191 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 192 unsigned int coef_idx, unsigned int coef_val) 193 { 194 coef_mutex_lock(codec); 195 __alc_write_coefex_idx(codec, nid, coef_idx, coef_val); 196 coef_mutex_unlock(codec); 197 } 198 199 #define alc_write_coef_idx(codec, coef_idx, coef_val) \ 200 alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val) 201 202 static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 203 unsigned int coef_idx, unsigned int mask, 204 unsigned int bits_set) 205 { 206 unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx); 207 208 if (val != -1) 209 __alc_write_coefex_idx(codec, nid, coef_idx, 210 (val & ~mask) | bits_set); 211 } 212 213 static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, 214 unsigned int coef_idx, unsigned int mask, 215 unsigned int bits_set) 216 { 217 coef_mutex_lock(codec); 218 __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set); 219 coef_mutex_unlock(codec); 220 } 221 222 #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \ 223 alc_update_coefex_idx(codec, 0x20, coef_idx, mask, bits_set) 224 225 /* a special bypass for COEF 0; read the cached value at the second time */ 226 static unsigned int alc_get_coef0(struct hda_codec *codec) 227 { 228 struct alc_spec *spec = codec->spec; 229 230 if (!spec->coef0) 231 spec->coef0 = alc_read_coef_idx(codec, 0); 232 return spec->coef0; 233 } 234 235 /* coef writes/updates batch */ 236 struct coef_fw { 237 unsigned char nid; 238 unsigned char idx; 239 unsigned short mask; 240 unsigned short val; 241 }; 242 243 #define UPDATE_COEFEX(_nid, _idx, _mask, _val) \ 244 { .nid = (_nid), .idx = (_idx), .mask = (_mask), .val = (_val) } 245 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val) 246 #define WRITE_COEF(_idx, _val) WRITE_COEFEX(0x20, _idx, _val) 247 #define UPDATE_COEF(_idx, _mask, _val) UPDATE_COEFEX(0x20, _idx, _mask, _val) 248 249 static void alc_process_coef_fw(struct hda_codec *codec, 250 const struct coef_fw *fw) 251 { 252 coef_mutex_lock(codec); 253 for (; fw->nid; fw++) { 254 if (fw->mask == (unsigned short)-1) 255 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); 256 else 257 __alc_update_coefex_idx(codec, fw->nid, fw->idx, 258 fw->mask, fw->val); 259 } 260 coef_mutex_unlock(codec); 261 } 262 263 /* 264 * GPIO setup tables, used in initialization 265 */ 266 267 /* Enable GPIO mask and set output */ 268 static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask) 269 { 270 struct alc_spec *spec = codec->spec; 271 272 spec->gpio_mask |= mask; 273 spec->gpio_dir |= mask; 274 spec->gpio_data |= mask; 275 } 276 277 static void alc_write_gpio_data(struct hda_codec *codec) 278 { 279 struct alc_spec *spec = codec->spec; 280 281 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 282 spec->gpio_data); 283 } 284 285 static void alc_update_gpio_data(struct hda_codec *codec, unsigned int mask, 286 bool on) 287 { 288 struct alc_spec *spec = codec->spec; 289 unsigned int oldval = spec->gpio_data; 290 291 if (on) 292 spec->gpio_data |= mask; 293 else 294 spec->gpio_data &= ~mask; 295 if (oldval != spec->gpio_data) 296 alc_write_gpio_data(codec); 297 } 298 299 static void alc_write_gpio(struct hda_codec *codec) 300 { 301 struct alc_spec *spec = codec->spec; 302 303 if (!spec->gpio_mask) 304 return; 305 306 snd_hda_codec_write(codec, codec->core.afg, 0, 307 AC_VERB_SET_GPIO_MASK, spec->gpio_mask); 308 snd_hda_codec_write(codec, codec->core.afg, 0, 309 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); 310 if (spec->gpio_write_delay) 311 msleep(1); 312 alc_write_gpio_data(codec); 313 } 314 315 static void alc_fixup_gpio(struct hda_codec *codec, int action, 316 unsigned int mask) 317 { 318 if (action == HDA_FIXUP_ACT_PRE_PROBE) 319 alc_setup_gpio(codec, mask); 320 } 321 322 static void alc_fixup_gpio1(struct hda_codec *codec, 323 const struct hda_fixup *fix, int action) 324 { 325 alc_fixup_gpio(codec, action, 0x01); 326 } 327 328 static void alc_fixup_gpio2(struct hda_codec *codec, 329 const struct hda_fixup *fix, int action) 330 { 331 alc_fixup_gpio(codec, action, 0x02); 332 } 333 334 static void alc_fixup_gpio3(struct hda_codec *codec, 335 const struct hda_fixup *fix, int action) 336 { 337 alc_fixup_gpio(codec, action, 0x03); 338 } 339 340 static void alc_fixup_gpio4(struct hda_codec *codec, 341 const struct hda_fixup *fix, int action) 342 { 343 alc_fixup_gpio(codec, action, 0x04); 344 } 345 346 static void alc_fixup_micmute_led(struct hda_codec *codec, 347 const struct hda_fixup *fix, int action) 348 { 349 if (action == HDA_FIXUP_ACT_PRE_PROBE) 350 snd_hda_gen_add_micmute_led_cdev(codec, NULL); 351 } 352 353 /* 354 * Fix hardware PLL issue 355 * On some codecs, the analog PLL gating control must be off while 356 * the default value is 1. 357 */ 358 static void alc_fix_pll(struct hda_codec *codec) 359 { 360 struct alc_spec *spec = codec->spec; 361 362 if (spec->pll_nid) 363 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx, 364 1 << spec->pll_coef_bit, 0); 365 } 366 367 static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid, 368 unsigned int coef_idx, unsigned int coef_bit) 369 { 370 struct alc_spec *spec = codec->spec; 371 spec->pll_nid = nid; 372 spec->pll_coef_idx = coef_idx; 373 spec->pll_coef_bit = coef_bit; 374 alc_fix_pll(codec); 375 } 376 377 /* update the master volume per volume-knob's unsol event */ 378 static void alc_update_knob_master(struct hda_codec *codec, 379 struct hda_jack_callback *jack) 380 { 381 unsigned int val; 382 struct snd_kcontrol *kctl; 383 struct snd_ctl_elem_value *uctl; 384 385 kctl = snd_hda_find_mixer_ctl(codec, "Master Playback Volume"); 386 if (!kctl) 387 return; 388 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); 389 if (!uctl) 390 return; 391 val = snd_hda_codec_read(codec, jack->nid, 0, 392 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0); 393 val &= HDA_AMP_VOLMASK; 394 uctl->value.integer.value[0] = val; 395 uctl->value.integer.value[1] = val; 396 kctl->put(kctl, uctl); 397 kfree(uctl); 398 } 399 400 static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) 401 { 402 /* For some reason, the res given from ALC880 is broken. 403 Here we adjust it properly. */ 404 snd_hda_jack_unsol_event(codec, res >> 2); 405 } 406 407 /* Change EAPD to verb control */ 408 static void alc_fill_eapd_coef(struct hda_codec *codec) 409 { 410 int coef; 411 412 coef = alc_get_coef0(codec); 413 414 switch (codec->core.vendor_id) { 415 case 0x10ec0262: 416 alc_update_coef_idx(codec, 0x7, 0, 1<<5); 417 break; 418 case 0x10ec0267: 419 case 0x10ec0268: 420 alc_update_coef_idx(codec, 0x7, 0, 1<<13); 421 break; 422 case 0x10ec0269: 423 if ((coef & 0x00f0) == 0x0010) 424 alc_update_coef_idx(codec, 0xd, 0, 1<<14); 425 if ((coef & 0x00f0) == 0x0020) 426 alc_update_coef_idx(codec, 0x4, 1<<15, 0); 427 if ((coef & 0x00f0) == 0x0030) 428 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 429 break; 430 case 0x10ec0280: 431 case 0x10ec0284: 432 case 0x10ec0290: 433 case 0x10ec0292: 434 alc_update_coef_idx(codec, 0x4, 1<<15, 0); 435 break; 436 case 0x10ec0225: 437 case 0x10ec0295: 438 case 0x10ec0299: 439 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 440 fallthrough; 441 case 0x10ec0215: 442 case 0x10ec0285: 443 case 0x10ec0289: 444 alc_update_coef_idx(codec, 0x36, 1<<13, 0); 445 fallthrough; 446 case 0x10ec0230: 447 case 0x10ec0233: 448 case 0x10ec0235: 449 case 0x10ec0236: 450 case 0x10ec0245: 451 case 0x10ec0255: 452 case 0x10ec0256: 453 case 0x19e58326: 454 case 0x10ec0257: 455 case 0x10ec0282: 456 case 0x10ec0283: 457 case 0x10ec0286: 458 case 0x10ec0288: 459 case 0x10ec0298: 460 case 0x10ec0300: 461 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 462 break; 463 case 0x10ec0275: 464 alc_update_coef_idx(codec, 0xe, 0, 1<<0); 465 break; 466 case 0x10ec0287: 467 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 468 alc_write_coef_idx(codec, 0x8, 0x4ab7); 469 break; 470 case 0x10ec0293: 471 alc_update_coef_idx(codec, 0xa, 1<<13, 0); 472 break; 473 case 0x10ec0234: 474 case 0x10ec0274: 475 case 0x10ec0294: 476 case 0x10ec0700: 477 case 0x10ec0701: 478 case 0x10ec0703: 479 case 0x10ec0711: 480 alc_update_coef_idx(codec, 0x10, 1<<15, 0); 481 break; 482 case 0x10ec0662: 483 if ((coef & 0x00f0) == 0x0030) 484 alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */ 485 break; 486 case 0x10ec0272: 487 case 0x10ec0273: 488 case 0x10ec0663: 489 case 0x10ec0665: 490 case 0x10ec0670: 491 case 0x10ec0671: 492 case 0x10ec0672: 493 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ 494 break; 495 case 0x10ec0222: 496 case 0x10ec0623: 497 alc_update_coef_idx(codec, 0x19, 1<<13, 0); 498 break; 499 case 0x10ec0668: 500 alc_update_coef_idx(codec, 0x7, 3<<13, 0); 501 break; 502 case 0x10ec0867: 503 alc_update_coef_idx(codec, 0x4, 1<<10, 0); 504 break; 505 case 0x10ec0888: 506 if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030) 507 alc_update_coef_idx(codec, 0x7, 1<<5, 0); 508 break; 509 case 0x10ec0892: 510 case 0x10ec0897: 511 alc_update_coef_idx(codec, 0x7, 1<<5, 0); 512 break; 513 case 0x10ec0899: 514 case 0x10ec0900: 515 case 0x10ec0b00: 516 case 0x10ec1168: 517 case 0x10ec1220: 518 alc_update_coef_idx(codec, 0x7, 1<<1, 0); 519 break; 520 } 521 } 522 523 /* additional initialization for ALC888 variants */ 524 static void alc888_coef_init(struct hda_codec *codec) 525 { 526 switch (alc_get_coef0(codec) & 0x00f0) { 527 /* alc888-VA */ 528 case 0x00: 529 /* alc888-VB */ 530 case 0x10: 531 alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */ 532 break; 533 } 534 } 535 536 /* turn on/off EAPD control (only if available) */ 537 static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) 538 { 539 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) 540 return; 541 if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) 542 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, 543 on ? 2 : 0); 544 } 545 546 /* turn on/off EAPD controls of the codec */ 547 static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) 548 { 549 /* We currently only handle front, HP */ 550 static const hda_nid_t pins[] = { 551 0x0f, 0x10, 0x14, 0x15, 0x17, 0 552 }; 553 const hda_nid_t *p; 554 for (p = pins; *p; p++) 555 set_eapd(codec, *p, on); 556 } 557 558 static int find_ext_mic_pin(struct hda_codec *codec); 559 560 static void alc_headset_mic_no_shutup(struct hda_codec *codec) 561 { 562 const struct hda_pincfg *pin; 563 int mic_pin = find_ext_mic_pin(codec); 564 int i; 565 566 /* don't shut up pins when unloading the driver; otherwise it breaks 567 * the default pin setup at the next load of the driver 568 */ 569 if (codec->bus->shutdown) 570 return; 571 572 snd_array_for_each(&codec->init_pins, i, pin) { 573 /* use read here for syncing after issuing each verb */ 574 if (pin->nid != mic_pin) 575 snd_hda_codec_read(codec, pin->nid, 0, 576 AC_VERB_SET_PIN_WIDGET_CONTROL, 0); 577 } 578 579 codec->pins_shutup = 1; 580 } 581 582 static void alc_shutup_pins(struct hda_codec *codec) 583 { 584 struct alc_spec *spec = codec->spec; 585 586 switch (codec->core.vendor_id) { 587 case 0x10ec0236: 588 case 0x10ec0256: 589 case 0x19e58326: 590 case 0x10ec0283: 591 case 0x10ec0285: 592 case 0x10ec0286: 593 case 0x10ec0287: 594 case 0x10ec0288: 595 case 0x10ec0295: 596 case 0x10ec0298: 597 alc_headset_mic_no_shutup(codec); 598 break; 599 default: 600 if (!spec->no_shutup_pins) 601 snd_hda_shutup_pins(codec); 602 break; 603 } 604 } 605 606 /* generic shutup callback; 607 * just turning off EAPD and a little pause for avoiding pop-noise 608 */ 609 static void alc_eapd_shutup(struct hda_codec *codec) 610 { 611 struct alc_spec *spec = codec->spec; 612 613 alc_auto_setup_eapd(codec, false); 614 if (!spec->no_depop_delay) 615 msleep(200); 616 alc_shutup_pins(codec); 617 } 618 619 /* generic EAPD initialization */ 620 static void alc_auto_init_amp(struct hda_codec *codec, int type) 621 { 622 alc_auto_setup_eapd(codec, true); 623 alc_write_gpio(codec); 624 switch (type) { 625 case ALC_INIT_DEFAULT: 626 switch (codec->core.vendor_id) { 627 case 0x10ec0260: 628 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); 629 break; 630 case 0x10ec0880: 631 case 0x10ec0882: 632 case 0x10ec0883: 633 case 0x10ec0885: 634 alc_update_coef_idx(codec, 7, 0, 0x2030); 635 break; 636 case 0x10ec0888: 637 alc888_coef_init(codec); 638 break; 639 } 640 break; 641 } 642 } 643 644 /* get a primary headphone pin if available */ 645 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec) 646 { 647 if (spec->gen.autocfg.hp_pins[0]) 648 return spec->gen.autocfg.hp_pins[0]; 649 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) 650 return spec->gen.autocfg.line_out_pins[0]; 651 return 0; 652 } 653 654 /* 655 * Realtek SSID verification 656 */ 657 658 /* Could be any non-zero and even value. When used as fixup, tells 659 * the driver to ignore any present sku defines. 660 */ 661 #define ALC_FIXUP_SKU_IGNORE (2) 662 663 static void alc_fixup_sku_ignore(struct hda_codec *codec, 664 const struct hda_fixup *fix, int action) 665 { 666 struct alc_spec *spec = codec->spec; 667 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 668 spec->cdefine.fixup = 1; 669 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE; 670 } 671 } 672 673 static void alc_fixup_no_depop_delay(struct hda_codec *codec, 674 const struct hda_fixup *fix, int action) 675 { 676 struct alc_spec *spec = codec->spec; 677 678 if (action == HDA_FIXUP_ACT_PROBE) { 679 spec->no_depop_delay = 1; 680 codec->depop_delay = 0; 681 } 682 } 683 684 static int alc_auto_parse_customize_define(struct hda_codec *codec) 685 { 686 unsigned int ass, tmp, i; 687 unsigned nid = 0; 688 struct alc_spec *spec = codec->spec; 689 690 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 691 692 if (spec->cdefine.fixup) { 693 ass = spec->cdefine.sku_cfg; 694 if (ass == ALC_FIXUP_SKU_IGNORE) 695 return -1; 696 goto do_sku; 697 } 698 699 if (!codec->bus->pci) 700 return -1; 701 ass = codec->core.subsystem_id & 0xffff; 702 if (ass != codec->bus->pci->subsystem_device && (ass & 1)) 703 goto do_sku; 704 705 nid = 0x1d; 706 if (codec->core.vendor_id == 0x10ec0260) 707 nid = 0x17; 708 ass = snd_hda_codec_get_pincfg(codec, nid); 709 710 if (!(ass & 1)) { 711 codec_info(codec, "%s: SKU not ready 0x%08x\n", 712 codec->core.chip_name, ass); 713 return -1; 714 } 715 716 /* check sum */ 717 tmp = 0; 718 for (i = 1; i < 16; i++) { 719 if ((ass >> i) & 1) 720 tmp++; 721 } 722 if (((ass >> 16) & 0xf) != tmp) 723 return -1; 724 725 spec->cdefine.port_connectivity = ass >> 30; 726 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20; 727 spec->cdefine.check_sum = (ass >> 16) & 0xf; 728 spec->cdefine.customization = ass >> 8; 729 do_sku: 730 spec->cdefine.sku_cfg = ass; 731 spec->cdefine.external_amp = (ass & 0x38) >> 3; 732 spec->cdefine.platform_type = (ass & 0x4) >> 2; 733 spec->cdefine.swap = (ass & 0x2) >> 1; 734 spec->cdefine.override = ass & 0x1; 735 736 codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n", 737 nid, spec->cdefine.sku_cfg); 738 codec_dbg(codec, "SKU: port_connectivity=0x%x\n", 739 spec->cdefine.port_connectivity); 740 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); 741 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); 742 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization); 743 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp); 744 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type); 745 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap); 746 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override); 747 748 return 0; 749 } 750 751 /* return the position of NID in the list, or -1 if not found */ 752 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) 753 { 754 int i; 755 for (i = 0; i < nums; i++) 756 if (list[i] == nid) 757 return i; 758 return -1; 759 } 760 /* return true if the given NID is found in the list */ 761 static bool found_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) 762 { 763 return find_idx_in_nid_list(nid, list, nums) >= 0; 764 } 765 766 /* check subsystem ID and set up device-specific initialization; 767 * return 1 if initialized, 0 if invalid SSID 768 */ 769 /* 32-bit subsystem ID for BIOS loading in HD Audio codec. 770 * 31 ~ 16 : Manufacture ID 771 * 15 ~ 8 : SKU ID 772 * 7 ~ 0 : Assembly ID 773 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36 774 */ 775 static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports) 776 { 777 unsigned int ass, tmp, i; 778 unsigned nid; 779 struct alc_spec *spec = codec->spec; 780 781 if (spec->cdefine.fixup) { 782 ass = spec->cdefine.sku_cfg; 783 if (ass == ALC_FIXUP_SKU_IGNORE) 784 return 0; 785 goto do_sku; 786 } 787 788 ass = codec->core.subsystem_id & 0xffff; 789 if (codec->bus->pci && 790 ass != codec->bus->pci->subsystem_device && (ass & 1)) 791 goto do_sku; 792 793 /* invalid SSID, check the special NID pin defcfg instead */ 794 /* 795 * 31~30 : port connectivity 796 * 29~21 : reserve 797 * 20 : PCBEEP input 798 * 19~16 : Check sum (15:1) 799 * 15~1 : Custom 800 * 0 : override 801 */ 802 nid = 0x1d; 803 if (codec->core.vendor_id == 0x10ec0260) 804 nid = 0x17; 805 ass = snd_hda_codec_get_pincfg(codec, nid); 806 codec_dbg(codec, 807 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n", 808 ass, nid); 809 if (!(ass & 1)) 810 return 0; 811 if ((ass >> 30) != 1) /* no physical connection */ 812 return 0; 813 814 /* check sum */ 815 tmp = 0; 816 for (i = 1; i < 16; i++) { 817 if ((ass >> i) & 1) 818 tmp++; 819 } 820 if (((ass >> 16) & 0xf) != tmp) 821 return 0; 822 do_sku: 823 codec_dbg(codec, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n", 824 ass & 0xffff, codec->core.vendor_id); 825 /* 826 * 0 : override 827 * 1 : Swap Jack 828 * 2 : 0 --> Desktop, 1 --> Laptop 829 * 3~5 : External Amplifier control 830 * 7~6 : Reserved 831 */ 832 tmp = (ass & 0x38) >> 3; /* external Amp control */ 833 if (spec->init_amp == ALC_INIT_UNDEFINED) { 834 switch (tmp) { 835 case 1: 836 alc_setup_gpio(codec, 0x01); 837 break; 838 case 3: 839 alc_setup_gpio(codec, 0x02); 840 break; 841 case 7: 842 alc_setup_gpio(codec, 0x04); 843 break; 844 case 5: 845 default: 846 spec->init_amp = ALC_INIT_DEFAULT; 847 break; 848 } 849 } 850 851 /* is laptop or Desktop and enable the function "Mute internal speaker 852 * when the external headphone out jack is plugged" 853 */ 854 if (!(ass & 0x8000)) 855 return 1; 856 /* 857 * 10~8 : Jack location 858 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered 859 * 14~13: Resvered 860 * 15 : 1 --> enable the function "Mute internal speaker 861 * when the external headphone out jack is plugged" 862 */ 863 if (!alc_get_hp_pin(spec)) { 864 hda_nid_t nid; 865 tmp = (ass >> 11) & 0x3; /* HP to chassis */ 866 nid = ports[tmp]; 867 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, 868 spec->gen.autocfg.line_outs)) 869 return 1; 870 spec->gen.autocfg.hp_pins[0] = nid; 871 } 872 return 1; 873 } 874 875 /* Check the validity of ALC subsystem-id 876 * ports contains an array of 4 pin NIDs for port-A, E, D and I */ 877 static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) 878 { 879 if (!alc_subsystem_id(codec, ports)) { 880 struct alc_spec *spec = codec->spec; 881 if (spec->init_amp == ALC_INIT_UNDEFINED) { 882 codec_dbg(codec, 883 "realtek: Enable default setup for auto mode as fallback\n"); 884 spec->init_amp = ALC_INIT_DEFAULT; 885 } 886 } 887 } 888 889 /* 890 */ 891 892 static void alc_fixup_inv_dmic(struct hda_codec *codec, 893 const struct hda_fixup *fix, int action) 894 { 895 struct alc_spec *spec = codec->spec; 896 897 spec->gen.inv_dmic_split = 1; 898 } 899 900 901 static int alc_build_controls(struct hda_codec *codec) 902 { 903 int err; 904 905 err = snd_hda_gen_build_controls(codec); 906 if (err < 0) 907 return err; 908 909 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD); 910 return 0; 911 } 912 913 914 /* 915 * Common callbacks 916 */ 917 918 static void alc_pre_init(struct hda_codec *codec) 919 { 920 alc_fill_eapd_coef(codec); 921 } 922 923 #define is_s3_resume(codec) \ 924 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME) 925 #define is_s4_resume(codec) \ 926 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE) 927 #define is_s4_suspend(codec) \ 928 ((codec)->core.dev.power.power_state.event == PM_EVENT_FREEZE) 929 930 static int alc_init(struct hda_codec *codec) 931 { 932 struct alc_spec *spec = codec->spec; 933 934 /* hibernation resume needs the full chip initialization */ 935 if (is_s4_resume(codec)) 936 alc_pre_init(codec); 937 938 if (spec->init_hook) 939 spec->init_hook(codec); 940 941 spec->gen.skip_verbs = 1; /* applied in below */ 942 snd_hda_gen_init(codec); 943 alc_fix_pll(codec); 944 alc_auto_init_amp(codec, spec->init_amp); 945 snd_hda_apply_verbs(codec); /* apply verbs here after own init */ 946 947 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); 948 949 return 0; 950 } 951 952 #define alc_free snd_hda_gen_free 953 954 static inline void alc_shutup(struct hda_codec *codec) 955 { 956 struct alc_spec *spec = codec->spec; 957 958 if (!snd_hda_get_bool_hint(codec, "shutup")) 959 return; /* disabled explicitly by hints */ 960 961 if (spec && spec->shutup) 962 spec->shutup(codec); 963 else 964 alc_shutup_pins(codec); 965 } 966 967 static void alc_power_eapd(struct hda_codec *codec) 968 { 969 alc_auto_setup_eapd(codec, false); 970 } 971 972 static int alc_suspend(struct hda_codec *codec) 973 { 974 struct alc_spec *spec = codec->spec; 975 alc_shutup(codec); 976 if (spec && spec->power_hook) 977 spec->power_hook(codec); 978 return 0; 979 } 980 981 static int alc_resume(struct hda_codec *codec) 982 { 983 struct alc_spec *spec = codec->spec; 984 985 if (!spec->no_depop_delay) 986 msleep(150); /* to avoid pop noise */ 987 codec->patch_ops.init(codec); 988 snd_hda_regmap_sync(codec); 989 hda_call_check_power_status(codec, 0x01); 990 return 0; 991 } 992 993 /* 994 */ 995 static const struct hda_codec_ops alc_patch_ops = { 996 .build_controls = alc_build_controls, 997 .build_pcms = snd_hda_gen_build_pcms, 998 .init = alc_init, 999 .free = alc_free, 1000 .unsol_event = snd_hda_jack_unsol_event, 1001 .resume = alc_resume, 1002 .suspend = alc_suspend, 1003 .check_power_status = snd_hda_gen_check_power_status, 1004 }; 1005 1006 1007 #define alc_codec_rename(codec, name) snd_hda_codec_set_name(codec, name) 1008 1009 /* 1010 * Rename codecs appropriately from COEF value or subvendor id 1011 */ 1012 struct alc_codec_rename_table { 1013 unsigned int vendor_id; 1014 unsigned short coef_mask; 1015 unsigned short coef_bits; 1016 const char *name; 1017 }; 1018 1019 struct alc_codec_rename_pci_table { 1020 unsigned int codec_vendor_id; 1021 unsigned short pci_subvendor; 1022 unsigned short pci_subdevice; 1023 const char *name; 1024 }; 1025 1026 static const struct alc_codec_rename_table rename_tbl[] = { 1027 { 0x10ec0221, 0xf00f, 0x1003, "ALC231" }, 1028 { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, 1029 { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, 1030 { 0x10ec0269, 0xf0f0, 0x3010, "ALC258" }, 1031 { 0x10ec0269, 0x00f0, 0x0010, "ALC269VB" }, 1032 { 0x10ec0269, 0xffff, 0xa023, "ALC259" }, 1033 { 0x10ec0269, 0xffff, 0x6023, "ALC281X" }, 1034 { 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" }, 1035 { 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" }, 1036 { 0x10ec0662, 0xffff, 0x4020, "ALC656" }, 1037 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" }, 1038 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" }, 1039 { 0x10ec0888, 0xf0f0, 0x3020, "ALC886" }, 1040 { 0x10ec0899, 0x2000, 0x2000, "ALC899" }, 1041 { 0x10ec0892, 0xffff, 0x8020, "ALC661" }, 1042 { 0x10ec0892, 0xffff, 0x8011, "ALC661" }, 1043 { 0x10ec0892, 0xffff, 0x4011, "ALC656" }, 1044 { } /* terminator */ 1045 }; 1046 1047 static const struct alc_codec_rename_pci_table rename_pci_tbl[] = { 1048 { 0x10ec0280, 0x1028, 0, "ALC3220" }, 1049 { 0x10ec0282, 0x1028, 0, "ALC3221" }, 1050 { 0x10ec0283, 0x1028, 0, "ALC3223" }, 1051 { 0x10ec0288, 0x1028, 0, "ALC3263" }, 1052 { 0x10ec0292, 0x1028, 0, "ALC3226" }, 1053 { 0x10ec0293, 0x1028, 0, "ALC3235" }, 1054 { 0x10ec0255, 0x1028, 0, "ALC3234" }, 1055 { 0x10ec0668, 0x1028, 0, "ALC3661" }, 1056 { 0x10ec0275, 0x1028, 0, "ALC3260" }, 1057 { 0x10ec0899, 0x1028, 0, "ALC3861" }, 1058 { 0x10ec0298, 0x1028, 0, "ALC3266" }, 1059 { 0x10ec0236, 0x1028, 0, "ALC3204" }, 1060 { 0x10ec0256, 0x1028, 0, "ALC3246" }, 1061 { 0x10ec0225, 0x1028, 0, "ALC3253" }, 1062 { 0x10ec0295, 0x1028, 0, "ALC3254" }, 1063 { 0x10ec0299, 0x1028, 0, "ALC3271" }, 1064 { 0x10ec0670, 0x1025, 0, "ALC669X" }, 1065 { 0x10ec0676, 0x1025, 0, "ALC679X" }, 1066 { 0x10ec0282, 0x1043, 0, "ALC3229" }, 1067 { 0x10ec0233, 0x1043, 0, "ALC3236" }, 1068 { 0x10ec0280, 0x103c, 0, "ALC3228" }, 1069 { 0x10ec0282, 0x103c, 0, "ALC3227" }, 1070 { 0x10ec0286, 0x103c, 0, "ALC3242" }, 1071 { 0x10ec0290, 0x103c, 0, "ALC3241" }, 1072 { 0x10ec0668, 0x103c, 0, "ALC3662" }, 1073 { 0x10ec0283, 0x17aa, 0, "ALC3239" }, 1074 { 0x10ec0292, 0x17aa, 0, "ALC3232" }, 1075 { } /* terminator */ 1076 }; 1077 1078 static int alc_codec_rename_from_preset(struct hda_codec *codec) 1079 { 1080 const struct alc_codec_rename_table *p; 1081 const struct alc_codec_rename_pci_table *q; 1082 1083 for (p = rename_tbl; p->vendor_id; p++) { 1084 if (p->vendor_id != codec->core.vendor_id) 1085 continue; 1086 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) 1087 return alc_codec_rename(codec, p->name); 1088 } 1089 1090 if (!codec->bus->pci) 1091 return 0; 1092 for (q = rename_pci_tbl; q->codec_vendor_id; q++) { 1093 if (q->codec_vendor_id != codec->core.vendor_id) 1094 continue; 1095 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) 1096 continue; 1097 if (!q->pci_subdevice || 1098 q->pci_subdevice == codec->bus->pci->subsystem_device) 1099 return alc_codec_rename(codec, q->name); 1100 } 1101 1102 return 0; 1103 } 1104 1105 1106 /* 1107 * Digital-beep handlers 1108 */ 1109 #ifdef CONFIG_SND_HDA_INPUT_BEEP 1110 1111 /* additional beep mixers; private_value will be overwritten */ 1112 static const struct snd_kcontrol_new alc_beep_mixer[] = { 1113 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT), 1114 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT), 1115 }; 1116 1117 /* set up and create beep controls */ 1118 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid, 1119 int idx, int dir) 1120 { 1121 struct snd_kcontrol_new *knew; 1122 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir); 1123 int i; 1124 1125 for (i = 0; i < ARRAY_SIZE(alc_beep_mixer); i++) { 1126 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, 1127 &alc_beep_mixer[i]); 1128 if (!knew) 1129 return -ENOMEM; 1130 knew->private_value = beep_amp; 1131 } 1132 return 0; 1133 } 1134 1135 static const struct snd_pci_quirk beep_allow_list[] = { 1136 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), 1137 SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1), 1138 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), 1139 SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1), 1140 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), 1141 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), 1142 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), 1143 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1), 1144 SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1), 1145 /* denylist -- no beep available */ 1146 SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0), 1147 SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0), 1148 {} 1149 }; 1150 1151 static inline int has_cdefine_beep(struct hda_codec *codec) 1152 { 1153 struct alc_spec *spec = codec->spec; 1154 const struct snd_pci_quirk *q; 1155 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); 1156 if (q) 1157 return q->value; 1158 return spec->cdefine.enable_pcbeep; 1159 } 1160 #else 1161 #define set_beep_amp(spec, nid, idx, dir) 0 1162 #define has_cdefine_beep(codec) 0 1163 #endif 1164 1165 /* parse the BIOS configuration and set up the alc_spec */ 1166 /* return 1 if successful, 0 if the proper config is not found, 1167 * or a negative error code 1168 */ 1169 static int alc_parse_auto_config(struct hda_codec *codec, 1170 const hda_nid_t *ignore_nids, 1171 const hda_nid_t *ssid_nids) 1172 { 1173 struct alc_spec *spec = codec->spec; 1174 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 1175 int err; 1176 1177 err = snd_hda_parse_pin_defcfg(codec, cfg, ignore_nids, 1178 spec->parse_flags); 1179 if (err < 0) 1180 return err; 1181 1182 if (ssid_nids) 1183 alc_ssid_check(codec, ssid_nids); 1184 1185 err = snd_hda_gen_parse_auto_config(codec, cfg); 1186 if (err < 0) 1187 return err; 1188 1189 return 1; 1190 } 1191 1192 /* common preparation job for alc_spec */ 1193 static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) 1194 { 1195 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL); 1196 int err; 1197 1198 if (!spec) 1199 return -ENOMEM; 1200 codec->spec = spec; 1201 snd_hda_gen_spec_init(&spec->gen); 1202 spec->gen.mixer_nid = mixer_nid; 1203 spec->gen.own_eapd_ctl = 1; 1204 codec->single_adc_amp = 1; 1205 /* FIXME: do we need this for all Realtek codec models? */ 1206 codec->spdif_status_reset = 1; 1207 codec->forced_resume = 1; 1208 codec->patch_ops = alc_patch_ops; 1209 mutex_init(&spec->coef_mutex); 1210 1211 err = alc_codec_rename_from_preset(codec); 1212 if (err < 0) { 1213 kfree(spec); 1214 return err; 1215 } 1216 return 0; 1217 } 1218 1219 static int alc880_parse_auto_config(struct hda_codec *codec) 1220 { 1221 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 }; 1222 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 1223 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids); 1224 } 1225 1226 /* 1227 * ALC880 fix-ups 1228 */ 1229 enum { 1230 ALC880_FIXUP_GPIO1, 1231 ALC880_FIXUP_GPIO2, 1232 ALC880_FIXUP_MEDION_RIM, 1233 ALC880_FIXUP_LG, 1234 ALC880_FIXUP_LG_LW25, 1235 ALC880_FIXUP_W810, 1236 ALC880_FIXUP_EAPD_COEF, 1237 ALC880_FIXUP_TCL_S700, 1238 ALC880_FIXUP_VOL_KNOB, 1239 ALC880_FIXUP_FUJITSU, 1240 ALC880_FIXUP_F1734, 1241 ALC880_FIXUP_UNIWILL, 1242 ALC880_FIXUP_UNIWILL_DIG, 1243 ALC880_FIXUP_Z71V, 1244 ALC880_FIXUP_ASUS_W5A, 1245 ALC880_FIXUP_3ST_BASE, 1246 ALC880_FIXUP_3ST, 1247 ALC880_FIXUP_3ST_DIG, 1248 ALC880_FIXUP_5ST_BASE, 1249 ALC880_FIXUP_5ST, 1250 ALC880_FIXUP_5ST_DIG, 1251 ALC880_FIXUP_6ST_BASE, 1252 ALC880_FIXUP_6ST, 1253 ALC880_FIXUP_6ST_DIG, 1254 ALC880_FIXUP_6ST_AUTOMUTE, 1255 }; 1256 1257 /* enable the volume-knob widget support on NID 0x21 */ 1258 static void alc880_fixup_vol_knob(struct hda_codec *codec, 1259 const struct hda_fixup *fix, int action) 1260 { 1261 if (action == HDA_FIXUP_ACT_PROBE) 1262 snd_hda_jack_detect_enable_callback(codec, 0x21, 1263 alc_update_knob_master); 1264 } 1265 1266 static const struct hda_fixup alc880_fixups[] = { 1267 [ALC880_FIXUP_GPIO1] = { 1268 .type = HDA_FIXUP_FUNC, 1269 .v.func = alc_fixup_gpio1, 1270 }, 1271 [ALC880_FIXUP_GPIO2] = { 1272 .type = HDA_FIXUP_FUNC, 1273 .v.func = alc_fixup_gpio2, 1274 }, 1275 [ALC880_FIXUP_MEDION_RIM] = { 1276 .type = HDA_FIXUP_VERBS, 1277 .v.verbs = (const struct hda_verb[]) { 1278 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1279 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 1280 { } 1281 }, 1282 .chained = true, 1283 .chain_id = ALC880_FIXUP_GPIO2, 1284 }, 1285 [ALC880_FIXUP_LG] = { 1286 .type = HDA_FIXUP_PINS, 1287 .v.pins = (const struct hda_pintbl[]) { 1288 /* disable bogus unused pins */ 1289 { 0x16, 0x411111f0 }, 1290 { 0x18, 0x411111f0 }, 1291 { 0x1a, 0x411111f0 }, 1292 { } 1293 } 1294 }, 1295 [ALC880_FIXUP_LG_LW25] = { 1296 .type = HDA_FIXUP_PINS, 1297 .v.pins = (const struct hda_pintbl[]) { 1298 { 0x1a, 0x0181344f }, /* line-in */ 1299 { 0x1b, 0x0321403f }, /* headphone */ 1300 { } 1301 } 1302 }, 1303 [ALC880_FIXUP_W810] = { 1304 .type = HDA_FIXUP_PINS, 1305 .v.pins = (const struct hda_pintbl[]) { 1306 /* disable bogus unused pins */ 1307 { 0x17, 0x411111f0 }, 1308 { } 1309 }, 1310 .chained = true, 1311 .chain_id = ALC880_FIXUP_GPIO2, 1312 }, 1313 [ALC880_FIXUP_EAPD_COEF] = { 1314 .type = HDA_FIXUP_VERBS, 1315 .v.verbs = (const struct hda_verb[]) { 1316 /* change to EAPD mode */ 1317 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1318 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 1319 {} 1320 }, 1321 }, 1322 [ALC880_FIXUP_TCL_S700] = { 1323 .type = HDA_FIXUP_VERBS, 1324 .v.verbs = (const struct hda_verb[]) { 1325 /* change to EAPD mode */ 1326 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 1327 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 1328 {} 1329 }, 1330 .chained = true, 1331 .chain_id = ALC880_FIXUP_GPIO2, 1332 }, 1333 [ALC880_FIXUP_VOL_KNOB] = { 1334 .type = HDA_FIXUP_FUNC, 1335 .v.func = alc880_fixup_vol_knob, 1336 }, 1337 [ALC880_FIXUP_FUJITSU] = { 1338 /* override all pins as BIOS on old Amilo is broken */ 1339 .type = HDA_FIXUP_PINS, 1340 .v.pins = (const struct hda_pintbl[]) { 1341 { 0x14, 0x0121401f }, /* HP */ 1342 { 0x15, 0x99030120 }, /* speaker */ 1343 { 0x16, 0x99030130 }, /* bass speaker */ 1344 { 0x17, 0x411111f0 }, /* N/A */ 1345 { 0x18, 0x411111f0 }, /* N/A */ 1346 { 0x19, 0x01a19950 }, /* mic-in */ 1347 { 0x1a, 0x411111f0 }, /* N/A */ 1348 { 0x1b, 0x411111f0 }, /* N/A */ 1349 { 0x1c, 0x411111f0 }, /* N/A */ 1350 { 0x1d, 0x411111f0 }, /* N/A */ 1351 { 0x1e, 0x01454140 }, /* SPDIF out */ 1352 { } 1353 }, 1354 .chained = true, 1355 .chain_id = ALC880_FIXUP_VOL_KNOB, 1356 }, 1357 [ALC880_FIXUP_F1734] = { 1358 /* almost compatible with FUJITSU, but no bass and SPDIF */ 1359 .type = HDA_FIXUP_PINS, 1360 .v.pins = (const struct hda_pintbl[]) { 1361 { 0x14, 0x0121401f }, /* HP */ 1362 { 0x15, 0x99030120 }, /* speaker */ 1363 { 0x16, 0x411111f0 }, /* N/A */ 1364 { 0x17, 0x411111f0 }, /* N/A */ 1365 { 0x18, 0x411111f0 }, /* N/A */ 1366 { 0x19, 0x01a19950 }, /* mic-in */ 1367 { 0x1a, 0x411111f0 }, /* N/A */ 1368 { 0x1b, 0x411111f0 }, /* N/A */ 1369 { 0x1c, 0x411111f0 }, /* N/A */ 1370 { 0x1d, 0x411111f0 }, /* N/A */ 1371 { 0x1e, 0x411111f0 }, /* N/A */ 1372 { } 1373 }, 1374 .chained = true, 1375 .chain_id = ALC880_FIXUP_VOL_KNOB, 1376 }, 1377 [ALC880_FIXUP_UNIWILL] = { 1378 /* need to fix HP and speaker pins to be parsed correctly */ 1379 .type = HDA_FIXUP_PINS, 1380 .v.pins = (const struct hda_pintbl[]) { 1381 { 0x14, 0x0121411f }, /* HP */ 1382 { 0x15, 0x99030120 }, /* speaker */ 1383 { 0x16, 0x99030130 }, /* bass speaker */ 1384 { } 1385 }, 1386 }, 1387 [ALC880_FIXUP_UNIWILL_DIG] = { 1388 .type = HDA_FIXUP_PINS, 1389 .v.pins = (const struct hda_pintbl[]) { 1390 /* disable bogus unused pins */ 1391 { 0x17, 0x411111f0 }, 1392 { 0x19, 0x411111f0 }, 1393 { 0x1b, 0x411111f0 }, 1394 { 0x1f, 0x411111f0 }, 1395 { } 1396 } 1397 }, 1398 [ALC880_FIXUP_Z71V] = { 1399 .type = HDA_FIXUP_PINS, 1400 .v.pins = (const struct hda_pintbl[]) { 1401 /* set up the whole pins as BIOS is utterly broken */ 1402 { 0x14, 0x99030120 }, /* speaker */ 1403 { 0x15, 0x0121411f }, /* HP */ 1404 { 0x16, 0x411111f0 }, /* N/A */ 1405 { 0x17, 0x411111f0 }, /* N/A */ 1406 { 0x18, 0x01a19950 }, /* mic-in */ 1407 { 0x19, 0x411111f0 }, /* N/A */ 1408 { 0x1a, 0x01813031 }, /* line-in */ 1409 { 0x1b, 0x411111f0 }, /* N/A */ 1410 { 0x1c, 0x411111f0 }, /* N/A */ 1411 { 0x1d, 0x411111f0 }, /* N/A */ 1412 { 0x1e, 0x0144111e }, /* SPDIF */ 1413 { } 1414 } 1415 }, 1416 [ALC880_FIXUP_ASUS_W5A] = { 1417 .type = HDA_FIXUP_PINS, 1418 .v.pins = (const struct hda_pintbl[]) { 1419 /* set up the whole pins as BIOS is utterly broken */ 1420 { 0x14, 0x0121411f }, /* HP */ 1421 { 0x15, 0x411111f0 }, /* N/A */ 1422 { 0x16, 0x411111f0 }, /* N/A */ 1423 { 0x17, 0x411111f0 }, /* N/A */ 1424 { 0x18, 0x90a60160 }, /* mic */ 1425 { 0x19, 0x411111f0 }, /* N/A */ 1426 { 0x1a, 0x411111f0 }, /* N/A */ 1427 { 0x1b, 0x411111f0 }, /* N/A */ 1428 { 0x1c, 0x411111f0 }, /* N/A */ 1429 { 0x1d, 0x411111f0 }, /* N/A */ 1430 { 0x1e, 0xb743111e }, /* SPDIF out */ 1431 { } 1432 }, 1433 .chained = true, 1434 .chain_id = ALC880_FIXUP_GPIO1, 1435 }, 1436 [ALC880_FIXUP_3ST_BASE] = { 1437 .type = HDA_FIXUP_PINS, 1438 .v.pins = (const struct hda_pintbl[]) { 1439 { 0x14, 0x01014010 }, /* line-out */ 1440 { 0x15, 0x411111f0 }, /* N/A */ 1441 { 0x16, 0x411111f0 }, /* N/A */ 1442 { 0x17, 0x411111f0 }, /* N/A */ 1443 { 0x18, 0x01a19c30 }, /* mic-in */ 1444 { 0x19, 0x0121411f }, /* HP */ 1445 { 0x1a, 0x01813031 }, /* line-in */ 1446 { 0x1b, 0x02a19c40 }, /* front-mic */ 1447 { 0x1c, 0x411111f0 }, /* N/A */ 1448 { 0x1d, 0x411111f0 }, /* N/A */ 1449 /* 0x1e is filled in below */ 1450 { 0x1f, 0x411111f0 }, /* N/A */ 1451 { } 1452 } 1453 }, 1454 [ALC880_FIXUP_3ST] = { 1455 .type = HDA_FIXUP_PINS, 1456 .v.pins = (const struct hda_pintbl[]) { 1457 { 0x1e, 0x411111f0 }, /* N/A */ 1458 { } 1459 }, 1460 .chained = true, 1461 .chain_id = ALC880_FIXUP_3ST_BASE, 1462 }, 1463 [ALC880_FIXUP_3ST_DIG] = { 1464 .type = HDA_FIXUP_PINS, 1465 .v.pins = (const struct hda_pintbl[]) { 1466 { 0x1e, 0x0144111e }, /* SPDIF */ 1467 { } 1468 }, 1469 .chained = true, 1470 .chain_id = ALC880_FIXUP_3ST_BASE, 1471 }, 1472 [ALC880_FIXUP_5ST_BASE] = { 1473 .type = HDA_FIXUP_PINS, 1474 .v.pins = (const struct hda_pintbl[]) { 1475 { 0x14, 0x01014010 }, /* front */ 1476 { 0x15, 0x411111f0 }, /* N/A */ 1477 { 0x16, 0x01011411 }, /* CLFE */ 1478 { 0x17, 0x01016412 }, /* surr */ 1479 { 0x18, 0x01a19c30 }, /* mic-in */ 1480 { 0x19, 0x0121411f }, /* HP */ 1481 { 0x1a, 0x01813031 }, /* line-in */ 1482 { 0x1b, 0x02a19c40 }, /* front-mic */ 1483 { 0x1c, 0x411111f0 }, /* N/A */ 1484 { 0x1d, 0x411111f0 }, /* N/A */ 1485 /* 0x1e is filled in below */ 1486 { 0x1f, 0x411111f0 }, /* N/A */ 1487 { } 1488 } 1489 }, 1490 [ALC880_FIXUP_5ST] = { 1491 .type = HDA_FIXUP_PINS, 1492 .v.pins = (const struct hda_pintbl[]) { 1493 { 0x1e, 0x411111f0 }, /* N/A */ 1494 { } 1495 }, 1496 .chained = true, 1497 .chain_id = ALC880_FIXUP_5ST_BASE, 1498 }, 1499 [ALC880_FIXUP_5ST_DIG] = { 1500 .type = HDA_FIXUP_PINS, 1501 .v.pins = (const struct hda_pintbl[]) { 1502 { 0x1e, 0x0144111e }, /* SPDIF */ 1503 { } 1504 }, 1505 .chained = true, 1506 .chain_id = ALC880_FIXUP_5ST_BASE, 1507 }, 1508 [ALC880_FIXUP_6ST_BASE] = { 1509 .type = HDA_FIXUP_PINS, 1510 .v.pins = (const struct hda_pintbl[]) { 1511 { 0x14, 0x01014010 }, /* front */ 1512 { 0x15, 0x01016412 }, /* surr */ 1513 { 0x16, 0x01011411 }, /* CLFE */ 1514 { 0x17, 0x01012414 }, /* side */ 1515 { 0x18, 0x01a19c30 }, /* mic-in */ 1516 { 0x19, 0x02a19c40 }, /* front-mic */ 1517 { 0x1a, 0x01813031 }, /* line-in */ 1518 { 0x1b, 0x0121411f }, /* HP */ 1519 { 0x1c, 0x411111f0 }, /* N/A */ 1520 { 0x1d, 0x411111f0 }, /* N/A */ 1521 /* 0x1e is filled in below */ 1522 { 0x1f, 0x411111f0 }, /* N/A */ 1523 { } 1524 } 1525 }, 1526 [ALC880_FIXUP_6ST] = { 1527 .type = HDA_FIXUP_PINS, 1528 .v.pins = (const struct hda_pintbl[]) { 1529 { 0x1e, 0x411111f0 }, /* N/A */ 1530 { } 1531 }, 1532 .chained = true, 1533 .chain_id = ALC880_FIXUP_6ST_BASE, 1534 }, 1535 [ALC880_FIXUP_6ST_DIG] = { 1536 .type = HDA_FIXUP_PINS, 1537 .v.pins = (const struct hda_pintbl[]) { 1538 { 0x1e, 0x0144111e }, /* SPDIF */ 1539 { } 1540 }, 1541 .chained = true, 1542 .chain_id = ALC880_FIXUP_6ST_BASE, 1543 }, 1544 [ALC880_FIXUP_6ST_AUTOMUTE] = { 1545 .type = HDA_FIXUP_PINS, 1546 .v.pins = (const struct hda_pintbl[]) { 1547 { 0x1b, 0x0121401f }, /* HP with jack detect */ 1548 { } 1549 }, 1550 .chained_before = true, 1551 .chain_id = ALC880_FIXUP_6ST_BASE, 1552 }, 1553 }; 1554 1555 static const struct snd_pci_quirk alc880_fixup_tbl[] = { 1556 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), 1557 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A), 1558 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V), 1559 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1), 1560 SND_PCI_QUIRK(0x147b, 0x1045, "ABit AA8XE", ALC880_FIXUP_6ST_AUTOMUTE), 1561 SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2), 1562 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF), 1563 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_FIXUP_UNIWILL_DIG), 1564 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734), 1565 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_FIXUP_UNIWILL), 1566 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB), 1567 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810), 1568 SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM), 1569 SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST_AUTOMUTE), 1570 SND_PCI_QUIRK(0x1734, 0x107c, "FSC Amilo M1437", ALC880_FIXUP_FUJITSU), 1571 SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU), 1572 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734), 1573 SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU), 1574 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), 1575 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), 1576 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG), 1577 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25), 1578 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700), 1579 1580 /* Below is the copied entries from alc880_quirks.c. 1581 * It's not quite sure whether BIOS sets the correct pin-config table 1582 * on these machines, thus they are kept to be compatible with 1583 * the old static quirks. Once when it's confirmed to work without 1584 * these overrides, it'd be better to remove. 1585 */ 1586 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_FIXUP_5ST_DIG), 1587 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_FIXUP_6ST), 1588 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_FIXUP_3ST_DIG), 1589 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_FIXUP_6ST_DIG), 1590 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_FIXUP_6ST_DIG), 1591 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_FIXUP_6ST_DIG), 1592 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_FIXUP_3ST_DIG), 1593 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_FIXUP_3ST), 1594 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_FIXUP_6ST_DIG), 1595 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_FIXUP_3ST), 1596 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_FIXUP_3ST), 1597 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_FIXUP_5ST), 1598 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_FIXUP_5ST), 1599 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_FIXUP_5ST), 1600 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_FIXUP_6ST_DIG), 1601 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_FIXUP_6ST_DIG), 1602 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_FIXUP_6ST_DIG), 1603 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_FIXUP_6ST_DIG), 1604 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_FIXUP_5ST_DIG), 1605 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_FIXUP_5ST_DIG), 1606 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG), 1607 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_FIXUP_6ST_DIG), /* broken BIOS */ 1608 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_FIXUP_6ST_DIG), 1609 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1610 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1611 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1612 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1613 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1614 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1615 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_FIXUP_3ST_DIG), 1616 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1617 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1618 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_FIXUP_5ST_DIG), 1619 /* default Intel */ 1620 SND_PCI_QUIRK_VENDOR(0x8086, "Intel mobo", ALC880_FIXUP_3ST), 1621 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG), 1622 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_FIXUP_6ST_DIG), 1623 {} 1624 }; 1625 1626 static const struct hda_model_fixup alc880_fixup_models[] = { 1627 {.id = ALC880_FIXUP_3ST, .name = "3stack"}, 1628 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"}, 1629 {.id = ALC880_FIXUP_5ST, .name = "5stack"}, 1630 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"}, 1631 {.id = ALC880_FIXUP_6ST, .name = "6stack"}, 1632 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"}, 1633 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"}, 1634 {} 1635 }; 1636 1637 1638 /* 1639 * OK, here we have finally the patch for ALC880 1640 */ 1641 static int patch_alc880(struct hda_codec *codec) 1642 { 1643 struct alc_spec *spec; 1644 int err; 1645 1646 err = alc_alloc_spec(codec, 0x0b); 1647 if (err < 0) 1648 return err; 1649 1650 spec = codec->spec; 1651 spec->gen.need_dac_fix = 1; 1652 spec->gen.beep_nid = 0x01; 1653 1654 codec->patch_ops.unsol_event = alc880_unsol_event; 1655 1656 alc_pre_init(codec); 1657 1658 snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl, 1659 alc880_fixups); 1660 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1661 1662 /* automatic parse from the BIOS config */ 1663 err = alc880_parse_auto_config(codec); 1664 if (err < 0) 1665 goto error; 1666 1667 if (!spec->gen.no_analog) { 1668 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 1669 if (err < 0) 1670 goto error; 1671 } 1672 1673 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 1674 1675 return 0; 1676 1677 error: 1678 alc_free(codec); 1679 return err; 1680 } 1681 1682 1683 /* 1684 * ALC260 support 1685 */ 1686 static int alc260_parse_auto_config(struct hda_codec *codec) 1687 { 1688 static const hda_nid_t alc260_ignore[] = { 0x17, 0 }; 1689 static const hda_nid_t alc260_ssids[] = { 0x10, 0x15, 0x0f, 0 }; 1690 return alc_parse_auto_config(codec, alc260_ignore, alc260_ssids); 1691 } 1692 1693 /* 1694 * Pin config fixes 1695 */ 1696 enum { 1697 ALC260_FIXUP_HP_DC5750, 1698 ALC260_FIXUP_HP_PIN_0F, 1699 ALC260_FIXUP_COEF, 1700 ALC260_FIXUP_GPIO1, 1701 ALC260_FIXUP_GPIO1_TOGGLE, 1702 ALC260_FIXUP_REPLACER, 1703 ALC260_FIXUP_HP_B1900, 1704 ALC260_FIXUP_KN1, 1705 ALC260_FIXUP_FSC_S7020, 1706 ALC260_FIXUP_FSC_S7020_JWSE, 1707 ALC260_FIXUP_VAIO_PINS, 1708 }; 1709 1710 static void alc260_gpio1_automute(struct hda_codec *codec) 1711 { 1712 struct alc_spec *spec = codec->spec; 1713 1714 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present); 1715 } 1716 1717 static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, 1718 const struct hda_fixup *fix, int action) 1719 { 1720 struct alc_spec *spec = codec->spec; 1721 if (action == HDA_FIXUP_ACT_PROBE) { 1722 /* although the machine has only one output pin, we need to 1723 * toggle GPIO1 according to the jack state 1724 */ 1725 spec->gen.automute_hook = alc260_gpio1_automute; 1726 spec->gen.detect_hp = 1; 1727 spec->gen.automute_speaker = 1; 1728 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ 1729 snd_hda_jack_detect_enable_callback(codec, 0x0f, 1730 snd_hda_gen_hp_automute); 1731 alc_setup_gpio(codec, 0x01); 1732 } 1733 } 1734 1735 static void alc260_fixup_kn1(struct hda_codec *codec, 1736 const struct hda_fixup *fix, int action) 1737 { 1738 struct alc_spec *spec = codec->spec; 1739 static const struct hda_pintbl pincfgs[] = { 1740 { 0x0f, 0x02214000 }, /* HP/speaker */ 1741 { 0x12, 0x90a60160 }, /* int mic */ 1742 { 0x13, 0x02a19000 }, /* ext mic */ 1743 { 0x18, 0x01446000 }, /* SPDIF out */ 1744 /* disable bogus I/O pins */ 1745 { 0x10, 0x411111f0 }, 1746 { 0x11, 0x411111f0 }, 1747 { 0x14, 0x411111f0 }, 1748 { 0x15, 0x411111f0 }, 1749 { 0x16, 0x411111f0 }, 1750 { 0x17, 0x411111f0 }, 1751 { 0x19, 0x411111f0 }, 1752 { } 1753 }; 1754 1755 switch (action) { 1756 case HDA_FIXUP_ACT_PRE_PROBE: 1757 snd_hda_apply_pincfgs(codec, pincfgs); 1758 spec->init_amp = ALC_INIT_NONE; 1759 break; 1760 } 1761 } 1762 1763 static void alc260_fixup_fsc_s7020(struct hda_codec *codec, 1764 const struct hda_fixup *fix, int action) 1765 { 1766 struct alc_spec *spec = codec->spec; 1767 if (action == HDA_FIXUP_ACT_PRE_PROBE) 1768 spec->init_amp = ALC_INIT_NONE; 1769 } 1770 1771 static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec, 1772 const struct hda_fixup *fix, int action) 1773 { 1774 struct alc_spec *spec = codec->spec; 1775 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 1776 spec->gen.add_jack_modes = 1; 1777 spec->gen.hp_mic = 1; 1778 } 1779 } 1780 1781 static const struct hda_fixup alc260_fixups[] = { 1782 [ALC260_FIXUP_HP_DC5750] = { 1783 .type = HDA_FIXUP_PINS, 1784 .v.pins = (const struct hda_pintbl[]) { 1785 { 0x11, 0x90130110 }, /* speaker */ 1786 { } 1787 } 1788 }, 1789 [ALC260_FIXUP_HP_PIN_0F] = { 1790 .type = HDA_FIXUP_PINS, 1791 .v.pins = (const struct hda_pintbl[]) { 1792 { 0x0f, 0x01214000 }, /* HP */ 1793 { } 1794 } 1795 }, 1796 [ALC260_FIXUP_COEF] = { 1797 .type = HDA_FIXUP_VERBS, 1798 .v.verbs = (const struct hda_verb[]) { 1799 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, 1800 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3040 }, 1801 { } 1802 }, 1803 }, 1804 [ALC260_FIXUP_GPIO1] = { 1805 .type = HDA_FIXUP_FUNC, 1806 .v.func = alc_fixup_gpio1, 1807 }, 1808 [ALC260_FIXUP_GPIO1_TOGGLE] = { 1809 .type = HDA_FIXUP_FUNC, 1810 .v.func = alc260_fixup_gpio1_toggle, 1811 .chained = true, 1812 .chain_id = ALC260_FIXUP_HP_PIN_0F, 1813 }, 1814 [ALC260_FIXUP_REPLACER] = { 1815 .type = HDA_FIXUP_VERBS, 1816 .v.verbs = (const struct hda_verb[]) { 1817 { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, 1818 { 0x1a, AC_VERB_SET_PROC_COEF, 0x3050 }, 1819 { } 1820 }, 1821 .chained = true, 1822 .chain_id = ALC260_FIXUP_GPIO1_TOGGLE, 1823 }, 1824 [ALC260_FIXUP_HP_B1900] = { 1825 .type = HDA_FIXUP_FUNC, 1826 .v.func = alc260_fixup_gpio1_toggle, 1827 .chained = true, 1828 .chain_id = ALC260_FIXUP_COEF, 1829 }, 1830 [ALC260_FIXUP_KN1] = { 1831 .type = HDA_FIXUP_FUNC, 1832 .v.func = alc260_fixup_kn1, 1833 }, 1834 [ALC260_FIXUP_FSC_S7020] = { 1835 .type = HDA_FIXUP_FUNC, 1836 .v.func = alc260_fixup_fsc_s7020, 1837 }, 1838 [ALC260_FIXUP_FSC_S7020_JWSE] = { 1839 .type = HDA_FIXUP_FUNC, 1840 .v.func = alc260_fixup_fsc_s7020_jwse, 1841 .chained = true, 1842 .chain_id = ALC260_FIXUP_FSC_S7020, 1843 }, 1844 [ALC260_FIXUP_VAIO_PINS] = { 1845 .type = HDA_FIXUP_PINS, 1846 .v.pins = (const struct hda_pintbl[]) { 1847 /* Pin configs are missing completely on some VAIOs */ 1848 { 0x0f, 0x01211020 }, 1849 { 0x10, 0x0001003f }, 1850 { 0x11, 0x411111f0 }, 1851 { 0x12, 0x01a15930 }, 1852 { 0x13, 0x411111f0 }, 1853 { 0x14, 0x411111f0 }, 1854 { 0x15, 0x411111f0 }, 1855 { 0x16, 0x411111f0 }, 1856 { 0x17, 0x411111f0 }, 1857 { 0x18, 0x411111f0 }, 1858 { 0x19, 0x411111f0 }, 1859 { } 1860 } 1861 }, 1862 }; 1863 1864 static const struct snd_pci_quirk alc260_fixup_tbl[] = { 1865 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1), 1866 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF), 1867 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), 1868 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 1869 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), 1870 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS), 1871 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), 1872 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), 1873 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), 1874 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), 1875 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), 1876 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), 1877 {} 1878 }; 1879 1880 static const struct hda_model_fixup alc260_fixup_models[] = { 1881 {.id = ALC260_FIXUP_GPIO1, .name = "gpio1"}, 1882 {.id = ALC260_FIXUP_COEF, .name = "coef"}, 1883 {.id = ALC260_FIXUP_FSC_S7020, .name = "fujitsu"}, 1884 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"}, 1885 {} 1886 }; 1887 1888 /* 1889 */ 1890 static int patch_alc260(struct hda_codec *codec) 1891 { 1892 struct alc_spec *spec; 1893 int err; 1894 1895 err = alc_alloc_spec(codec, 0x07); 1896 if (err < 0) 1897 return err; 1898 1899 spec = codec->spec; 1900 /* as quite a few machines require HP amp for speaker outputs, 1901 * it's easier to enable it unconditionally; even if it's unneeded, 1902 * it's almost harmless. 1903 */ 1904 spec->gen.prefer_hp_amp = 1; 1905 spec->gen.beep_nid = 0x01; 1906 1907 spec->shutup = alc_eapd_shutup; 1908 1909 alc_pre_init(codec); 1910 1911 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl, 1912 alc260_fixups); 1913 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1914 1915 /* automatic parse from the BIOS config */ 1916 err = alc260_parse_auto_config(codec); 1917 if (err < 0) 1918 goto error; 1919 1920 if (!spec->gen.no_analog) { 1921 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT); 1922 if (err < 0) 1923 goto error; 1924 } 1925 1926 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 1927 1928 return 0; 1929 1930 error: 1931 alc_free(codec); 1932 return err; 1933 } 1934 1935 1936 /* 1937 * ALC882/883/885/888/889 support 1938 * 1939 * ALC882 is almost identical with ALC880 but has cleaner and more flexible 1940 * configuration. Each pin widget can choose any input DACs and a mixer. 1941 * Each ADC is connected from a mixer of all inputs. This makes possible 1942 * 6-channel independent captures. 1943 * 1944 * In addition, an independent DAC for the multi-playback (not used in this 1945 * driver yet). 1946 */ 1947 1948 /* 1949 * Pin config fixes 1950 */ 1951 enum { 1952 ALC882_FIXUP_ABIT_AW9D_MAX, 1953 ALC882_FIXUP_LENOVO_Y530, 1954 ALC882_FIXUP_PB_M5210, 1955 ALC882_FIXUP_ACER_ASPIRE_7736, 1956 ALC882_FIXUP_ASUS_W90V, 1957 ALC889_FIXUP_CD, 1958 ALC889_FIXUP_FRONT_HP_NO_PRESENCE, 1959 ALC889_FIXUP_VAIO_TT, 1960 ALC888_FIXUP_EEE1601, 1961 ALC886_FIXUP_EAPD, 1962 ALC882_FIXUP_EAPD, 1963 ALC883_FIXUP_EAPD, 1964 ALC883_FIXUP_ACER_EAPD, 1965 ALC882_FIXUP_GPIO1, 1966 ALC882_FIXUP_GPIO2, 1967 ALC882_FIXUP_GPIO3, 1968 ALC889_FIXUP_COEF, 1969 ALC882_FIXUP_ASUS_W2JC, 1970 ALC882_FIXUP_ACER_ASPIRE_4930G, 1971 ALC882_FIXUP_ACER_ASPIRE_8930G, 1972 ALC882_FIXUP_ASPIRE_8930G_VERBS, 1973 ALC885_FIXUP_MACPRO_GPIO, 1974 ALC889_FIXUP_DAC_ROUTE, 1975 ALC889_FIXUP_MBP_VREF, 1976 ALC889_FIXUP_IMAC91_VREF, 1977 ALC889_FIXUP_MBA11_VREF, 1978 ALC889_FIXUP_MBA21_VREF, 1979 ALC889_FIXUP_MP11_VREF, 1980 ALC889_FIXUP_MP41_VREF, 1981 ALC882_FIXUP_INV_DMIC, 1982 ALC882_FIXUP_NO_PRIMARY_HP, 1983 ALC887_FIXUP_ASUS_BASS, 1984 ALC887_FIXUP_BASS_CHMAP, 1985 ALC1220_FIXUP_GB_DUAL_CODECS, 1986 ALC1220_FIXUP_GB_X570, 1987 ALC1220_FIXUP_CLEVO_P950, 1988 ALC1220_FIXUP_CLEVO_PB51ED, 1989 ALC1220_FIXUP_CLEVO_PB51ED_PINS, 1990 ALC887_FIXUP_ASUS_AUDIO, 1991 ALC887_FIXUP_ASUS_HMIC, 1992 ALCS1200A_FIXUP_MIC_VREF, 1993 ALC888VD_FIXUP_MIC_100VREF, 1994 }; 1995 1996 static void alc889_fixup_coef(struct hda_codec *codec, 1997 const struct hda_fixup *fix, int action) 1998 { 1999 if (action != HDA_FIXUP_ACT_INIT) 2000 return; 2001 alc_update_coef_idx(codec, 7, 0, 0x2030); 2002 } 2003 2004 /* set up GPIO at initialization */ 2005 static void alc885_fixup_macpro_gpio(struct hda_codec *codec, 2006 const struct hda_fixup *fix, int action) 2007 { 2008 struct alc_spec *spec = codec->spec; 2009 2010 spec->gpio_write_delay = true; 2011 alc_fixup_gpio3(codec, fix, action); 2012 } 2013 2014 /* Fix the connection of some pins for ALC889: 2015 * At least, Acer Aspire 5935 shows the connections to DAC3/4 don't 2016 * work correctly (bko#42740) 2017 */ 2018 static void alc889_fixup_dac_route(struct hda_codec *codec, 2019 const struct hda_fixup *fix, int action) 2020 { 2021 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 2022 /* fake the connections during parsing the tree */ 2023 static const hda_nid_t conn1[] = { 0x0c, 0x0d }; 2024 static const hda_nid_t conn2[] = { 0x0e, 0x0f }; 2025 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2026 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); 2027 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2); 2028 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2); 2029 } else if (action == HDA_FIXUP_ACT_PROBE) { 2030 /* restore the connections */ 2031 static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; 2032 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 2033 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); 2034 snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn); 2035 snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn); 2036 } 2037 } 2038 2039 /* Set VREF on HP pin */ 2040 static void alc889_fixup_mbp_vref(struct hda_codec *codec, 2041 const struct hda_fixup *fix, int action) 2042 { 2043 static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 }; 2044 struct alc_spec *spec = codec->spec; 2045 int i; 2046 2047 if (action != HDA_FIXUP_ACT_INIT) 2048 return; 2049 for (i = 0; i < ARRAY_SIZE(nids); i++) { 2050 unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]); 2051 if (get_defcfg_device(val) != AC_JACK_HP_OUT) 2052 continue; 2053 val = snd_hda_codec_get_pin_target(codec, nids[i]); 2054 val |= AC_PINCTL_VREF_80; 2055 snd_hda_set_pin_ctl(codec, nids[i], val); 2056 spec->gen.keep_vref_in_automute = 1; 2057 break; 2058 } 2059 } 2060 2061 static void alc889_fixup_mac_pins(struct hda_codec *codec, 2062 const hda_nid_t *nids, int num_nids) 2063 { 2064 struct alc_spec *spec = codec->spec; 2065 int i; 2066 2067 for (i = 0; i < num_nids; i++) { 2068 unsigned int val; 2069 val = snd_hda_codec_get_pin_target(codec, nids[i]); 2070 val |= AC_PINCTL_VREF_50; 2071 snd_hda_set_pin_ctl(codec, nids[i], val); 2072 } 2073 spec->gen.keep_vref_in_automute = 1; 2074 } 2075 2076 /* Set VREF on speaker pins on imac91 */ 2077 static void alc889_fixup_imac91_vref(struct hda_codec *codec, 2078 const struct hda_fixup *fix, int action) 2079 { 2080 static const hda_nid_t nids[] = { 0x18, 0x1a }; 2081 2082 if (action == HDA_FIXUP_ACT_INIT) 2083 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2084 } 2085 2086 /* Set VREF on speaker pins on mba11 */ 2087 static void alc889_fixup_mba11_vref(struct hda_codec *codec, 2088 const struct hda_fixup *fix, int action) 2089 { 2090 static const hda_nid_t nids[] = { 0x18 }; 2091 2092 if (action == HDA_FIXUP_ACT_INIT) 2093 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2094 } 2095 2096 /* Set VREF on speaker pins on mba21 */ 2097 static void alc889_fixup_mba21_vref(struct hda_codec *codec, 2098 const struct hda_fixup *fix, int action) 2099 { 2100 static const hda_nid_t nids[] = { 0x18, 0x19 }; 2101 2102 if (action == HDA_FIXUP_ACT_INIT) 2103 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 2104 } 2105 2106 /* Don't take HP output as primary 2107 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio 2108 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 2109 */ 2110 static void alc882_fixup_no_primary_hp(struct hda_codec *codec, 2111 const struct hda_fixup *fix, int action) 2112 { 2113 struct alc_spec *spec = codec->spec; 2114 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 2115 spec->gen.no_primary_hp = 1; 2116 spec->gen.no_multi_io = 1; 2117 } 2118 } 2119 2120 static void alc_fixup_bass_chmap(struct hda_codec *codec, 2121 const struct hda_fixup *fix, int action); 2122 2123 /* For dual-codec configuration, we need to disable some features to avoid 2124 * conflicts of kctls and PCM streams 2125 */ 2126 static void alc_fixup_dual_codecs(struct hda_codec *codec, 2127 const struct hda_fixup *fix, int action) 2128 { 2129 struct alc_spec *spec = codec->spec; 2130 2131 if (action != HDA_FIXUP_ACT_PRE_PROBE) 2132 return; 2133 /* disable vmaster */ 2134 spec->gen.suppress_vmaster = 1; 2135 /* auto-mute and auto-mic switch don't work with multiple codecs */ 2136 spec->gen.suppress_auto_mute = 1; 2137 spec->gen.suppress_auto_mic = 1; 2138 /* disable aamix as well */ 2139 spec->gen.mixer_nid = 0; 2140 /* add location prefix to avoid conflicts */ 2141 codec->force_pin_prefix = 1; 2142 } 2143 2144 static void rename_ctl(struct hda_codec *codec, const char *oldname, 2145 const char *newname) 2146 { 2147 struct snd_kcontrol *kctl; 2148 2149 kctl = snd_hda_find_mixer_ctl(codec, oldname); 2150 if (kctl) 2151 snd_ctl_rename(codec->card, kctl, newname); 2152 } 2153 2154 static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec, 2155 const struct hda_fixup *fix, 2156 int action) 2157 { 2158 alc_fixup_dual_codecs(codec, fix, action); 2159 switch (action) { 2160 case HDA_FIXUP_ACT_PRE_PROBE: 2161 /* override card longname to provide a unique UCM profile */ 2162 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs"); 2163 break; 2164 case HDA_FIXUP_ACT_BUILD: 2165 /* rename Capture controls depending on the codec */ 2166 rename_ctl(codec, "Capture Volume", 2167 codec->addr == 0 ? 2168 "Rear-Panel Capture Volume" : 2169 "Front-Panel Capture Volume"); 2170 rename_ctl(codec, "Capture Switch", 2171 codec->addr == 0 ? 2172 "Rear-Panel Capture Switch" : 2173 "Front-Panel Capture Switch"); 2174 break; 2175 } 2176 } 2177 2178 static void alc1220_fixup_gb_x570(struct hda_codec *codec, 2179 const struct hda_fixup *fix, 2180 int action) 2181 { 2182 static const hda_nid_t conn1[] = { 0x0c }; 2183 static const struct coef_fw gb_x570_coefs[] = { 2184 WRITE_COEF(0x07, 0x03c0), 2185 WRITE_COEF(0x1a, 0x01c1), 2186 WRITE_COEF(0x1b, 0x0202), 2187 WRITE_COEF(0x43, 0x3005), 2188 {} 2189 }; 2190 2191 switch (action) { 2192 case HDA_FIXUP_ACT_PRE_PROBE: 2193 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2194 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); 2195 break; 2196 case HDA_FIXUP_ACT_INIT: 2197 alc_process_coef_fw(codec, gb_x570_coefs); 2198 break; 2199 } 2200 } 2201 2202 static void alc1220_fixup_clevo_p950(struct hda_codec *codec, 2203 const struct hda_fixup *fix, 2204 int action) 2205 { 2206 static const hda_nid_t conn1[] = { 0x0c }; 2207 2208 if (action != HDA_FIXUP_ACT_PRE_PROBE) 2209 return; 2210 2211 alc_update_coef_idx(codec, 0x7, 0, 0x3c3); 2212 /* We therefore want to make sure 0x14 (front headphone) and 2213 * 0x1b (speakers) use the stereo DAC 0x02 2214 */ 2215 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 2216 snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); 2217 } 2218 2219 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, 2220 const struct hda_fixup *fix, int action); 2221 2222 static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec, 2223 const struct hda_fixup *fix, 2224 int action) 2225 { 2226 alc1220_fixup_clevo_p950(codec, fix, action); 2227 alc_fixup_headset_mode_no_hp_mic(codec, fix, action); 2228 } 2229 2230 static void alc887_asus_hp_automute_hook(struct hda_codec *codec, 2231 struct hda_jack_callback *jack) 2232 { 2233 struct alc_spec *spec = codec->spec; 2234 unsigned int vref; 2235 2236 snd_hda_gen_hp_automute(codec, jack); 2237 2238 if (spec->gen.hp_jack_present) 2239 vref = AC_PINCTL_VREF_80; 2240 else 2241 vref = AC_PINCTL_VREF_HIZ; 2242 snd_hda_set_pin_ctl(codec, 0x19, PIN_HP | vref); 2243 } 2244 2245 static void alc887_fixup_asus_jack(struct hda_codec *codec, 2246 const struct hda_fixup *fix, int action) 2247 { 2248 struct alc_spec *spec = codec->spec; 2249 if (action != HDA_FIXUP_ACT_PROBE) 2250 return; 2251 snd_hda_set_pin_ctl_cache(codec, 0x1b, PIN_HP); 2252 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook; 2253 } 2254 2255 static const struct hda_fixup alc882_fixups[] = { 2256 [ALC882_FIXUP_ABIT_AW9D_MAX] = { 2257 .type = HDA_FIXUP_PINS, 2258 .v.pins = (const struct hda_pintbl[]) { 2259 { 0x15, 0x01080104 }, /* side */ 2260 { 0x16, 0x01011012 }, /* rear */ 2261 { 0x17, 0x01016011 }, /* clfe */ 2262 { } 2263 } 2264 }, 2265 [ALC882_FIXUP_LENOVO_Y530] = { 2266 .type = HDA_FIXUP_PINS, 2267 .v.pins = (const struct hda_pintbl[]) { 2268 { 0x15, 0x99130112 }, /* rear int speakers */ 2269 { 0x16, 0x99130111 }, /* subwoofer */ 2270 { } 2271 } 2272 }, 2273 [ALC882_FIXUP_PB_M5210] = { 2274 .type = HDA_FIXUP_PINCTLS, 2275 .v.pins = (const struct hda_pintbl[]) { 2276 { 0x19, PIN_VREF50 }, 2277 {} 2278 } 2279 }, 2280 [ALC882_FIXUP_ACER_ASPIRE_7736] = { 2281 .type = HDA_FIXUP_FUNC, 2282 .v.func = alc_fixup_sku_ignore, 2283 }, 2284 [ALC882_FIXUP_ASUS_W90V] = { 2285 .type = HDA_FIXUP_PINS, 2286 .v.pins = (const struct hda_pintbl[]) { 2287 { 0x16, 0x99130110 }, /* fix sequence for CLFE */ 2288 { } 2289 } 2290 }, 2291 [ALC889_FIXUP_CD] = { 2292 .type = HDA_FIXUP_PINS, 2293 .v.pins = (const struct hda_pintbl[]) { 2294 { 0x1c, 0x993301f0 }, /* CD */ 2295 { } 2296 } 2297 }, 2298 [ALC889_FIXUP_FRONT_HP_NO_PRESENCE] = { 2299 .type = HDA_FIXUP_PINS, 2300 .v.pins = (const struct hda_pintbl[]) { 2301 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */ 2302 { } 2303 }, 2304 .chained = true, 2305 .chain_id = ALC889_FIXUP_CD, 2306 }, 2307 [ALC889_FIXUP_VAIO_TT] = { 2308 .type = HDA_FIXUP_PINS, 2309 .v.pins = (const struct hda_pintbl[]) { 2310 { 0x17, 0x90170111 }, /* hidden surround speaker */ 2311 { } 2312 } 2313 }, 2314 [ALC888_FIXUP_EEE1601] = { 2315 .type = HDA_FIXUP_VERBS, 2316 .v.verbs = (const struct hda_verb[]) { 2317 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b }, 2318 { 0x20, AC_VERB_SET_PROC_COEF, 0x0838 }, 2319 { } 2320 } 2321 }, 2322 [ALC886_FIXUP_EAPD] = { 2323 .type = HDA_FIXUP_VERBS, 2324 .v.verbs = (const struct hda_verb[]) { 2325 /* change to EAPD mode */ 2326 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2327 { 0x20, AC_VERB_SET_PROC_COEF, 0x0068 }, 2328 { } 2329 } 2330 }, 2331 [ALC882_FIXUP_EAPD] = { 2332 .type = HDA_FIXUP_VERBS, 2333 .v.verbs = (const struct hda_verb[]) { 2334 /* change to EAPD mode */ 2335 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2336 { 0x20, AC_VERB_SET_PROC_COEF, 0x3060 }, 2337 { } 2338 } 2339 }, 2340 [ALC883_FIXUP_EAPD] = { 2341 .type = HDA_FIXUP_VERBS, 2342 .v.verbs = (const struct hda_verb[]) { 2343 /* change to EAPD mode */ 2344 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2345 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 2346 { } 2347 } 2348 }, 2349 [ALC883_FIXUP_ACER_EAPD] = { 2350 .type = HDA_FIXUP_VERBS, 2351 .v.verbs = (const struct hda_verb[]) { 2352 /* eanable EAPD on Acer laptops */ 2353 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2354 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2355 { } 2356 } 2357 }, 2358 [ALC882_FIXUP_GPIO1] = { 2359 .type = HDA_FIXUP_FUNC, 2360 .v.func = alc_fixup_gpio1, 2361 }, 2362 [ALC882_FIXUP_GPIO2] = { 2363 .type = HDA_FIXUP_FUNC, 2364 .v.func = alc_fixup_gpio2, 2365 }, 2366 [ALC882_FIXUP_GPIO3] = { 2367 .type = HDA_FIXUP_FUNC, 2368 .v.func = alc_fixup_gpio3, 2369 }, 2370 [ALC882_FIXUP_ASUS_W2JC] = { 2371 .type = HDA_FIXUP_FUNC, 2372 .v.func = alc_fixup_gpio1, 2373 .chained = true, 2374 .chain_id = ALC882_FIXUP_EAPD, 2375 }, 2376 [ALC889_FIXUP_COEF] = { 2377 .type = HDA_FIXUP_FUNC, 2378 .v.func = alc889_fixup_coef, 2379 }, 2380 [ALC882_FIXUP_ACER_ASPIRE_4930G] = { 2381 .type = HDA_FIXUP_PINS, 2382 .v.pins = (const struct hda_pintbl[]) { 2383 { 0x16, 0x99130111 }, /* CLFE speaker */ 2384 { 0x17, 0x99130112 }, /* surround speaker */ 2385 { } 2386 }, 2387 .chained = true, 2388 .chain_id = ALC882_FIXUP_GPIO1, 2389 }, 2390 [ALC882_FIXUP_ACER_ASPIRE_8930G] = { 2391 .type = HDA_FIXUP_PINS, 2392 .v.pins = (const struct hda_pintbl[]) { 2393 { 0x16, 0x99130111 }, /* CLFE speaker */ 2394 { 0x1b, 0x99130112 }, /* surround speaker */ 2395 { } 2396 }, 2397 .chained = true, 2398 .chain_id = ALC882_FIXUP_ASPIRE_8930G_VERBS, 2399 }, 2400 [ALC882_FIXUP_ASPIRE_8930G_VERBS] = { 2401 /* additional init verbs for Acer Aspire 8930G */ 2402 .type = HDA_FIXUP_VERBS, 2403 .v.verbs = (const struct hda_verb[]) { 2404 /* Enable all DACs */ 2405 /* DAC DISABLE/MUTE 1? */ 2406 /* setting bits 1-5 disables DAC nids 0x02-0x06 2407 * apparently. Init=0x38 */ 2408 { 0x20, AC_VERB_SET_COEF_INDEX, 0x03 }, 2409 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, 2410 /* DAC DISABLE/MUTE 2? */ 2411 /* some bit here disables the other DACs. 2412 * Init=0x4900 */ 2413 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08 }, 2414 { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, 2415 /* DMIC fix 2416 * This laptop has a stereo digital microphone. 2417 * The mics are only 1cm apart which makes the stereo 2418 * useless. However, either the mic or the ALC889 2419 * makes the signal become a difference/sum signal 2420 * instead of standard stereo, which is annoying. 2421 * So instead we flip this bit which makes the 2422 * codec replicate the sum signal to both channels, 2423 * turning it into a normal mono mic. 2424 */ 2425 /* DMIC_CONTROL? Init value = 0x0001 */ 2426 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b }, 2427 { 0x20, AC_VERB_SET_PROC_COEF, 0x0003 }, 2428 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2429 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2430 { } 2431 }, 2432 .chained = true, 2433 .chain_id = ALC882_FIXUP_GPIO1, 2434 }, 2435 [ALC885_FIXUP_MACPRO_GPIO] = { 2436 .type = HDA_FIXUP_FUNC, 2437 .v.func = alc885_fixup_macpro_gpio, 2438 }, 2439 [ALC889_FIXUP_DAC_ROUTE] = { 2440 .type = HDA_FIXUP_FUNC, 2441 .v.func = alc889_fixup_dac_route, 2442 }, 2443 [ALC889_FIXUP_MBP_VREF] = { 2444 .type = HDA_FIXUP_FUNC, 2445 .v.func = alc889_fixup_mbp_vref, 2446 .chained = true, 2447 .chain_id = ALC882_FIXUP_GPIO1, 2448 }, 2449 [ALC889_FIXUP_IMAC91_VREF] = { 2450 .type = HDA_FIXUP_FUNC, 2451 .v.func = alc889_fixup_imac91_vref, 2452 .chained = true, 2453 .chain_id = ALC882_FIXUP_GPIO1, 2454 }, 2455 [ALC889_FIXUP_MBA11_VREF] = { 2456 .type = HDA_FIXUP_FUNC, 2457 .v.func = alc889_fixup_mba11_vref, 2458 .chained = true, 2459 .chain_id = ALC889_FIXUP_MBP_VREF, 2460 }, 2461 [ALC889_FIXUP_MBA21_VREF] = { 2462 .type = HDA_FIXUP_FUNC, 2463 .v.func = alc889_fixup_mba21_vref, 2464 .chained = true, 2465 .chain_id = ALC889_FIXUP_MBP_VREF, 2466 }, 2467 [ALC889_FIXUP_MP11_VREF] = { 2468 .type = HDA_FIXUP_FUNC, 2469 .v.func = alc889_fixup_mba11_vref, 2470 .chained = true, 2471 .chain_id = ALC885_FIXUP_MACPRO_GPIO, 2472 }, 2473 [ALC889_FIXUP_MP41_VREF] = { 2474 .type = HDA_FIXUP_FUNC, 2475 .v.func = alc889_fixup_mbp_vref, 2476 .chained = true, 2477 .chain_id = ALC885_FIXUP_MACPRO_GPIO, 2478 }, 2479 [ALC882_FIXUP_INV_DMIC] = { 2480 .type = HDA_FIXUP_FUNC, 2481 .v.func = alc_fixup_inv_dmic, 2482 }, 2483 [ALC882_FIXUP_NO_PRIMARY_HP] = { 2484 .type = HDA_FIXUP_FUNC, 2485 .v.func = alc882_fixup_no_primary_hp, 2486 }, 2487 [ALC887_FIXUP_ASUS_BASS] = { 2488 .type = HDA_FIXUP_PINS, 2489 .v.pins = (const struct hda_pintbl[]) { 2490 {0x16, 0x99130130}, /* bass speaker */ 2491 {} 2492 }, 2493 .chained = true, 2494 .chain_id = ALC887_FIXUP_BASS_CHMAP, 2495 }, 2496 [ALC887_FIXUP_BASS_CHMAP] = { 2497 .type = HDA_FIXUP_FUNC, 2498 .v.func = alc_fixup_bass_chmap, 2499 }, 2500 [ALC1220_FIXUP_GB_DUAL_CODECS] = { 2501 .type = HDA_FIXUP_FUNC, 2502 .v.func = alc1220_fixup_gb_dual_codecs, 2503 }, 2504 [ALC1220_FIXUP_GB_X570] = { 2505 .type = HDA_FIXUP_FUNC, 2506 .v.func = alc1220_fixup_gb_x570, 2507 }, 2508 [ALC1220_FIXUP_CLEVO_P950] = { 2509 .type = HDA_FIXUP_FUNC, 2510 .v.func = alc1220_fixup_clevo_p950, 2511 }, 2512 [ALC1220_FIXUP_CLEVO_PB51ED] = { 2513 .type = HDA_FIXUP_FUNC, 2514 .v.func = alc1220_fixup_clevo_pb51ed, 2515 }, 2516 [ALC1220_FIXUP_CLEVO_PB51ED_PINS] = { 2517 .type = HDA_FIXUP_PINS, 2518 .v.pins = (const struct hda_pintbl[]) { 2519 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 2520 {} 2521 }, 2522 .chained = true, 2523 .chain_id = ALC1220_FIXUP_CLEVO_PB51ED, 2524 }, 2525 [ALC887_FIXUP_ASUS_AUDIO] = { 2526 .type = HDA_FIXUP_PINS, 2527 .v.pins = (const struct hda_pintbl[]) { 2528 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */ 2529 { 0x19, 0x22219420 }, 2530 {} 2531 }, 2532 }, 2533 [ALC887_FIXUP_ASUS_HMIC] = { 2534 .type = HDA_FIXUP_FUNC, 2535 .v.func = alc887_fixup_asus_jack, 2536 .chained = true, 2537 .chain_id = ALC887_FIXUP_ASUS_AUDIO, 2538 }, 2539 [ALCS1200A_FIXUP_MIC_VREF] = { 2540 .type = HDA_FIXUP_PINCTLS, 2541 .v.pins = (const struct hda_pintbl[]) { 2542 { 0x18, PIN_VREF50 }, /* rear mic */ 2543 { 0x19, PIN_VREF50 }, /* front mic */ 2544 {} 2545 } 2546 }, 2547 [ALC888VD_FIXUP_MIC_100VREF] = { 2548 .type = HDA_FIXUP_PINCTLS, 2549 .v.pins = (const struct hda_pintbl[]) { 2550 { 0x18, PIN_VREF100 }, /* headset mic */ 2551 {} 2552 } 2553 }, 2554 }; 2555 2556 static const struct snd_pci_quirk alc882_fixup_tbl[] = { 2557 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD), 2558 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2559 SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2560 SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD), 2561 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), 2562 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD), 2563 SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD), 2564 SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", 2565 ALC882_FIXUP_ACER_ASPIRE_4930G), 2566 SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", 2567 ALC882_FIXUP_ACER_ASPIRE_4930G), 2568 SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G", 2569 ALC882_FIXUP_ACER_ASPIRE_8930G), 2570 SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", 2571 ALC882_FIXUP_ACER_ASPIRE_8930G), 2572 SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", 2573 ALC882_FIXUP_ACER_ASPIRE_4930G), 2574 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 2575 SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", 2576 ALC882_FIXUP_ACER_ASPIRE_4930G), 2577 SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", 2578 ALC882_FIXUP_ACER_ASPIRE_4930G), 2579 SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G", 2580 ALC882_FIXUP_ACER_ASPIRE_4930G), 2581 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), 2582 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G), 2583 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 2584 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), 2585 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 2586 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), 2587 SND_PCI_QUIRK(0x1043, 0x2390, "Asus D700SA", ALC887_FIXUP_ASUS_HMIC), 2588 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), 2589 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), 2590 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), 2591 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), 2592 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), 2593 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), 2594 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 2595 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), 2596 SND_PCI_QUIRK(0x104d, 0x9060, "Sony Vaio VPCL14M1R", ALC882_FIXUP_NO_PRIMARY_HP), 2597 2598 /* All Apple entries are in codec SSIDs */ 2599 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), 2600 SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF), 2601 SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), 2602 SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF), 2603 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO), 2604 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO), 2605 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF), 2606 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), 2607 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), 2608 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF), 2609 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF), 2610 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), 2611 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), 2612 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), 2613 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF), 2614 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), 2615 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), 2616 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF), 2617 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF), 2618 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), 2619 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), 2620 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF), 2621 2622 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 2623 SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF), 2624 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD), 2625 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), 2626 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2627 SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570), 2628 SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570), 2629 SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570), 2630 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950), 2631 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950), 2632 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950), 2633 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950), 2634 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950), 2635 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), 2636 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), 2637 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS), 2638 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2639 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 2640 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 2641 SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2642 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2643 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2644 SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2645 SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2646 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2647 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2648 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2649 SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2650 SND_PCI_QUIRK(0x1558, 0x66a6, "Clevo PE60SN[CDE]-[GS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2651 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2652 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2653 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2654 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2655 SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2656 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2657 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2658 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), 2659 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), 2660 SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950), 2661 SND_PCI_QUIRK(0x1558, 0x950a, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950), 2662 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), 2663 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), 2664 SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950), 2665 SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950), 2666 SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950), 2667 SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950), 2668 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950), 2669 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950), 2670 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950), 2671 SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2672 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2673 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 2674 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), 2675 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF), 2676 {} 2677 }; 2678 2679 static const struct hda_model_fixup alc882_fixup_models[] = { 2680 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"}, 2681 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"}, 2682 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"}, 2683 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"}, 2684 {.id = ALC889_FIXUP_CD, .name = "cd"}, 2685 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"}, 2686 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"}, 2687 {.id = ALC888_FIXUP_EEE1601, .name = "eee1601"}, 2688 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"}, 2689 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"}, 2690 {.id = ALC882_FIXUP_GPIO1, .name = "gpio1"}, 2691 {.id = ALC882_FIXUP_GPIO2, .name = "gpio2"}, 2692 {.id = ALC882_FIXUP_GPIO3, .name = "gpio3"}, 2693 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"}, 2694 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"}, 2695 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"}, 2696 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, 2697 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, 2698 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"}, 2699 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"}, 2700 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"}, 2701 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"}, 2702 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"}, 2703 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"}, 2704 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"}, 2705 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"}, 2706 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, 2707 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, 2708 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"}, 2709 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"}, 2710 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"}, 2711 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"}, 2712 {} 2713 }; 2714 2715 static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = { 2716 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950, 2717 {0x14, 0x01014010}, 2718 {0x15, 0x01011012}, 2719 {0x16, 0x01016011}, 2720 {0x18, 0x01a19040}, 2721 {0x19, 0x02a19050}, 2722 {0x1a, 0x0181304f}, 2723 {0x1b, 0x0221401f}, 2724 {0x1e, 0x01456130}), 2725 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950, 2726 {0x14, 0x01015010}, 2727 {0x15, 0x01011012}, 2728 {0x16, 0x01011011}, 2729 {0x18, 0x01a11040}, 2730 {0x19, 0x02a19050}, 2731 {0x1a, 0x0181104f}, 2732 {0x1b, 0x0221401f}, 2733 {0x1e, 0x01451130}), 2734 {} 2735 }; 2736 2737 /* 2738 * BIOS auto configuration 2739 */ 2740 /* almost identical with ALC880 parser... */ 2741 static int alc882_parse_auto_config(struct hda_codec *codec) 2742 { 2743 static const hda_nid_t alc882_ignore[] = { 0x1d, 0 }; 2744 static const hda_nid_t alc882_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 2745 return alc_parse_auto_config(codec, alc882_ignore, alc882_ssids); 2746 } 2747 2748 /* 2749 */ 2750 static int patch_alc882(struct hda_codec *codec) 2751 { 2752 struct alc_spec *spec; 2753 int err; 2754 2755 err = alc_alloc_spec(codec, 0x0b); 2756 if (err < 0) 2757 return err; 2758 2759 spec = codec->spec; 2760 2761 switch (codec->core.vendor_id) { 2762 case 0x10ec0882: 2763 case 0x10ec0885: 2764 case 0x10ec0900: 2765 case 0x10ec0b00: 2766 case 0x10ec1220: 2767 break; 2768 default: 2769 /* ALC883 and variants */ 2770 alc_fix_pll_init(codec, 0x20, 0x0a, 10); 2771 break; 2772 } 2773 2774 alc_pre_init(codec); 2775 2776 snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl, 2777 alc882_fixups); 2778 snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true); 2779 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 2780 2781 alc_auto_parse_customize_define(codec); 2782 2783 if (has_cdefine_beep(codec)) 2784 spec->gen.beep_nid = 0x01; 2785 2786 /* automatic parse from the BIOS config */ 2787 err = alc882_parse_auto_config(codec); 2788 if (err < 0) 2789 goto error; 2790 2791 if (!spec->gen.no_analog && spec->gen.beep_nid) { 2792 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 2793 if (err < 0) 2794 goto error; 2795 } 2796 2797 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 2798 2799 return 0; 2800 2801 error: 2802 alc_free(codec); 2803 return err; 2804 } 2805 2806 2807 /* 2808 * ALC262 support 2809 */ 2810 static int alc262_parse_auto_config(struct hda_codec *codec) 2811 { 2812 static const hda_nid_t alc262_ignore[] = { 0x1d, 0 }; 2813 static const hda_nid_t alc262_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 2814 return alc_parse_auto_config(codec, alc262_ignore, alc262_ssids); 2815 } 2816 2817 /* 2818 * Pin config fixes 2819 */ 2820 enum { 2821 ALC262_FIXUP_FSC_H270, 2822 ALC262_FIXUP_FSC_S7110, 2823 ALC262_FIXUP_HP_Z200, 2824 ALC262_FIXUP_TYAN, 2825 ALC262_FIXUP_LENOVO_3000, 2826 ALC262_FIXUP_BENQ, 2827 ALC262_FIXUP_BENQ_T31, 2828 ALC262_FIXUP_INV_DMIC, 2829 ALC262_FIXUP_INTEL_BAYLEYBAY, 2830 }; 2831 2832 static const struct hda_fixup alc262_fixups[] = { 2833 [ALC262_FIXUP_FSC_H270] = { 2834 .type = HDA_FIXUP_PINS, 2835 .v.pins = (const struct hda_pintbl[]) { 2836 { 0x14, 0x99130110 }, /* speaker */ 2837 { 0x15, 0x0221142f }, /* front HP */ 2838 { 0x1b, 0x0121141f }, /* rear HP */ 2839 { } 2840 } 2841 }, 2842 [ALC262_FIXUP_FSC_S7110] = { 2843 .type = HDA_FIXUP_PINS, 2844 .v.pins = (const struct hda_pintbl[]) { 2845 { 0x15, 0x90170110 }, /* speaker */ 2846 { } 2847 }, 2848 .chained = true, 2849 .chain_id = ALC262_FIXUP_BENQ, 2850 }, 2851 [ALC262_FIXUP_HP_Z200] = { 2852 .type = HDA_FIXUP_PINS, 2853 .v.pins = (const struct hda_pintbl[]) { 2854 { 0x16, 0x99130120 }, /* internal speaker */ 2855 { } 2856 } 2857 }, 2858 [ALC262_FIXUP_TYAN] = { 2859 .type = HDA_FIXUP_PINS, 2860 .v.pins = (const struct hda_pintbl[]) { 2861 { 0x14, 0x1993e1f0 }, /* int AUX */ 2862 { } 2863 } 2864 }, 2865 [ALC262_FIXUP_LENOVO_3000] = { 2866 .type = HDA_FIXUP_PINCTLS, 2867 .v.pins = (const struct hda_pintbl[]) { 2868 { 0x19, PIN_VREF50 }, 2869 {} 2870 }, 2871 .chained = true, 2872 .chain_id = ALC262_FIXUP_BENQ, 2873 }, 2874 [ALC262_FIXUP_BENQ] = { 2875 .type = HDA_FIXUP_VERBS, 2876 .v.verbs = (const struct hda_verb[]) { 2877 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2878 { 0x20, AC_VERB_SET_PROC_COEF, 0x3070 }, 2879 {} 2880 } 2881 }, 2882 [ALC262_FIXUP_BENQ_T31] = { 2883 .type = HDA_FIXUP_VERBS, 2884 .v.verbs = (const struct hda_verb[]) { 2885 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 2886 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 2887 {} 2888 } 2889 }, 2890 [ALC262_FIXUP_INV_DMIC] = { 2891 .type = HDA_FIXUP_FUNC, 2892 .v.func = alc_fixup_inv_dmic, 2893 }, 2894 [ALC262_FIXUP_INTEL_BAYLEYBAY] = { 2895 .type = HDA_FIXUP_FUNC, 2896 .v.func = alc_fixup_no_depop_delay, 2897 }, 2898 }; 2899 2900 static const struct snd_pci_quirk alc262_fixup_tbl[] = { 2901 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200), 2902 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110), 2903 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ), 2904 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN), 2905 SND_PCI_QUIRK(0x1734, 0x1141, "FSC ESPRIMO U9210", ALC262_FIXUP_FSC_H270), 2906 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270), 2907 SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000", ALC262_FIXUP_LENOVO_3000), 2908 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ), 2909 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31), 2910 SND_PCI_QUIRK(0x8086, 0x7270, "BayleyBay", ALC262_FIXUP_INTEL_BAYLEYBAY), 2911 {} 2912 }; 2913 2914 static const struct hda_model_fixup alc262_fixup_models[] = { 2915 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"}, 2916 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"}, 2917 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"}, 2918 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"}, 2919 {.id = ALC262_FIXUP_TYAN, .name = "tyan"}, 2920 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"}, 2921 {.id = ALC262_FIXUP_BENQ, .name = "benq"}, 2922 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"}, 2923 {.id = ALC262_FIXUP_INTEL_BAYLEYBAY, .name = "bayleybay"}, 2924 {} 2925 }; 2926 2927 /* 2928 */ 2929 static int patch_alc262(struct hda_codec *codec) 2930 { 2931 struct alc_spec *spec; 2932 int err; 2933 2934 err = alc_alloc_spec(codec, 0x0b); 2935 if (err < 0) 2936 return err; 2937 2938 spec = codec->spec; 2939 spec->gen.shared_mic_vref_pin = 0x18; 2940 2941 spec->shutup = alc_eapd_shutup; 2942 2943 #if 0 2944 /* pshou 07/11/05 set a zero PCM sample to DAC when FIFO is 2945 * under-run 2946 */ 2947 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x80); 2948 #endif 2949 alc_fix_pll_init(codec, 0x20, 0x0a, 10); 2950 2951 alc_pre_init(codec); 2952 2953 snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl, 2954 alc262_fixups); 2955 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 2956 2957 alc_auto_parse_customize_define(codec); 2958 2959 if (has_cdefine_beep(codec)) 2960 spec->gen.beep_nid = 0x01; 2961 2962 /* automatic parse from the BIOS config */ 2963 err = alc262_parse_auto_config(codec); 2964 if (err < 0) 2965 goto error; 2966 2967 if (!spec->gen.no_analog && spec->gen.beep_nid) { 2968 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 2969 if (err < 0) 2970 goto error; 2971 } 2972 2973 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 2974 2975 return 0; 2976 2977 error: 2978 alc_free(codec); 2979 return err; 2980 } 2981 2982 /* 2983 * ALC268 2984 */ 2985 /* bind Beep switches of both NID 0x0f and 0x10 */ 2986 static int alc268_beep_switch_put(struct snd_kcontrol *kcontrol, 2987 struct snd_ctl_elem_value *ucontrol) 2988 { 2989 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2990 unsigned long pval; 2991 int err; 2992 2993 mutex_lock(&codec->control_mutex); 2994 pval = kcontrol->private_value; 2995 kcontrol->private_value = (pval & ~0xff) | 0x0f; 2996 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); 2997 if (err >= 0) { 2998 kcontrol->private_value = (pval & ~0xff) | 0x10; 2999 err = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); 3000 } 3001 kcontrol->private_value = pval; 3002 mutex_unlock(&codec->control_mutex); 3003 return err; 3004 } 3005 3006 static const struct snd_kcontrol_new alc268_beep_mixer[] = { 3007 HDA_CODEC_VOLUME("Beep Playback Volume", 0x1d, 0x0, HDA_INPUT), 3008 { 3009 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3010 .name = "Beep Playback Switch", 3011 .subdevice = HDA_SUBDEV_AMP_FLAG, 3012 .info = snd_hda_mixer_amp_switch_info, 3013 .get = snd_hda_mixer_amp_switch_get, 3014 .put = alc268_beep_switch_put, 3015 .private_value = HDA_COMPOSE_AMP_VAL(0x0f, 3, 1, HDA_INPUT) 3016 }, 3017 }; 3018 3019 /* set PCBEEP vol = 0, mute connections */ 3020 static const struct hda_verb alc268_beep_init_verbs[] = { 3021 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 3022 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 3023 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 3024 { } 3025 }; 3026 3027 enum { 3028 ALC268_FIXUP_INV_DMIC, 3029 ALC268_FIXUP_HP_EAPD, 3030 ALC268_FIXUP_SPDIF, 3031 }; 3032 3033 static const struct hda_fixup alc268_fixups[] = { 3034 [ALC268_FIXUP_INV_DMIC] = { 3035 .type = HDA_FIXUP_FUNC, 3036 .v.func = alc_fixup_inv_dmic, 3037 }, 3038 [ALC268_FIXUP_HP_EAPD] = { 3039 .type = HDA_FIXUP_VERBS, 3040 .v.verbs = (const struct hda_verb[]) { 3041 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0}, 3042 {} 3043 } 3044 }, 3045 [ALC268_FIXUP_SPDIF] = { 3046 .type = HDA_FIXUP_PINS, 3047 .v.pins = (const struct hda_pintbl[]) { 3048 { 0x1e, 0x014b1180 }, /* enable SPDIF out */ 3049 {} 3050 } 3051 }, 3052 }; 3053 3054 static const struct hda_model_fixup alc268_fixup_models[] = { 3055 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, 3056 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"}, 3057 {.id = ALC268_FIXUP_SPDIF, .name = "spdif"}, 3058 {} 3059 }; 3060 3061 static const struct snd_pci_quirk alc268_fixup_tbl[] = { 3062 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF), 3063 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC), 3064 /* below is codec SSID since multiple Toshiba laptops have the 3065 * same PCI SSID 1179:ff00 3066 */ 3067 SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD), 3068 {} 3069 }; 3070 3071 /* 3072 * BIOS auto configuration 3073 */ 3074 static int alc268_parse_auto_config(struct hda_codec *codec) 3075 { 3076 static const hda_nid_t alc268_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 3077 return alc_parse_auto_config(codec, NULL, alc268_ssids); 3078 } 3079 3080 /* 3081 */ 3082 static int patch_alc268(struct hda_codec *codec) 3083 { 3084 struct alc_spec *spec; 3085 int i, err; 3086 3087 /* ALC268 has no aa-loopback mixer */ 3088 err = alc_alloc_spec(codec, 0); 3089 if (err < 0) 3090 return err; 3091 3092 spec = codec->spec; 3093 if (has_cdefine_beep(codec)) 3094 spec->gen.beep_nid = 0x01; 3095 3096 spec->shutup = alc_eapd_shutup; 3097 3098 alc_pre_init(codec); 3099 3100 snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); 3101 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 3102 3103 /* automatic parse from the BIOS config */ 3104 err = alc268_parse_auto_config(codec); 3105 if (err < 0) 3106 goto error; 3107 3108 if (err > 0 && !spec->gen.no_analog && 3109 spec->gen.autocfg.speaker_pins[0] != 0x1d) { 3110 for (i = 0; i < ARRAY_SIZE(alc268_beep_mixer); i++) { 3111 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, 3112 &alc268_beep_mixer[i])) { 3113 err = -ENOMEM; 3114 goto error; 3115 } 3116 } 3117 snd_hda_add_verbs(codec, alc268_beep_init_verbs); 3118 if (!query_amp_caps(codec, 0x1d, HDA_INPUT)) 3119 /* override the amp caps for beep generator */ 3120 snd_hda_override_amp_caps(codec, 0x1d, HDA_INPUT, 3121 (0x0c << AC_AMPCAP_OFFSET_SHIFT) | 3122 (0x0c << AC_AMPCAP_NUM_STEPS_SHIFT) | 3123 (0x07 << AC_AMPCAP_STEP_SIZE_SHIFT) | 3124 (0 << AC_AMPCAP_MUTE_SHIFT)); 3125 } 3126 3127 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 3128 3129 return 0; 3130 3131 error: 3132 alc_free(codec); 3133 return err; 3134 } 3135 3136 /* 3137 * ALC269 3138 */ 3139 3140 static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = { 3141 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 3142 }; 3143 3144 static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = { 3145 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 3146 }; 3147 3148 /* different alc269-variants */ 3149 enum { 3150 ALC269_TYPE_ALC269VA, 3151 ALC269_TYPE_ALC269VB, 3152 ALC269_TYPE_ALC269VC, 3153 ALC269_TYPE_ALC269VD, 3154 ALC269_TYPE_ALC280, 3155 ALC269_TYPE_ALC282, 3156 ALC269_TYPE_ALC283, 3157 ALC269_TYPE_ALC284, 3158 ALC269_TYPE_ALC293, 3159 ALC269_TYPE_ALC286, 3160 ALC269_TYPE_ALC298, 3161 ALC269_TYPE_ALC255, 3162 ALC269_TYPE_ALC256, 3163 ALC269_TYPE_ALC257, 3164 ALC269_TYPE_ALC215, 3165 ALC269_TYPE_ALC225, 3166 ALC269_TYPE_ALC245, 3167 ALC269_TYPE_ALC287, 3168 ALC269_TYPE_ALC294, 3169 ALC269_TYPE_ALC300, 3170 ALC269_TYPE_ALC623, 3171 ALC269_TYPE_ALC700, 3172 }; 3173 3174 /* 3175 * BIOS auto configuration 3176 */ 3177 static int alc269_parse_auto_config(struct hda_codec *codec) 3178 { 3179 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 }; 3180 static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 }; 3181 static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 3182 struct alc_spec *spec = codec->spec; 3183 const hda_nid_t *ssids; 3184 3185 switch (spec->codec_variant) { 3186 case ALC269_TYPE_ALC269VA: 3187 case ALC269_TYPE_ALC269VC: 3188 case ALC269_TYPE_ALC280: 3189 case ALC269_TYPE_ALC284: 3190 case ALC269_TYPE_ALC293: 3191 ssids = alc269va_ssids; 3192 break; 3193 case ALC269_TYPE_ALC269VB: 3194 case ALC269_TYPE_ALC269VD: 3195 case ALC269_TYPE_ALC282: 3196 case ALC269_TYPE_ALC283: 3197 case ALC269_TYPE_ALC286: 3198 case ALC269_TYPE_ALC298: 3199 case ALC269_TYPE_ALC255: 3200 case ALC269_TYPE_ALC256: 3201 case ALC269_TYPE_ALC257: 3202 case ALC269_TYPE_ALC215: 3203 case ALC269_TYPE_ALC225: 3204 case ALC269_TYPE_ALC245: 3205 case ALC269_TYPE_ALC287: 3206 case ALC269_TYPE_ALC294: 3207 case ALC269_TYPE_ALC300: 3208 case ALC269_TYPE_ALC623: 3209 case ALC269_TYPE_ALC700: 3210 ssids = alc269_ssids; 3211 break; 3212 default: 3213 ssids = alc269_ssids; 3214 break; 3215 } 3216 3217 return alc_parse_auto_config(codec, alc269_ignore, ssids); 3218 } 3219 3220 static const struct hda_jack_keymap alc_headset_btn_keymap[] = { 3221 { SND_JACK_BTN_0, KEY_PLAYPAUSE }, 3222 { SND_JACK_BTN_1, KEY_VOICECOMMAND }, 3223 { SND_JACK_BTN_2, KEY_VOLUMEUP }, 3224 { SND_JACK_BTN_3, KEY_VOLUMEDOWN }, 3225 {} 3226 }; 3227 3228 static void alc_headset_btn_callback(struct hda_codec *codec, 3229 struct hda_jack_callback *jack) 3230 { 3231 int report = 0; 3232 3233 if (jack->unsol_res & (7 << 13)) 3234 report |= SND_JACK_BTN_0; 3235 3236 if (jack->unsol_res & (1 << 16 | 3 << 8)) 3237 report |= SND_JACK_BTN_1; 3238 3239 /* Volume up key */ 3240 if (jack->unsol_res & (7 << 23)) 3241 report |= SND_JACK_BTN_2; 3242 3243 /* Volume down key */ 3244 if (jack->unsol_res & (7 << 10)) 3245 report |= SND_JACK_BTN_3; 3246 3247 snd_hda_jack_set_button_state(codec, jack->nid, report); 3248 } 3249 3250 static void alc_disable_headset_jack_key(struct hda_codec *codec) 3251 { 3252 struct alc_spec *spec = codec->spec; 3253 3254 if (!spec->has_hs_key) 3255 return; 3256 3257 switch (codec->core.vendor_id) { 3258 case 0x10ec0215: 3259 case 0x10ec0225: 3260 case 0x10ec0285: 3261 case 0x10ec0287: 3262 case 0x10ec0295: 3263 case 0x10ec0289: 3264 case 0x10ec0299: 3265 alc_write_coef_idx(codec, 0x48, 0x0); 3266 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); 3267 alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); 3268 break; 3269 case 0x10ec0230: 3270 case 0x10ec0236: 3271 case 0x10ec0256: 3272 case 0x10ec0257: 3273 case 0x19e58326: 3274 alc_write_coef_idx(codec, 0x48, 0x0); 3275 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); 3276 break; 3277 } 3278 } 3279 3280 static void alc_enable_headset_jack_key(struct hda_codec *codec) 3281 { 3282 struct alc_spec *spec = codec->spec; 3283 3284 if (!spec->has_hs_key) 3285 return; 3286 3287 switch (codec->core.vendor_id) { 3288 case 0x10ec0215: 3289 case 0x10ec0225: 3290 case 0x10ec0285: 3291 case 0x10ec0287: 3292 case 0x10ec0295: 3293 case 0x10ec0289: 3294 case 0x10ec0299: 3295 alc_write_coef_idx(codec, 0x48, 0xd011); 3296 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); 3297 alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); 3298 break; 3299 case 0x10ec0230: 3300 case 0x10ec0236: 3301 case 0x10ec0256: 3302 case 0x10ec0257: 3303 case 0x19e58326: 3304 alc_write_coef_idx(codec, 0x48, 0xd011); 3305 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); 3306 break; 3307 } 3308 } 3309 3310 static void alc_fixup_headset_jack(struct hda_codec *codec, 3311 const struct hda_fixup *fix, int action) 3312 { 3313 struct alc_spec *spec = codec->spec; 3314 hda_nid_t hp_pin; 3315 3316 switch (action) { 3317 case HDA_FIXUP_ACT_PRE_PROBE: 3318 spec->has_hs_key = 1; 3319 snd_hda_jack_detect_enable_callback(codec, 0x55, 3320 alc_headset_btn_callback); 3321 break; 3322 case HDA_FIXUP_ACT_BUILD: 3323 hp_pin = alc_get_hp_pin(spec); 3324 if (!hp_pin || snd_hda_jack_bind_keymap(codec, 0x55, 3325 alc_headset_btn_keymap, 3326 hp_pin)) 3327 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", 3328 false, SND_JACK_HEADSET, 3329 alc_headset_btn_keymap); 3330 3331 alc_enable_headset_jack_key(codec); 3332 break; 3333 } 3334 } 3335 3336 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) 3337 { 3338 alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0); 3339 } 3340 3341 static void alc269_shutup(struct hda_codec *codec) 3342 { 3343 struct alc_spec *spec = codec->spec; 3344 3345 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 3346 alc269vb_toggle_power_output(codec, 0); 3347 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 3348 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 3349 msleep(150); 3350 } 3351 alc_shutup_pins(codec); 3352 } 3353 3354 static const struct coef_fw alc282_coefs[] = { 3355 WRITE_COEF(0x03, 0x0002), /* Power Down Control */ 3356 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ 3357 WRITE_COEF(0x07, 0x0200), /* DMIC control */ 3358 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */ 3359 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */ 3360 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */ 3361 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */ 3362 WRITE_COEF(0x0e, 0x6e00), /* LDO1/2/3, DAC/ADC */ 3363 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */ 3364 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */ 3365 WRITE_COEF(0x6f, 0x0), /* Class D test 4 */ 3366 UPDATE_COEF(0x0c, 0xfe00, 0), /* IO power down directly */ 3367 WRITE_COEF(0x34, 0xa0c0), /* ANC */ 3368 UPDATE_COEF(0x16, 0x0008, 0), /* AGC MUX */ 3369 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */ 3370 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */ 3371 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */ 3372 WRITE_COEF(0x63, 0x2902), /* PLL */ 3373 WRITE_COEF(0x68, 0xa080), /* capless control 2 */ 3374 WRITE_COEF(0x69, 0x3400), /* capless control 3 */ 3375 WRITE_COEF(0x6a, 0x2f3e), /* capless control 4 */ 3376 WRITE_COEF(0x6b, 0x0), /* capless control 5 */ 3377 UPDATE_COEF(0x6d, 0x0fff, 0x0900), /* class D test 2 */ 3378 WRITE_COEF(0x6e, 0x110a), /* class D test 3 */ 3379 UPDATE_COEF(0x70, 0x00f8, 0x00d8), /* class D test 5 */ 3380 WRITE_COEF(0x71, 0x0014), /* class D test 6 */ 3381 WRITE_COEF(0x72, 0xc2ba), /* classD OCP */ 3382 UPDATE_COEF(0x77, 0x0f80, 0), /* classD pure DC test */ 3383 WRITE_COEF(0x6c, 0xfc06), /* Class D amp control */ 3384 {} 3385 }; 3386 3387 static void alc282_restore_default_value(struct hda_codec *codec) 3388 { 3389 alc_process_coef_fw(codec, alc282_coefs); 3390 } 3391 3392 static void alc282_init(struct hda_codec *codec) 3393 { 3394 struct alc_spec *spec = codec->spec; 3395 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3396 bool hp_pin_sense; 3397 int coef78; 3398 3399 alc282_restore_default_value(codec); 3400 3401 if (!hp_pin) 3402 return; 3403 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3404 coef78 = alc_read_coef_idx(codec, 0x78); 3405 3406 /* Index 0x78 Direct Drive HP AMP LPM Control 1 */ 3407 /* Headphone capless set to high power mode */ 3408 alc_write_coef_idx(codec, 0x78, 0x9004); 3409 3410 if (hp_pin_sense) 3411 msleep(2); 3412 3413 snd_hda_codec_write(codec, hp_pin, 0, 3414 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3415 3416 if (hp_pin_sense) 3417 msleep(85); 3418 3419 snd_hda_codec_write(codec, hp_pin, 0, 3420 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3421 3422 if (hp_pin_sense) 3423 msleep(100); 3424 3425 /* Headphone capless set to normal mode */ 3426 alc_write_coef_idx(codec, 0x78, coef78); 3427 } 3428 3429 static void alc282_shutup(struct hda_codec *codec) 3430 { 3431 struct alc_spec *spec = codec->spec; 3432 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3433 bool hp_pin_sense; 3434 int coef78; 3435 3436 if (!hp_pin) { 3437 alc269_shutup(codec); 3438 return; 3439 } 3440 3441 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3442 coef78 = alc_read_coef_idx(codec, 0x78); 3443 alc_write_coef_idx(codec, 0x78, 0x9004); 3444 3445 if (hp_pin_sense) 3446 msleep(2); 3447 3448 snd_hda_codec_write(codec, hp_pin, 0, 3449 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3450 3451 if (hp_pin_sense) 3452 msleep(85); 3453 3454 if (!spec->no_shutup_pins) 3455 snd_hda_codec_write(codec, hp_pin, 0, 3456 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3457 3458 if (hp_pin_sense) 3459 msleep(100); 3460 3461 alc_auto_setup_eapd(codec, false); 3462 alc_shutup_pins(codec); 3463 alc_write_coef_idx(codec, 0x78, coef78); 3464 } 3465 3466 static const struct coef_fw alc283_coefs[] = { 3467 WRITE_COEF(0x03, 0x0002), /* Power Down Control */ 3468 UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ 3469 WRITE_COEF(0x07, 0x0200), /* DMIC control */ 3470 UPDATE_COEF(0x06, 0x00f0, 0), /* Analog clock */ 3471 UPDATE_COEF(0x08, 0xfffc, 0x0c2c), /* JD */ 3472 WRITE_COEF(0x0a, 0xcccc), /* JD offset1 */ 3473 WRITE_COEF(0x0b, 0xcccc), /* JD offset2 */ 3474 WRITE_COEF(0x0e, 0x6fc0), /* LDO1/2/3, DAC/ADC */ 3475 UPDATE_COEF(0x0f, 0xf800, 0x1000), /* JD */ 3476 UPDATE_COEF(0x10, 0xfc00, 0x0c00), /* Capless */ 3477 WRITE_COEF(0x3a, 0x0), /* Class D test 4 */ 3478 UPDATE_COEF(0x0c, 0xfe00, 0x0), /* IO power down directly */ 3479 WRITE_COEF(0x22, 0xa0c0), /* ANC */ 3480 UPDATE_COEFEX(0x53, 0x01, 0x000f, 0x0008), /* AGC MUX */ 3481 UPDATE_COEF(0x1d, 0x00e0, 0), /* DAC simple content protection */ 3482 UPDATE_COEF(0x1f, 0x00e0, 0), /* ADC simple content protection */ 3483 WRITE_COEF(0x21, 0x8804), /* DAC ADC Zero Detection */ 3484 WRITE_COEF(0x2e, 0x2902), /* PLL */ 3485 WRITE_COEF(0x33, 0xa080), /* capless control 2 */ 3486 WRITE_COEF(0x34, 0x3400), /* capless control 3 */ 3487 WRITE_COEF(0x35, 0x2f3e), /* capless control 4 */ 3488 WRITE_COEF(0x36, 0x0), /* capless control 5 */ 3489 UPDATE_COEF(0x38, 0x0fff, 0x0900), /* class D test 2 */ 3490 WRITE_COEF(0x39, 0x110a), /* class D test 3 */ 3491 UPDATE_COEF(0x3b, 0x00f8, 0x00d8), /* class D test 5 */ 3492 WRITE_COEF(0x3c, 0x0014), /* class D test 6 */ 3493 WRITE_COEF(0x3d, 0xc2ba), /* classD OCP */ 3494 UPDATE_COEF(0x42, 0x0f80, 0x0), /* classD pure DC test */ 3495 WRITE_COEF(0x49, 0x0), /* test mode */ 3496 UPDATE_COEF(0x40, 0xf800, 0x9800), /* Class D DC enable */ 3497 UPDATE_COEF(0x42, 0xf000, 0x2000), /* DC offset */ 3498 WRITE_COEF(0x37, 0xfc06), /* Class D amp control */ 3499 UPDATE_COEF(0x1b, 0x8000, 0), /* HP JD control */ 3500 {} 3501 }; 3502 3503 static void alc283_restore_default_value(struct hda_codec *codec) 3504 { 3505 alc_process_coef_fw(codec, alc283_coefs); 3506 } 3507 3508 static void alc283_init(struct hda_codec *codec) 3509 { 3510 struct alc_spec *spec = codec->spec; 3511 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3512 bool hp_pin_sense; 3513 3514 alc283_restore_default_value(codec); 3515 3516 if (!hp_pin) 3517 return; 3518 3519 msleep(30); 3520 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3521 3522 /* Index 0x43 Direct Drive HP AMP LPM Control 1 */ 3523 /* Headphone capless set to high power mode */ 3524 alc_write_coef_idx(codec, 0x43, 0x9004); 3525 3526 snd_hda_codec_write(codec, hp_pin, 0, 3527 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3528 3529 if (hp_pin_sense) 3530 msleep(85); 3531 3532 snd_hda_codec_write(codec, hp_pin, 0, 3533 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3534 3535 if (hp_pin_sense) 3536 msleep(85); 3537 /* Index 0x46 Combo jack auto switch control 2 */ 3538 /* 3k pull low control for Headset jack. */ 3539 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 3540 /* Headphone capless set to normal mode */ 3541 alc_write_coef_idx(codec, 0x43, 0x9614); 3542 } 3543 3544 static void alc283_shutup(struct hda_codec *codec) 3545 { 3546 struct alc_spec *spec = codec->spec; 3547 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3548 bool hp_pin_sense; 3549 3550 if (!hp_pin) { 3551 alc269_shutup(codec); 3552 return; 3553 } 3554 3555 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3556 3557 alc_write_coef_idx(codec, 0x43, 0x9004); 3558 3559 /*depop hp during suspend*/ 3560 alc_write_coef_idx(codec, 0x06, 0x2100); 3561 3562 snd_hda_codec_write(codec, hp_pin, 0, 3563 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3564 3565 if (hp_pin_sense) 3566 msleep(100); 3567 3568 if (!spec->no_shutup_pins) 3569 snd_hda_codec_write(codec, hp_pin, 0, 3570 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3571 3572 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 3573 3574 if (hp_pin_sense) 3575 msleep(100); 3576 alc_auto_setup_eapd(codec, false); 3577 alc_shutup_pins(codec); 3578 alc_write_coef_idx(codec, 0x43, 0x9614); 3579 } 3580 3581 static void alc256_init(struct hda_codec *codec) 3582 { 3583 struct alc_spec *spec = codec->spec; 3584 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3585 bool hp_pin_sense; 3586 3587 if (spec->ultra_low_power) { 3588 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); 3589 alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); 3590 alc_update_coef_idx(codec, 0x08, 7<<4, 0); 3591 alc_update_coef_idx(codec, 0x3b, 1<<15, 0); 3592 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 3593 msleep(30); 3594 } 3595 3596 if (!hp_pin) 3597 hp_pin = 0x21; 3598 3599 msleep(30); 3600 3601 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3602 3603 if (hp_pin_sense) 3604 msleep(2); 3605 3606 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3607 3608 snd_hda_codec_write(codec, hp_pin, 0, 3609 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3610 3611 if (hp_pin_sense || spec->ultra_low_power) 3612 msleep(85); 3613 3614 snd_hda_codec_write(codec, hp_pin, 0, 3615 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3616 3617 if (hp_pin_sense || spec->ultra_low_power) 3618 msleep(100); 3619 3620 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 3621 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 3622 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */ 3623 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15); 3624 /* 3625 * Expose headphone mic (or possibly Line In on some machines) instead 3626 * of PC Beep on 1Ah, and disable 1Ah loopback for all outputs. See 3627 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of 3628 * this register. 3629 */ 3630 alc_write_coef_idx(codec, 0x36, 0x5757); 3631 } 3632 3633 static void alc256_shutup(struct hda_codec *codec) 3634 { 3635 struct alc_spec *spec = codec->spec; 3636 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3637 bool hp_pin_sense; 3638 3639 if (!hp_pin) 3640 hp_pin = 0x21; 3641 3642 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3643 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3644 3645 if (hp_pin_sense) 3646 msleep(2); 3647 3648 snd_hda_codec_write(codec, hp_pin, 0, 3649 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3650 3651 if (hp_pin_sense || spec->ultra_low_power) 3652 msleep(85); 3653 3654 /* 3k pull low control for Headset jack. */ 3655 /* NOTE: call this before clearing the pin, otherwise codec stalls */ 3656 /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly 3657 * when booting with headset plugged. So skip setting it for the codec alc257 3658 */ 3659 if (spec->en_3kpull_low) 3660 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 3661 3662 if (!spec->no_shutup_pins) 3663 snd_hda_codec_write(codec, hp_pin, 0, 3664 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3665 3666 if (hp_pin_sense || spec->ultra_low_power) 3667 msleep(100); 3668 3669 alc_auto_setup_eapd(codec, false); 3670 alc_shutup_pins(codec); 3671 if (spec->ultra_low_power) { 3672 msleep(50); 3673 alc_update_coef_idx(codec, 0x03, 1<<1, 0); 3674 alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4); 3675 alc_update_coef_idx(codec, 0x08, 3<<2, 0); 3676 alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15); 3677 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); 3678 msleep(30); 3679 } 3680 } 3681 3682 static void alc285_hp_init(struct hda_codec *codec) 3683 { 3684 struct alc_spec *spec = codec->spec; 3685 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3686 int i, val; 3687 int coef38, coef0d, coef36; 3688 3689 alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */ 3690 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */ 3691 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */ 3692 coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */ 3693 coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */ 3694 alc_update_coef_idx(codec, 0x38, 1<<4, 0x0); 3695 alc_update_coef_idx(codec, 0x0d, 0x110, 0x0); 3696 3697 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 3698 3699 if (hp_pin) 3700 snd_hda_codec_write(codec, hp_pin, 0, 3701 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3702 3703 msleep(130); 3704 alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14); 3705 alc_update_coef_idx(codec, 0x36, 1<<13, 0x0); 3706 3707 if (hp_pin) 3708 snd_hda_codec_write(codec, hp_pin, 0, 3709 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3710 msleep(10); 3711 alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */ 3712 alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880); 3713 alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049); 3714 alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0); 3715 3716 alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */ 3717 val = alc_read_coefex_idx(codec, 0x58, 0x00); 3718 for (i = 0; i < 20 && val & 0x8000; i++) { 3719 msleep(50); 3720 val = alc_read_coefex_idx(codec, 0x58, 0x00); 3721 } /* Wait for depop procedure finish */ 3722 3723 alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */ 3724 alc_update_coef_idx(codec, 0x38, 1<<4, coef38); 3725 alc_update_coef_idx(codec, 0x0d, 0x110, coef0d); 3726 alc_update_coef_idx(codec, 0x36, 3<<13, coef36); 3727 3728 msleep(50); 3729 alc_update_coef_idx(codec, 0x4a, 1<<15, 0); 3730 } 3731 3732 static void alc225_init(struct hda_codec *codec) 3733 { 3734 struct alc_spec *spec = codec->spec; 3735 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3736 bool hp1_pin_sense, hp2_pin_sense; 3737 3738 if (spec->ultra_low_power) { 3739 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); 3740 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 3741 alc_update_coef_idx(codec, 0x33, 1<<11, 0); 3742 msleep(30); 3743 } 3744 3745 if (spec->codec_variant != ALC269_TYPE_ALC287 && 3746 spec->codec_variant != ALC269_TYPE_ALC245) 3747 /* required only at boot or S3 and S4 resume time */ 3748 if (!spec->done_hp_init || 3749 is_s3_resume(codec) || 3750 is_s4_resume(codec)) { 3751 alc285_hp_init(codec); 3752 spec->done_hp_init = true; 3753 } 3754 3755 if (!hp_pin) 3756 hp_pin = 0x21; 3757 msleep(30); 3758 3759 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3760 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 3761 3762 if (hp1_pin_sense || hp2_pin_sense) 3763 msleep(2); 3764 3765 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 3766 3767 if (hp1_pin_sense || spec->ultra_low_power) 3768 snd_hda_codec_write(codec, hp_pin, 0, 3769 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3770 if (hp2_pin_sense) 3771 snd_hda_codec_write(codec, 0x16, 0, 3772 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3773 3774 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 3775 msleep(85); 3776 3777 if (hp1_pin_sense || spec->ultra_low_power) 3778 snd_hda_codec_write(codec, hp_pin, 0, 3779 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3780 if (hp2_pin_sense) 3781 snd_hda_codec_write(codec, 0x16, 0, 3782 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3783 3784 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 3785 msleep(100); 3786 3787 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 3788 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 3789 } 3790 3791 static void alc225_shutup(struct hda_codec *codec) 3792 { 3793 struct alc_spec *spec = codec->spec; 3794 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3795 bool hp1_pin_sense, hp2_pin_sense; 3796 3797 if (!hp_pin) 3798 hp_pin = 0x21; 3799 3800 alc_disable_headset_jack_key(codec); 3801 /* 3k pull low control for Headset jack. */ 3802 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); 3803 3804 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3805 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 3806 3807 if (hp1_pin_sense || hp2_pin_sense) 3808 msleep(2); 3809 3810 if (hp1_pin_sense || spec->ultra_low_power) 3811 snd_hda_codec_write(codec, hp_pin, 0, 3812 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3813 if (hp2_pin_sense) 3814 snd_hda_codec_write(codec, 0x16, 0, 3815 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3816 3817 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 3818 msleep(85); 3819 3820 if (hp1_pin_sense || spec->ultra_low_power) 3821 snd_hda_codec_write(codec, hp_pin, 0, 3822 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3823 if (hp2_pin_sense) 3824 snd_hda_codec_write(codec, 0x16, 0, 3825 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3826 3827 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 3828 msleep(100); 3829 3830 alc_auto_setup_eapd(codec, false); 3831 alc_shutup_pins(codec); 3832 if (spec->ultra_low_power) { 3833 msleep(50); 3834 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); 3835 alc_update_coef_idx(codec, 0x0e, 7<<6, 0); 3836 alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11); 3837 alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); 3838 msleep(30); 3839 } 3840 3841 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 3842 alc_enable_headset_jack_key(codec); 3843 } 3844 3845 static void alc_default_init(struct hda_codec *codec) 3846 { 3847 struct alc_spec *spec = codec->spec; 3848 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3849 bool hp_pin_sense; 3850 3851 if (!hp_pin) 3852 return; 3853 3854 msleep(30); 3855 3856 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3857 3858 if (hp_pin_sense) 3859 msleep(2); 3860 3861 snd_hda_codec_write(codec, hp_pin, 0, 3862 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3863 3864 if (hp_pin_sense) 3865 msleep(85); 3866 3867 snd_hda_codec_write(codec, hp_pin, 0, 3868 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 3869 3870 if (hp_pin_sense) 3871 msleep(100); 3872 } 3873 3874 static void alc_default_shutup(struct hda_codec *codec) 3875 { 3876 struct alc_spec *spec = codec->spec; 3877 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3878 bool hp_pin_sense; 3879 3880 if (!hp_pin) { 3881 alc269_shutup(codec); 3882 return; 3883 } 3884 3885 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 3886 3887 if (hp_pin_sense) 3888 msleep(2); 3889 3890 snd_hda_codec_write(codec, hp_pin, 0, 3891 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3892 3893 if (hp_pin_sense) 3894 msleep(85); 3895 3896 if (!spec->no_shutup_pins) 3897 snd_hda_codec_write(codec, hp_pin, 0, 3898 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3899 3900 if (hp_pin_sense) 3901 msleep(100); 3902 3903 alc_auto_setup_eapd(codec, false); 3904 alc_shutup_pins(codec); 3905 } 3906 3907 static void alc294_hp_init(struct hda_codec *codec) 3908 { 3909 struct alc_spec *spec = codec->spec; 3910 hda_nid_t hp_pin = alc_get_hp_pin(spec); 3911 int i, val; 3912 3913 if (!hp_pin) 3914 return; 3915 3916 snd_hda_codec_write(codec, hp_pin, 0, 3917 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 3918 3919 msleep(100); 3920 3921 if (!spec->no_shutup_pins) 3922 snd_hda_codec_write(codec, hp_pin, 0, 3923 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 3924 3925 alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */ 3926 alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */ 3927 3928 /* Wait for depop procedure finish */ 3929 val = alc_read_coefex_idx(codec, 0x58, 0x01); 3930 for (i = 0; i < 20 && val & 0x0080; i++) { 3931 msleep(50); 3932 val = alc_read_coefex_idx(codec, 0x58, 0x01); 3933 } 3934 /* Set HP depop to auto mode */ 3935 alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b); 3936 msleep(50); 3937 } 3938 3939 static void alc294_init(struct hda_codec *codec) 3940 { 3941 struct alc_spec *spec = codec->spec; 3942 3943 /* required only at boot or S4 resume time */ 3944 if (!spec->done_hp_init || 3945 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { 3946 alc294_hp_init(codec); 3947 spec->done_hp_init = true; 3948 } 3949 alc_default_init(codec); 3950 } 3951 3952 static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg, 3953 unsigned int val) 3954 { 3955 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); 3956 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val & 0xffff); /* LSB */ 3957 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_PROC_COEF, val >> 16); /* MSB */ 3958 } 3959 3960 static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg) 3961 { 3962 unsigned int val; 3963 3964 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1); 3965 val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) 3966 & 0xffff; 3967 val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) 3968 << 16; 3969 return val; 3970 } 3971 3972 static void alc5505_dsp_halt(struct hda_codec *codec) 3973 { 3974 unsigned int val; 3975 3976 alc5505_coef_set(codec, 0x3000, 0x000c); /* DSP CPU stop */ 3977 alc5505_coef_set(codec, 0x880c, 0x0008); /* DDR enter self refresh */ 3978 alc5505_coef_set(codec, 0x61c0, 0x11110080); /* Clock control for PLL and CPU */ 3979 alc5505_coef_set(codec, 0x6230, 0xfc0d4011); /* Disable Input OP */ 3980 alc5505_coef_set(codec, 0x61b4, 0x040a2b03); /* Stop PLL2 */ 3981 alc5505_coef_set(codec, 0x61b0, 0x00005b17); /* Stop PLL1 */ 3982 alc5505_coef_set(codec, 0x61b8, 0x04133303); /* Stop PLL3 */ 3983 val = alc5505_coef_get(codec, 0x6220); 3984 alc5505_coef_set(codec, 0x6220, (val | 0x3000)); /* switch Ringbuffer clock to DBUS clock */ 3985 } 3986 3987 static void alc5505_dsp_back_from_halt(struct hda_codec *codec) 3988 { 3989 alc5505_coef_set(codec, 0x61b8, 0x04133302); 3990 alc5505_coef_set(codec, 0x61b0, 0x00005b16); 3991 alc5505_coef_set(codec, 0x61b4, 0x040a2b02); 3992 alc5505_coef_set(codec, 0x6230, 0xf80d4011); 3993 alc5505_coef_set(codec, 0x6220, 0x2002010f); 3994 alc5505_coef_set(codec, 0x880c, 0x00000004); 3995 } 3996 3997 static void alc5505_dsp_init(struct hda_codec *codec) 3998 { 3999 unsigned int val; 4000 4001 alc5505_dsp_halt(codec); 4002 alc5505_dsp_back_from_halt(codec); 4003 alc5505_coef_set(codec, 0x61b0, 0x5b14); /* PLL1 control */ 4004 alc5505_coef_set(codec, 0x61b0, 0x5b16); 4005 alc5505_coef_set(codec, 0x61b4, 0x04132b00); /* PLL2 control */ 4006 alc5505_coef_set(codec, 0x61b4, 0x04132b02); 4007 alc5505_coef_set(codec, 0x61b8, 0x041f3300); /* PLL3 control*/ 4008 alc5505_coef_set(codec, 0x61b8, 0x041f3302); 4009 snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */ 4010 alc5505_coef_set(codec, 0x61b8, 0x041b3302); 4011 alc5505_coef_set(codec, 0x61b8, 0x04173302); 4012 alc5505_coef_set(codec, 0x61b8, 0x04163302); 4013 alc5505_coef_set(codec, 0x8800, 0x348b328b); /* DRAM control */ 4014 alc5505_coef_set(codec, 0x8808, 0x00020022); /* DRAM control */ 4015 alc5505_coef_set(codec, 0x8818, 0x00000400); /* DRAM control */ 4016 4017 val = alc5505_coef_get(codec, 0x6200) >> 16; /* Read revision ID */ 4018 if (val <= 3) 4019 alc5505_coef_set(codec, 0x6220, 0x2002010f); /* I/O PAD Configuration */ 4020 else 4021 alc5505_coef_set(codec, 0x6220, 0x6002018f); 4022 4023 alc5505_coef_set(codec, 0x61ac, 0x055525f0); /**/ 4024 alc5505_coef_set(codec, 0x61c0, 0x12230080); /* Clock control */ 4025 alc5505_coef_set(codec, 0x61b4, 0x040e2b02); /* PLL2 control */ 4026 alc5505_coef_set(codec, 0x61bc, 0x010234f8); /* OSC Control */ 4027 alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ 4028 alc5505_coef_set(codec, 0x880c, 0x00000003); 4029 alc5505_coef_set(codec, 0x880c, 0x00000010); 4030 4031 #ifdef HALT_REALTEK_ALC5505 4032 alc5505_dsp_halt(codec); 4033 #endif 4034 } 4035 4036 #ifdef HALT_REALTEK_ALC5505 4037 #define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */ 4038 #define alc5505_dsp_resume(codec) do { } while (0) /* NOP */ 4039 #else 4040 #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) 4041 #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) 4042 #endif 4043 4044 static int alc269_suspend(struct hda_codec *codec) 4045 { 4046 struct alc_spec *spec = codec->spec; 4047 4048 if (spec->has_alc5505_dsp) 4049 alc5505_dsp_suspend(codec); 4050 4051 return alc_suspend(codec); 4052 } 4053 4054 static int alc269_resume(struct hda_codec *codec) 4055 { 4056 struct alc_spec *spec = codec->spec; 4057 4058 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 4059 alc269vb_toggle_power_output(codec, 0); 4060 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 4061 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 4062 msleep(150); 4063 } 4064 4065 codec->patch_ops.init(codec); 4066 4067 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 4068 alc269vb_toggle_power_output(codec, 1); 4069 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 4070 (alc_get_coef0(codec) & 0x00ff) == 0x017) { 4071 msleep(200); 4072 } 4073 4074 snd_hda_regmap_sync(codec); 4075 hda_call_check_power_status(codec, 0x01); 4076 4077 /* on some machine, the BIOS will clear the codec gpio data when enter 4078 * suspend, and won't restore the data after resume, so we restore it 4079 * in the driver. 4080 */ 4081 if (spec->gpio_data) 4082 alc_write_gpio_data(codec); 4083 4084 if (spec->has_alc5505_dsp) 4085 alc5505_dsp_resume(codec); 4086 4087 return 0; 4088 } 4089 4090 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, 4091 const struct hda_fixup *fix, int action) 4092 { 4093 struct alc_spec *spec = codec->spec; 4094 4095 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4096 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 4097 } 4098 4099 static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec, 4100 const struct hda_fixup *fix, 4101 int action) 4102 { 4103 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21); 4104 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19); 4105 4106 if (cfg_headphone && cfg_headset_mic == 0x411111f0) 4107 snd_hda_codec_set_pincfg(codec, 0x19, 4108 (cfg_headphone & ~AC_DEFCFG_DEVICE) | 4109 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT)); 4110 } 4111 4112 static void alc269_fixup_hweq(struct hda_codec *codec, 4113 const struct hda_fixup *fix, int action) 4114 { 4115 if (action == HDA_FIXUP_ACT_INIT) 4116 alc_update_coef_idx(codec, 0x1e, 0, 0x80); 4117 } 4118 4119 static void alc269_fixup_headset_mic(struct hda_codec *codec, 4120 const struct hda_fixup *fix, int action) 4121 { 4122 struct alc_spec *spec = codec->spec; 4123 4124 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4125 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 4126 } 4127 4128 static void alc271_fixup_dmic(struct hda_codec *codec, 4129 const struct hda_fixup *fix, int action) 4130 { 4131 static const struct hda_verb verbs[] = { 4132 {0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, 4133 {0x20, AC_VERB_SET_PROC_COEF, 0x4000}, 4134 {} 4135 }; 4136 unsigned int cfg; 4137 4138 if (strcmp(codec->core.chip_name, "ALC271X") && 4139 strcmp(codec->core.chip_name, "ALC269VB")) 4140 return; 4141 cfg = snd_hda_codec_get_pincfg(codec, 0x12); 4142 if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED) 4143 snd_hda_sequence_write(codec, verbs); 4144 } 4145 4146 /* Fix the speaker amp after resume, etc */ 4147 static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec, 4148 const struct hda_fixup *fix, 4149 int action) 4150 { 4151 if (action == HDA_FIXUP_ACT_INIT) 4152 alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000); 4153 } 4154 4155 static void alc269_fixup_pcm_44k(struct hda_codec *codec, 4156 const struct hda_fixup *fix, int action) 4157 { 4158 struct alc_spec *spec = codec->spec; 4159 4160 if (action != HDA_FIXUP_ACT_PROBE) 4161 return; 4162 4163 /* Due to a hardware problem on Lenovo Ideadpad, we need to 4164 * fix the sample rate of analog I/O to 44.1kHz 4165 */ 4166 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback; 4167 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture; 4168 } 4169 4170 static void alc269_fixup_stereo_dmic(struct hda_codec *codec, 4171 const struct hda_fixup *fix, int action) 4172 { 4173 /* The digital-mic unit sends PDM (differential signal) instead of 4174 * the standard PCM, thus you can't record a valid mono stream as is. 4175 * Below is a workaround specific to ALC269 to control the dmic 4176 * signal source as mono. 4177 */ 4178 if (action == HDA_FIXUP_ACT_INIT) 4179 alc_update_coef_idx(codec, 0x07, 0, 0x80); 4180 } 4181 4182 static void alc269_quanta_automute(struct hda_codec *codec) 4183 { 4184 snd_hda_gen_update_outputs(codec); 4185 4186 alc_write_coef_idx(codec, 0x0c, 0x680); 4187 alc_write_coef_idx(codec, 0x0c, 0x480); 4188 } 4189 4190 static void alc269_fixup_quanta_mute(struct hda_codec *codec, 4191 const struct hda_fixup *fix, int action) 4192 { 4193 struct alc_spec *spec = codec->spec; 4194 if (action != HDA_FIXUP_ACT_PROBE) 4195 return; 4196 spec->gen.automute_hook = alc269_quanta_automute; 4197 } 4198 4199 static void alc269_x101_hp_automute_hook(struct hda_codec *codec, 4200 struct hda_jack_callback *jack) 4201 { 4202 struct alc_spec *spec = codec->spec; 4203 int vref; 4204 msleep(200); 4205 snd_hda_gen_hp_automute(codec, jack); 4206 4207 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 4208 msleep(100); 4209 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 4210 vref); 4211 msleep(500); 4212 snd_hda_codec_write(codec, 0x18, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 4213 vref); 4214 } 4215 4216 /* 4217 * Magic sequence to make Huawei Matebook X right speaker working (bko#197801) 4218 */ 4219 struct hda_alc298_mbxinit { 4220 unsigned char value_0x23; 4221 unsigned char value_0x25; 4222 }; 4223 4224 static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec, 4225 const struct hda_alc298_mbxinit *initval, 4226 bool first) 4227 { 4228 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0); 4229 alc_write_coef_idx(codec, 0x26, 0xb000); 4230 4231 if (first) 4232 snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0); 4233 4234 snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); 4235 alc_write_coef_idx(codec, 0x26, 0xf000); 4236 alc_write_coef_idx(codec, 0x23, initval->value_0x23); 4237 4238 if (initval->value_0x23 != 0x1e) 4239 alc_write_coef_idx(codec, 0x25, initval->value_0x25); 4240 4241 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); 4242 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); 4243 } 4244 4245 static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec, 4246 const struct hda_fixup *fix, 4247 int action) 4248 { 4249 /* Initialization magic */ 4250 static const struct hda_alc298_mbxinit dac_init[] = { 4251 {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00}, 4252 {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00}, 4253 {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00}, 4254 {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24}, 4255 {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f}, 4256 {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00}, 4257 {0x2f, 0x00}, 4258 {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00}, 4259 {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c}, 4260 {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80}, 4261 {} 4262 }; 4263 const struct hda_alc298_mbxinit *seq; 4264 4265 if (action != HDA_FIXUP_ACT_INIT) 4266 return; 4267 4268 /* Start */ 4269 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00); 4270 snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); 4271 alc_write_coef_idx(codec, 0x26, 0xf000); 4272 alc_write_coef_idx(codec, 0x22, 0x31); 4273 alc_write_coef_idx(codec, 0x23, 0x0b); 4274 alc_write_coef_idx(codec, 0x25, 0x00); 4275 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); 4276 snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); 4277 4278 for (seq = dac_init; seq->value_0x23; seq++) 4279 alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init); 4280 } 4281 4282 static void alc269_fixup_x101_headset_mic(struct hda_codec *codec, 4283 const struct hda_fixup *fix, int action) 4284 { 4285 struct alc_spec *spec = codec->spec; 4286 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4287 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 4288 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook; 4289 } 4290 } 4291 4292 static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin, 4293 bool polarity, bool on) 4294 { 4295 unsigned int pinval; 4296 4297 if (!pin) 4298 return; 4299 if (polarity) 4300 on = !on; 4301 pinval = snd_hda_codec_get_pin_target(codec, pin); 4302 pinval &= ~AC_PINCTL_VREFEN; 4303 pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ; 4304 /* temporarily power up/down for setting VREF */ 4305 snd_hda_power_up_pm(codec); 4306 snd_hda_set_pin_ctl_cache(codec, pin, pinval); 4307 snd_hda_power_down_pm(codec); 4308 } 4309 4310 /* update mute-LED according to the speaker mute state via mic VREF pin */ 4311 static int vref_mute_led_set(struct led_classdev *led_cdev, 4312 enum led_brightness brightness) 4313 { 4314 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4315 struct alc_spec *spec = codec->spec; 4316 4317 alc_update_vref_led(codec, spec->mute_led_nid, 4318 spec->mute_led_polarity, brightness); 4319 return 0; 4320 } 4321 4322 /* Make sure the led works even in runtime suspend */ 4323 static unsigned int led_power_filter(struct hda_codec *codec, 4324 hda_nid_t nid, 4325 unsigned int power_state) 4326 { 4327 struct alc_spec *spec = codec->spec; 4328 4329 if (power_state != AC_PWRST_D3 || nid == 0 || 4330 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid)) 4331 return power_state; 4332 4333 /* Set pin ctl again, it might have just been set to 0 */ 4334 snd_hda_set_pin_ctl(codec, nid, 4335 snd_hda_codec_get_pin_target(codec, nid)); 4336 4337 return snd_hda_gen_path_power_filter(codec, nid, power_state); 4338 } 4339 4340 static void alc269_fixup_hp_mute_led(struct hda_codec *codec, 4341 const struct hda_fixup *fix, int action) 4342 { 4343 struct alc_spec *spec = codec->spec; 4344 const struct dmi_device *dev = NULL; 4345 4346 if (action != HDA_FIXUP_ACT_PRE_PROBE) 4347 return; 4348 4349 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) { 4350 int pol, pin; 4351 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2) 4352 continue; 4353 if (pin < 0x0a || pin >= 0x10) 4354 break; 4355 spec->mute_led_polarity = pol; 4356 spec->mute_led_nid = pin - 0x0a + 0x18; 4357 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); 4358 codec->power_filter = led_power_filter; 4359 codec_dbg(codec, 4360 "Detected mute LED for %x:%d\n", spec->mute_led_nid, 4361 spec->mute_led_polarity); 4362 break; 4363 } 4364 } 4365 4366 static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec, 4367 const struct hda_fixup *fix, 4368 int action, hda_nid_t pin) 4369 { 4370 struct alc_spec *spec = codec->spec; 4371 4372 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4373 spec->mute_led_polarity = 0; 4374 spec->mute_led_nid = pin; 4375 snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); 4376 codec->power_filter = led_power_filter; 4377 } 4378 } 4379 4380 static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec, 4381 const struct hda_fixup *fix, int action) 4382 { 4383 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18); 4384 } 4385 4386 static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec, 4387 const struct hda_fixup *fix, int action) 4388 { 4389 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x19); 4390 } 4391 4392 static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec, 4393 const struct hda_fixup *fix, int action) 4394 { 4395 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b); 4396 } 4397 4398 /* update LED status via GPIO */ 4399 static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask, 4400 int polarity, bool enabled) 4401 { 4402 if (polarity) 4403 enabled = !enabled; 4404 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */ 4405 } 4406 4407 /* turn on/off mute LED via GPIO per vmaster hook */ 4408 static int gpio_mute_led_set(struct led_classdev *led_cdev, 4409 enum led_brightness brightness) 4410 { 4411 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4412 struct alc_spec *spec = codec->spec; 4413 4414 alc_update_gpio_led(codec, spec->gpio_mute_led_mask, 4415 spec->mute_led_polarity, !brightness); 4416 return 0; 4417 } 4418 4419 /* turn on/off mic-mute LED via GPIO per capture hook */ 4420 static int micmute_led_set(struct led_classdev *led_cdev, 4421 enum led_brightness brightness) 4422 { 4423 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4424 struct alc_spec *spec = codec->spec; 4425 4426 alc_update_gpio_led(codec, spec->gpio_mic_led_mask, 4427 spec->micmute_led_polarity, !brightness); 4428 return 0; 4429 } 4430 4431 /* setup mute and mic-mute GPIO bits, add hooks appropriately */ 4432 static void alc_fixup_hp_gpio_led(struct hda_codec *codec, 4433 int action, 4434 unsigned int mute_mask, 4435 unsigned int micmute_mask) 4436 { 4437 struct alc_spec *spec = codec->spec; 4438 4439 alc_fixup_gpio(codec, action, mute_mask | micmute_mask); 4440 4441 if (action != HDA_FIXUP_ACT_PRE_PROBE) 4442 return; 4443 if (mute_mask) { 4444 spec->gpio_mute_led_mask = mute_mask; 4445 snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set); 4446 } 4447 if (micmute_mask) { 4448 spec->gpio_mic_led_mask = micmute_mask; 4449 snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set); 4450 } 4451 } 4452 4453 static void alc236_fixup_hp_gpio_led(struct hda_codec *codec, 4454 const struct hda_fixup *fix, int action) 4455 { 4456 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01); 4457 } 4458 4459 static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, 4460 const struct hda_fixup *fix, int action) 4461 { 4462 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); 4463 } 4464 4465 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, 4466 const struct hda_fixup *fix, int action) 4467 { 4468 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); 4469 } 4470 4471 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, 4472 const struct hda_fixup *fix, int action) 4473 { 4474 alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20); 4475 } 4476 4477 static void alc287_fixup_hp_gpio_led(struct hda_codec *codec, 4478 const struct hda_fixup *fix, int action) 4479 { 4480 alc_fixup_hp_gpio_led(codec, action, 0x10, 0); 4481 } 4482 4483 static void alc245_fixup_hp_gpio_led(struct hda_codec *codec, 4484 const struct hda_fixup *fix, int action) 4485 { 4486 struct alc_spec *spec = codec->spec; 4487 4488 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4489 spec->micmute_led_polarity = 1; 4490 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 4491 } 4492 4493 /* turn on/off mic-mute LED per capture hook via VREF change */ 4494 static int vref_micmute_led_set(struct led_classdev *led_cdev, 4495 enum led_brightness brightness) 4496 { 4497 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4498 struct alc_spec *spec = codec->spec; 4499 4500 alc_update_vref_led(codec, spec->cap_mute_led_nid, 4501 spec->micmute_led_polarity, brightness); 4502 return 0; 4503 } 4504 4505 static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, 4506 const struct hda_fixup *fix, int action) 4507 { 4508 struct alc_spec *spec = codec->spec; 4509 4510 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 4511 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4512 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to 4513 * enable headphone amp 4514 */ 4515 spec->gpio_mask |= 0x10; 4516 spec->gpio_dir |= 0x10; 4517 spec->cap_mute_led_nid = 0x18; 4518 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4519 codec->power_filter = led_power_filter; 4520 } 4521 } 4522 4523 static void alc280_fixup_hp_gpio4(struct hda_codec *codec, 4524 const struct hda_fixup *fix, int action) 4525 { 4526 struct alc_spec *spec = codec->spec; 4527 4528 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 4529 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4530 spec->cap_mute_led_nid = 0x18; 4531 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4532 codec->power_filter = led_power_filter; 4533 } 4534 } 4535 4536 /* HP Spectre x360 14 model needs a unique workaround for enabling the amp; 4537 * it needs to toggle the GPIO0 once on and off at each time (bko#210633) 4538 */ 4539 static void alc245_fixup_hp_x360_amp(struct hda_codec *codec, 4540 const struct hda_fixup *fix, int action) 4541 { 4542 struct alc_spec *spec = codec->spec; 4543 4544 switch (action) { 4545 case HDA_FIXUP_ACT_PRE_PROBE: 4546 spec->gpio_mask |= 0x01; 4547 spec->gpio_dir |= 0x01; 4548 break; 4549 case HDA_FIXUP_ACT_INIT: 4550 /* need to toggle GPIO to enable the amp */ 4551 alc_update_gpio_data(codec, 0x01, true); 4552 msleep(100); 4553 alc_update_gpio_data(codec, 0x01, false); 4554 break; 4555 } 4556 } 4557 4558 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ 4559 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo, 4560 struct hda_codec *codec, 4561 struct snd_pcm_substream *substream, 4562 int action) 4563 { 4564 switch (action) { 4565 case HDA_GEN_PCM_ACT_PREPARE: 4566 alc_update_gpio_data(codec, 0x04, true); 4567 break; 4568 case HDA_GEN_PCM_ACT_CLEANUP: 4569 alc_update_gpio_data(codec, 0x04, false); 4570 break; 4571 } 4572 } 4573 4574 static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec, 4575 const struct hda_fixup *fix, 4576 int action) 4577 { 4578 struct alc_spec *spec = codec->spec; 4579 4580 if (action == HDA_FIXUP_ACT_PROBE) { 4581 spec->gpio_mask |= 0x04; 4582 spec->gpio_dir |= 0x04; 4583 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; 4584 } 4585 } 4586 4587 static void alc_update_coef_led(struct hda_codec *codec, 4588 struct alc_coef_led *led, 4589 bool polarity, bool on) 4590 { 4591 if (polarity) 4592 on = !on; 4593 /* temporarily power up/down for setting COEF bit */ 4594 alc_update_coef_idx(codec, led->idx, led->mask, 4595 on ? led->on : led->off); 4596 } 4597 4598 /* update mute-LED according to the speaker mute state via COEF bit */ 4599 static int coef_mute_led_set(struct led_classdev *led_cdev, 4600 enum led_brightness brightness) 4601 { 4602 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4603 struct alc_spec *spec = codec->spec; 4604 4605 alc_update_coef_led(codec, &spec->mute_led_coef, 4606 spec->mute_led_polarity, brightness); 4607 return 0; 4608 } 4609 4610 static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4611 const struct hda_fixup *fix, 4612 int action) 4613 { 4614 struct alc_spec *spec = codec->spec; 4615 4616 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4617 spec->mute_led_polarity = 0; 4618 spec->mute_led_coef.idx = 0x0b; 4619 spec->mute_led_coef.mask = 1 << 3; 4620 spec->mute_led_coef.on = 1 << 3; 4621 spec->mute_led_coef.off = 0; 4622 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4623 } 4624 } 4625 4626 static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4627 const struct hda_fixup *fix, 4628 int action) 4629 { 4630 struct alc_spec *spec = codec->spec; 4631 4632 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4633 spec->mute_led_polarity = 0; 4634 spec->mute_led_coef.idx = 0x34; 4635 spec->mute_led_coef.mask = 1 << 5; 4636 spec->mute_led_coef.on = 0; 4637 spec->mute_led_coef.off = 1 << 5; 4638 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4639 } 4640 } 4641 4642 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec, 4643 const struct hda_fixup *fix, int action) 4644 { 4645 struct alc_spec *spec = codec->spec; 4646 4647 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4648 spec->mute_led_polarity = 0; 4649 spec->mute_led_coef.idx = 0x07; 4650 spec->mute_led_coef.mask = 1; 4651 spec->mute_led_coef.on = 1; 4652 spec->mute_led_coef.off = 0; 4653 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4654 } 4655 } 4656 4657 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 4658 const struct hda_fixup *fix, 4659 int action) 4660 { 4661 struct alc_spec *spec = codec->spec; 4662 4663 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4664 spec->mute_led_polarity = 0; 4665 spec->mute_led_coef.idx = 0x0b; 4666 spec->mute_led_coef.mask = 3 << 2; 4667 spec->mute_led_coef.on = 2 << 2; 4668 spec->mute_led_coef.off = 1 << 2; 4669 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 4670 } 4671 } 4672 4673 /* turn on/off mic-mute LED per capture hook by coef bit */ 4674 static int coef_micmute_led_set(struct led_classdev *led_cdev, 4675 enum led_brightness brightness) 4676 { 4677 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); 4678 struct alc_spec *spec = codec->spec; 4679 4680 alc_update_coef_led(codec, &spec->mic_led_coef, 4681 spec->micmute_led_polarity, brightness); 4682 return 0; 4683 } 4684 4685 static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec, 4686 const struct hda_fixup *fix, int action) 4687 { 4688 struct alc_spec *spec = codec->spec; 4689 4690 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4691 spec->mic_led_coef.idx = 0x19; 4692 spec->mic_led_coef.mask = 1 << 13; 4693 spec->mic_led_coef.on = 1 << 13; 4694 spec->mic_led_coef.off = 0; 4695 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); 4696 } 4697 } 4698 4699 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec, 4700 const struct hda_fixup *fix, int action) 4701 { 4702 struct alc_spec *spec = codec->spec; 4703 4704 if (action == HDA_FIXUP_ACT_PRE_PROBE) 4705 spec->micmute_led_polarity = 1; 4706 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 4707 } 4708 4709 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, 4710 const struct hda_fixup *fix, int action) 4711 { 4712 struct alc_spec *spec = codec->spec; 4713 4714 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4715 spec->mic_led_coef.idx = 0x35; 4716 spec->mic_led_coef.mask = 3 << 2; 4717 spec->mic_led_coef.on = 2 << 2; 4718 spec->mic_led_coef.off = 1 << 2; 4719 snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); 4720 } 4721 } 4722 4723 static void alc285_fixup_hp_mute_led(struct hda_codec *codec, 4724 const struct hda_fixup *fix, int action) 4725 { 4726 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 4727 alc285_fixup_hp_coef_micmute_led(codec, fix, action); 4728 } 4729 4730 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec, 4731 const struct hda_fixup *fix, int action) 4732 { 4733 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 4734 alc285_fixup_hp_gpio_micmute_led(codec, fix, action); 4735 } 4736 4737 static void alc236_fixup_hp_mute_led(struct hda_codec *codec, 4738 const struct hda_fixup *fix, int action) 4739 { 4740 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); 4741 alc236_fixup_hp_coef_micmute_led(codec, fix, action); 4742 } 4743 4744 static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec, 4745 const struct hda_fixup *fix, int action) 4746 { 4747 struct alc_spec *spec = codec->spec; 4748 4749 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4750 spec->cap_mute_led_nid = 0x1a; 4751 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4752 codec->power_filter = led_power_filter; 4753 } 4754 } 4755 4756 static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec, 4757 const struct hda_fixup *fix, int action) 4758 { 4759 alc236_fixup_hp_mute_led_coefbit(codec, fix, action); 4760 alc236_fixup_hp_micmute_led_vref(codec, fix, action); 4761 } 4762 4763 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 4764 const unsigned short coefs[2]) 4765 { 4766 alc_write_coef_idx(codec, 0x23, coefs[0]); 4767 alc_write_coef_idx(codec, 0x25, coefs[1]); 4768 alc_write_coef_idx(codec, 0x26, 0xb011); 4769 } 4770 4771 struct alc298_samsung_amp_desc { 4772 unsigned char nid; 4773 unsigned short init_seq[2][2]; 4774 }; 4775 4776 static void alc298_fixup_samsung_amp(struct hda_codec *codec, 4777 const struct hda_fixup *fix, int action) 4778 { 4779 int i, j; 4780 static const unsigned short init_seq[][2] = { 4781 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 }, 4782 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 }, 4783 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e }, 4784 { 0x41, 0x07 }, { 0x400, 0x1 } 4785 }; 4786 static const struct alc298_samsung_amp_desc amps[] = { 4787 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } }, 4788 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } } 4789 }; 4790 4791 if (action != HDA_FIXUP_ACT_INIT) 4792 return; 4793 4794 for (i = 0; i < ARRAY_SIZE(amps); i++) { 4795 alc_write_coef_idx(codec, 0x22, amps[i].nid); 4796 4797 for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++) 4798 alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]); 4799 4800 for (j = 0; j < ARRAY_SIZE(init_seq); j++) 4801 alc298_samsung_write_coef_pack(codec, init_seq[j]); 4802 } 4803 } 4804 4805 #include "samsung_helper.c" 4806 4807 #if IS_REACHABLE(CONFIG_INPUT) 4808 static void gpio2_mic_hotkey_event(struct hda_codec *codec, 4809 struct hda_jack_callback *event) 4810 { 4811 struct alc_spec *spec = codec->spec; 4812 4813 /* GPIO2 just toggles on a keypress/keyrelease cycle. Therefore 4814 send both key on and key off event for every interrupt. */ 4815 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1); 4816 input_sync(spec->kb_dev); 4817 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0); 4818 input_sync(spec->kb_dev); 4819 } 4820 4821 static int alc_register_micmute_input_device(struct hda_codec *codec) 4822 { 4823 struct alc_spec *spec = codec->spec; 4824 int i; 4825 4826 spec->kb_dev = input_allocate_device(); 4827 if (!spec->kb_dev) { 4828 codec_err(codec, "Out of memory (input_allocate_device)\n"); 4829 return -ENOMEM; 4830 } 4831 4832 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE; 4833 4834 spec->kb_dev->name = "Microphone Mute Button"; 4835 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY); 4836 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]); 4837 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map); 4838 spec->kb_dev->keycode = spec->alc_mute_keycode_map; 4839 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++) 4840 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit); 4841 4842 if (input_register_device(spec->kb_dev)) { 4843 codec_err(codec, "input_register_device failed\n"); 4844 input_free_device(spec->kb_dev); 4845 spec->kb_dev = NULL; 4846 return -ENOMEM; 4847 } 4848 4849 return 0; 4850 } 4851 4852 /* GPIO1 = set according to SKU external amp 4853 * GPIO2 = mic mute hotkey 4854 * GPIO3 = mute LED 4855 * GPIO4 = mic mute LED 4856 */ 4857 static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, 4858 const struct hda_fixup *fix, int action) 4859 { 4860 struct alc_spec *spec = codec->spec; 4861 4862 alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); 4863 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4864 spec->init_amp = ALC_INIT_DEFAULT; 4865 if (alc_register_micmute_input_device(codec) != 0) 4866 return; 4867 4868 spec->gpio_mask |= 0x06; 4869 spec->gpio_dir |= 0x02; 4870 spec->gpio_data |= 0x02; 4871 snd_hda_codec_write_cache(codec, codec->core.afg, 0, 4872 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x04); 4873 snd_hda_jack_detect_enable_callback(codec, codec->core.afg, 4874 gpio2_mic_hotkey_event); 4875 return; 4876 } 4877 4878 if (!spec->kb_dev) 4879 return; 4880 4881 switch (action) { 4882 case HDA_FIXUP_ACT_FREE: 4883 input_unregister_device(spec->kb_dev); 4884 spec->kb_dev = NULL; 4885 } 4886 } 4887 4888 /* Line2 = mic mute hotkey 4889 * GPIO2 = mic mute LED 4890 */ 4891 static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec, 4892 const struct hda_fixup *fix, int action) 4893 { 4894 struct alc_spec *spec = codec->spec; 4895 4896 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 4897 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4898 spec->init_amp = ALC_INIT_DEFAULT; 4899 if (alc_register_micmute_input_device(codec) != 0) 4900 return; 4901 4902 snd_hda_jack_detect_enable_callback(codec, 0x1b, 4903 gpio2_mic_hotkey_event); 4904 return; 4905 } 4906 4907 if (!spec->kb_dev) 4908 return; 4909 4910 switch (action) { 4911 case HDA_FIXUP_ACT_FREE: 4912 input_unregister_device(spec->kb_dev); 4913 spec->kb_dev = NULL; 4914 } 4915 } 4916 #else /* INPUT */ 4917 #define alc280_fixup_hp_gpio2_mic_hotkey NULL 4918 #define alc233_fixup_lenovo_line2_mic_hotkey NULL 4919 #endif /* INPUT */ 4920 4921 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, 4922 const struct hda_fixup *fix, int action) 4923 { 4924 struct alc_spec *spec = codec->spec; 4925 4926 alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a); 4927 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4928 spec->cap_mute_led_nid = 0x18; 4929 snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); 4930 } 4931 } 4932 4933 static const struct coef_fw alc225_pre_hsmode[] = { 4934 UPDATE_COEF(0x4a, 1<<8, 0), 4935 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), 4936 UPDATE_COEF(0x63, 3<<14, 3<<14), 4937 UPDATE_COEF(0x4a, 3<<4, 2<<4), 4938 UPDATE_COEF(0x4a, 3<<10, 3<<10), 4939 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10), 4940 UPDATE_COEF(0x4a, 3<<10, 0), 4941 {} 4942 }; 4943 4944 static void alc_headset_mode_unplugged(struct hda_codec *codec) 4945 { 4946 struct alc_spec *spec = codec->spec; 4947 static const struct coef_fw coef0255[] = { 4948 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ 4949 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ 4950 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 4951 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ 4952 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ 4953 {} 4954 }; 4955 static const struct coef_fw coef0256[] = { 4956 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ 4957 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ 4958 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ 4959 WRITE_COEFEX(0x57, 0x03, 0x09a3), /* Direct Drive HP Amp control */ 4960 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 4961 {} 4962 }; 4963 static const struct coef_fw coef0233[] = { 4964 WRITE_COEF(0x1b, 0x0c0b), 4965 WRITE_COEF(0x45, 0xc429), 4966 UPDATE_COEF(0x35, 0x4000, 0), 4967 WRITE_COEF(0x06, 0x2104), 4968 WRITE_COEF(0x1a, 0x0001), 4969 WRITE_COEF(0x26, 0x0004), 4970 WRITE_COEF(0x32, 0x42a3), 4971 {} 4972 }; 4973 static const struct coef_fw coef0288[] = { 4974 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), 4975 UPDATE_COEF(0x50, 0x2000, 0x2000), 4976 UPDATE_COEF(0x56, 0x0006, 0x0006), 4977 UPDATE_COEF(0x66, 0x0008, 0), 4978 UPDATE_COEF(0x67, 0x2000, 0), 4979 {} 4980 }; 4981 static const struct coef_fw coef0298[] = { 4982 UPDATE_COEF(0x19, 0x1300, 0x0300), 4983 {} 4984 }; 4985 static const struct coef_fw coef0292[] = { 4986 WRITE_COEF(0x76, 0x000e), 4987 WRITE_COEF(0x6c, 0x2400), 4988 WRITE_COEF(0x18, 0x7308), 4989 WRITE_COEF(0x6b, 0xc429), 4990 {} 4991 }; 4992 static const struct coef_fw coef0293[] = { 4993 UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ 4994 UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ 4995 UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ 4996 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */ 4997 WRITE_COEF(0x45, 0xc429), /* Set to TRS type */ 4998 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ 4999 {} 5000 }; 5001 static const struct coef_fw coef0668[] = { 5002 WRITE_COEF(0x15, 0x0d40), 5003 WRITE_COEF(0xb7, 0x802b), 5004 {} 5005 }; 5006 static const struct coef_fw coef0225[] = { 5007 UPDATE_COEF(0x63, 3<<14, 0), 5008 {} 5009 }; 5010 static const struct coef_fw coef0274[] = { 5011 UPDATE_COEF(0x4a, 0x0100, 0), 5012 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), 5013 UPDATE_COEF(0x6b, 0xf000, 0x5000), 5014 UPDATE_COEF(0x4a, 0x0010, 0), 5015 UPDATE_COEF(0x4a, 0x0c00, 0x0c00), 5016 WRITE_COEF(0x45, 0x5289), 5017 UPDATE_COEF(0x4a, 0x0c00, 0), 5018 {} 5019 }; 5020 5021 if (spec->no_internal_mic_pin) { 5022 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 5023 return; 5024 } 5025 5026 switch (codec->core.vendor_id) { 5027 case 0x10ec0255: 5028 alc_process_coef_fw(codec, coef0255); 5029 break; 5030 case 0x10ec0230: 5031 case 0x10ec0236: 5032 case 0x10ec0256: 5033 case 0x19e58326: 5034 alc_process_coef_fw(codec, coef0256); 5035 break; 5036 case 0x10ec0234: 5037 case 0x10ec0274: 5038 case 0x10ec0294: 5039 alc_process_coef_fw(codec, coef0274); 5040 break; 5041 case 0x10ec0233: 5042 case 0x10ec0283: 5043 alc_process_coef_fw(codec, coef0233); 5044 break; 5045 case 0x10ec0286: 5046 case 0x10ec0288: 5047 alc_process_coef_fw(codec, coef0288); 5048 break; 5049 case 0x10ec0298: 5050 alc_process_coef_fw(codec, coef0298); 5051 alc_process_coef_fw(codec, coef0288); 5052 break; 5053 case 0x10ec0292: 5054 alc_process_coef_fw(codec, coef0292); 5055 break; 5056 case 0x10ec0293: 5057 alc_process_coef_fw(codec, coef0293); 5058 break; 5059 case 0x10ec0668: 5060 alc_process_coef_fw(codec, coef0668); 5061 break; 5062 case 0x10ec0215: 5063 case 0x10ec0225: 5064 case 0x10ec0285: 5065 case 0x10ec0295: 5066 case 0x10ec0289: 5067 case 0x10ec0299: 5068 alc_process_coef_fw(codec, alc225_pre_hsmode); 5069 alc_process_coef_fw(codec, coef0225); 5070 break; 5071 case 0x10ec0867: 5072 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5073 break; 5074 } 5075 codec_dbg(codec, "Headset jack set to unplugged mode.\n"); 5076 } 5077 5078 5079 static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, 5080 hda_nid_t mic_pin) 5081 { 5082 static const struct coef_fw coef0255[] = { 5083 WRITE_COEFEX(0x57, 0x03, 0x8aa6), 5084 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ 5085 {} 5086 }; 5087 static const struct coef_fw coef0256[] = { 5088 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ 5089 WRITE_COEFEX(0x57, 0x03, 0x09a3), 5090 WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ 5091 {} 5092 }; 5093 static const struct coef_fw coef0233[] = { 5094 UPDATE_COEF(0x35, 0, 1<<14), 5095 WRITE_COEF(0x06, 0x2100), 5096 WRITE_COEF(0x1a, 0x0021), 5097 WRITE_COEF(0x26, 0x008c), 5098 {} 5099 }; 5100 static const struct coef_fw coef0288[] = { 5101 UPDATE_COEF(0x4f, 0x00c0, 0), 5102 UPDATE_COEF(0x50, 0x2000, 0), 5103 UPDATE_COEF(0x56, 0x0006, 0), 5104 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), 5105 UPDATE_COEF(0x66, 0x0008, 0x0008), 5106 UPDATE_COEF(0x67, 0x2000, 0x2000), 5107 {} 5108 }; 5109 static const struct coef_fw coef0292[] = { 5110 WRITE_COEF(0x19, 0xa208), 5111 WRITE_COEF(0x2e, 0xacf0), 5112 {} 5113 }; 5114 static const struct coef_fw coef0293[] = { 5115 UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ 5116 UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ 5117 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ 5118 {} 5119 }; 5120 static const struct coef_fw coef0688[] = { 5121 WRITE_COEF(0xb7, 0x802b), 5122 WRITE_COEF(0xb5, 0x1040), 5123 UPDATE_COEF(0xc3, 0, 1<<12), 5124 {} 5125 }; 5126 static const struct coef_fw coef0225[] = { 5127 UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), 5128 UPDATE_COEF(0x4a, 3<<4, 2<<4), 5129 UPDATE_COEF(0x63, 3<<14, 0), 5130 {} 5131 }; 5132 static const struct coef_fw coef0274[] = { 5133 UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), 5134 UPDATE_COEF(0x4a, 0x0010, 0), 5135 UPDATE_COEF(0x6b, 0xf000, 0), 5136 {} 5137 }; 5138 5139 switch (codec->core.vendor_id) { 5140 case 0x10ec0255: 5141 alc_write_coef_idx(codec, 0x45, 0xc489); 5142 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5143 alc_process_coef_fw(codec, coef0255); 5144 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5145 break; 5146 case 0x10ec0230: 5147 case 0x10ec0236: 5148 case 0x10ec0256: 5149 case 0x19e58326: 5150 alc_write_coef_idx(codec, 0x45, 0xc489); 5151 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5152 alc_process_coef_fw(codec, coef0256); 5153 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5154 break; 5155 case 0x10ec0234: 5156 case 0x10ec0274: 5157 case 0x10ec0294: 5158 alc_write_coef_idx(codec, 0x45, 0x4689); 5159 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5160 alc_process_coef_fw(codec, coef0274); 5161 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5162 break; 5163 case 0x10ec0233: 5164 case 0x10ec0283: 5165 alc_write_coef_idx(codec, 0x45, 0xc429); 5166 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5167 alc_process_coef_fw(codec, coef0233); 5168 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5169 break; 5170 case 0x10ec0286: 5171 case 0x10ec0288: 5172 case 0x10ec0298: 5173 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5174 alc_process_coef_fw(codec, coef0288); 5175 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5176 break; 5177 case 0x10ec0292: 5178 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5179 alc_process_coef_fw(codec, coef0292); 5180 break; 5181 case 0x10ec0293: 5182 /* Set to TRS mode */ 5183 alc_write_coef_idx(codec, 0x45, 0xc429); 5184 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5185 alc_process_coef_fw(codec, coef0293); 5186 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5187 break; 5188 case 0x10ec0867: 5189 alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14); 5190 fallthrough; 5191 case 0x10ec0221: 5192 case 0x10ec0662: 5193 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5194 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5195 break; 5196 case 0x10ec0668: 5197 alc_write_coef_idx(codec, 0x11, 0x0001); 5198 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5199 alc_process_coef_fw(codec, coef0688); 5200 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5201 break; 5202 case 0x10ec0215: 5203 case 0x10ec0225: 5204 case 0x10ec0285: 5205 case 0x10ec0295: 5206 case 0x10ec0289: 5207 case 0x10ec0299: 5208 alc_process_coef_fw(codec, alc225_pre_hsmode); 5209 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10); 5210 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); 5211 alc_process_coef_fw(codec, coef0225); 5212 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 5213 break; 5214 } 5215 codec_dbg(codec, "Headset jack set to mic-in mode.\n"); 5216 } 5217 5218 static void alc_headset_mode_default(struct hda_codec *codec) 5219 { 5220 static const struct coef_fw coef0225[] = { 5221 UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), 5222 UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), 5223 UPDATE_COEF(0x49, 3<<8, 0<<8), 5224 UPDATE_COEF(0x4a, 3<<4, 3<<4), 5225 UPDATE_COEF(0x63, 3<<14, 0), 5226 UPDATE_COEF(0x67, 0xf000, 0x3000), 5227 {} 5228 }; 5229 static const struct coef_fw coef0255[] = { 5230 WRITE_COEF(0x45, 0xc089), 5231 WRITE_COEF(0x45, 0xc489), 5232 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5233 WRITE_COEF(0x49, 0x0049), 5234 {} 5235 }; 5236 static const struct coef_fw coef0256[] = { 5237 WRITE_COEF(0x45, 0xc489), 5238 WRITE_COEFEX(0x57, 0x03, 0x0da3), 5239 WRITE_COEF(0x49, 0x0049), 5240 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 5241 WRITE_COEF(0x06, 0x6100), 5242 {} 5243 }; 5244 static const struct coef_fw coef0233[] = { 5245 WRITE_COEF(0x06, 0x2100), 5246 WRITE_COEF(0x32, 0x4ea3), 5247 {} 5248 }; 5249 static const struct coef_fw coef0288[] = { 5250 UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ 5251 UPDATE_COEF(0x50, 0x2000, 0x2000), 5252 UPDATE_COEF(0x56, 0x0006, 0x0006), 5253 UPDATE_COEF(0x66, 0x0008, 0), 5254 UPDATE_COEF(0x67, 0x2000, 0), 5255 {} 5256 }; 5257 static const struct coef_fw coef0292[] = { 5258 WRITE_COEF(0x76, 0x000e), 5259 WRITE_COEF(0x6c, 0x2400), 5260 WRITE_COEF(0x6b, 0xc429), 5261 WRITE_COEF(0x18, 0x7308), 5262 {} 5263 }; 5264 static const struct coef_fw coef0293[] = { 5265 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ 5266 WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ 5267 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ 5268 {} 5269 }; 5270 static const struct coef_fw coef0688[] = { 5271 WRITE_COEF(0x11, 0x0041), 5272 WRITE_COEF(0x15, 0x0d40), 5273 WRITE_COEF(0xb7, 0x802b), 5274 {} 5275 }; 5276 static const struct coef_fw coef0274[] = { 5277 WRITE_COEF(0x45, 0x4289), 5278 UPDATE_COEF(0x4a, 0x0010, 0x0010), 5279 UPDATE_COEF(0x6b, 0x0f00, 0), 5280 UPDATE_COEF(0x49, 0x0300, 0x0300), 5281 {} 5282 }; 5283 5284 switch (codec->core.vendor_id) { 5285 case 0x10ec0215: 5286 case 0x10ec0225: 5287 case 0x10ec0285: 5288 case 0x10ec0295: 5289 case 0x10ec0289: 5290 case 0x10ec0299: 5291 alc_process_coef_fw(codec, alc225_pre_hsmode); 5292 alc_process_coef_fw(codec, coef0225); 5293 break; 5294 case 0x10ec0255: 5295 alc_process_coef_fw(codec, coef0255); 5296 break; 5297 case 0x10ec0230: 5298 case 0x10ec0236: 5299 case 0x10ec0256: 5300 case 0x19e58326: 5301 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5302 alc_write_coef_idx(codec, 0x45, 0xc089); 5303 msleep(50); 5304 alc_process_coef_fw(codec, coef0256); 5305 break; 5306 case 0x10ec0234: 5307 case 0x10ec0274: 5308 case 0x10ec0294: 5309 alc_process_coef_fw(codec, coef0274); 5310 break; 5311 case 0x10ec0233: 5312 case 0x10ec0283: 5313 alc_process_coef_fw(codec, coef0233); 5314 break; 5315 case 0x10ec0286: 5316 case 0x10ec0288: 5317 case 0x10ec0298: 5318 alc_process_coef_fw(codec, coef0288); 5319 break; 5320 case 0x10ec0292: 5321 alc_process_coef_fw(codec, coef0292); 5322 break; 5323 case 0x10ec0293: 5324 alc_process_coef_fw(codec, coef0293); 5325 break; 5326 case 0x10ec0668: 5327 alc_process_coef_fw(codec, coef0688); 5328 break; 5329 case 0x10ec0867: 5330 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5331 break; 5332 } 5333 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n"); 5334 } 5335 5336 /* Iphone type */ 5337 static void alc_headset_mode_ctia(struct hda_codec *codec) 5338 { 5339 int val; 5340 5341 static const struct coef_fw coef0255[] = { 5342 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ 5343 WRITE_COEF(0x1b, 0x0c2b), 5344 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5345 {} 5346 }; 5347 static const struct coef_fw coef0256[] = { 5348 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ 5349 WRITE_COEF(0x1b, 0x0e6b), 5350 {} 5351 }; 5352 static const struct coef_fw coef0233[] = { 5353 WRITE_COEF(0x45, 0xd429), 5354 WRITE_COEF(0x1b, 0x0c2b), 5355 WRITE_COEF(0x32, 0x4ea3), 5356 {} 5357 }; 5358 static const struct coef_fw coef0288[] = { 5359 UPDATE_COEF(0x50, 0x2000, 0x2000), 5360 UPDATE_COEF(0x56, 0x0006, 0x0006), 5361 UPDATE_COEF(0x66, 0x0008, 0), 5362 UPDATE_COEF(0x67, 0x2000, 0), 5363 {} 5364 }; 5365 static const struct coef_fw coef0292[] = { 5366 WRITE_COEF(0x6b, 0xd429), 5367 WRITE_COEF(0x76, 0x0008), 5368 WRITE_COEF(0x18, 0x7388), 5369 {} 5370 }; 5371 static const struct coef_fw coef0293[] = { 5372 WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ 5373 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ 5374 {} 5375 }; 5376 static const struct coef_fw coef0688[] = { 5377 WRITE_COEF(0x11, 0x0001), 5378 WRITE_COEF(0x15, 0x0d60), 5379 WRITE_COEF(0xc3, 0x0000), 5380 {} 5381 }; 5382 static const struct coef_fw coef0225_1[] = { 5383 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), 5384 UPDATE_COEF(0x63, 3<<14, 2<<14), 5385 {} 5386 }; 5387 static const struct coef_fw coef0225_2[] = { 5388 UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), 5389 UPDATE_COEF(0x63, 3<<14, 1<<14), 5390 {} 5391 }; 5392 5393 switch (codec->core.vendor_id) { 5394 case 0x10ec0255: 5395 alc_process_coef_fw(codec, coef0255); 5396 break; 5397 case 0x10ec0230: 5398 case 0x10ec0236: 5399 case 0x10ec0256: 5400 case 0x19e58326: 5401 alc_process_coef_fw(codec, coef0256); 5402 break; 5403 case 0x10ec0234: 5404 case 0x10ec0274: 5405 case 0x10ec0294: 5406 alc_write_coef_idx(codec, 0x45, 0xd689); 5407 break; 5408 case 0x10ec0233: 5409 case 0x10ec0283: 5410 alc_process_coef_fw(codec, coef0233); 5411 break; 5412 case 0x10ec0298: 5413 val = alc_read_coef_idx(codec, 0x50); 5414 if (val & (1 << 12)) { 5415 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); 5416 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5417 msleep(300); 5418 } else { 5419 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); 5420 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5421 msleep(300); 5422 } 5423 break; 5424 case 0x10ec0286: 5425 case 0x10ec0288: 5426 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); 5427 msleep(300); 5428 alc_process_coef_fw(codec, coef0288); 5429 break; 5430 case 0x10ec0292: 5431 alc_process_coef_fw(codec, coef0292); 5432 break; 5433 case 0x10ec0293: 5434 alc_process_coef_fw(codec, coef0293); 5435 break; 5436 case 0x10ec0668: 5437 alc_process_coef_fw(codec, coef0688); 5438 break; 5439 case 0x10ec0215: 5440 case 0x10ec0225: 5441 case 0x10ec0285: 5442 case 0x10ec0295: 5443 case 0x10ec0289: 5444 case 0x10ec0299: 5445 val = alc_read_coef_idx(codec, 0x45); 5446 if (val & (1 << 9)) 5447 alc_process_coef_fw(codec, coef0225_2); 5448 else 5449 alc_process_coef_fw(codec, coef0225_1); 5450 break; 5451 case 0x10ec0867: 5452 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5453 break; 5454 } 5455 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n"); 5456 } 5457 5458 /* Nokia type */ 5459 static void alc_headset_mode_omtp(struct hda_codec *codec) 5460 { 5461 static const struct coef_fw coef0255[] = { 5462 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ 5463 WRITE_COEF(0x1b, 0x0c2b), 5464 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 5465 {} 5466 }; 5467 static const struct coef_fw coef0256[] = { 5468 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ 5469 WRITE_COEF(0x1b, 0x0e6b), 5470 {} 5471 }; 5472 static const struct coef_fw coef0233[] = { 5473 WRITE_COEF(0x45, 0xe429), 5474 WRITE_COEF(0x1b, 0x0c2b), 5475 WRITE_COEF(0x32, 0x4ea3), 5476 {} 5477 }; 5478 static const struct coef_fw coef0288[] = { 5479 UPDATE_COEF(0x50, 0x2000, 0x2000), 5480 UPDATE_COEF(0x56, 0x0006, 0x0006), 5481 UPDATE_COEF(0x66, 0x0008, 0), 5482 UPDATE_COEF(0x67, 0x2000, 0), 5483 {} 5484 }; 5485 static const struct coef_fw coef0292[] = { 5486 WRITE_COEF(0x6b, 0xe429), 5487 WRITE_COEF(0x76, 0x0008), 5488 WRITE_COEF(0x18, 0x7388), 5489 {} 5490 }; 5491 static const struct coef_fw coef0293[] = { 5492 WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ 5493 UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ 5494 {} 5495 }; 5496 static const struct coef_fw coef0688[] = { 5497 WRITE_COEF(0x11, 0x0001), 5498 WRITE_COEF(0x15, 0x0d50), 5499 WRITE_COEF(0xc3, 0x0000), 5500 {} 5501 }; 5502 static const struct coef_fw coef0225[] = { 5503 UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), 5504 UPDATE_COEF(0x63, 3<<14, 2<<14), 5505 {} 5506 }; 5507 5508 switch (codec->core.vendor_id) { 5509 case 0x10ec0255: 5510 alc_process_coef_fw(codec, coef0255); 5511 break; 5512 case 0x10ec0230: 5513 case 0x10ec0236: 5514 case 0x10ec0256: 5515 case 0x19e58326: 5516 alc_process_coef_fw(codec, coef0256); 5517 break; 5518 case 0x10ec0234: 5519 case 0x10ec0274: 5520 case 0x10ec0294: 5521 alc_write_coef_idx(codec, 0x45, 0xe689); 5522 break; 5523 case 0x10ec0233: 5524 case 0x10ec0283: 5525 alc_process_coef_fw(codec, coef0233); 5526 break; 5527 case 0x10ec0298: 5528 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */ 5529 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); 5530 msleep(300); 5531 break; 5532 case 0x10ec0286: 5533 case 0x10ec0288: 5534 alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); 5535 msleep(300); 5536 alc_process_coef_fw(codec, coef0288); 5537 break; 5538 case 0x10ec0292: 5539 alc_process_coef_fw(codec, coef0292); 5540 break; 5541 case 0x10ec0293: 5542 alc_process_coef_fw(codec, coef0293); 5543 break; 5544 case 0x10ec0668: 5545 alc_process_coef_fw(codec, coef0688); 5546 break; 5547 case 0x10ec0215: 5548 case 0x10ec0225: 5549 case 0x10ec0285: 5550 case 0x10ec0295: 5551 case 0x10ec0289: 5552 case 0x10ec0299: 5553 alc_process_coef_fw(codec, coef0225); 5554 break; 5555 } 5556 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n"); 5557 } 5558 5559 static void alc_determine_headset_type(struct hda_codec *codec) 5560 { 5561 int val; 5562 bool is_ctia = false; 5563 struct alc_spec *spec = codec->spec; 5564 static const struct coef_fw coef0255[] = { 5565 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ 5566 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref 5567 conteol) */ 5568 {} 5569 }; 5570 static const struct coef_fw coef0288[] = { 5571 UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ 5572 {} 5573 }; 5574 static const struct coef_fw coef0298[] = { 5575 UPDATE_COEF(0x50, 0x2000, 0x2000), 5576 UPDATE_COEF(0x56, 0x0006, 0x0006), 5577 UPDATE_COEF(0x66, 0x0008, 0), 5578 UPDATE_COEF(0x67, 0x2000, 0), 5579 UPDATE_COEF(0x19, 0x1300, 0x1300), 5580 {} 5581 }; 5582 static const struct coef_fw coef0293[] = { 5583 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ 5584 WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ 5585 {} 5586 }; 5587 static const struct coef_fw coef0688[] = { 5588 WRITE_COEF(0x11, 0x0001), 5589 WRITE_COEF(0xb7, 0x802b), 5590 WRITE_COEF(0x15, 0x0d60), 5591 WRITE_COEF(0xc3, 0x0c00), 5592 {} 5593 }; 5594 static const struct coef_fw coef0274[] = { 5595 UPDATE_COEF(0x4a, 0x0010, 0), 5596 UPDATE_COEF(0x4a, 0x8000, 0), 5597 WRITE_COEF(0x45, 0xd289), 5598 UPDATE_COEF(0x49, 0x0300, 0x0300), 5599 {} 5600 }; 5601 5602 if (spec->no_internal_mic_pin) { 5603 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 5604 return; 5605 } 5606 5607 switch (codec->core.vendor_id) { 5608 case 0x10ec0255: 5609 alc_process_coef_fw(codec, coef0255); 5610 msleep(300); 5611 val = alc_read_coef_idx(codec, 0x46); 5612 is_ctia = (val & 0x0070) == 0x0070; 5613 break; 5614 case 0x10ec0230: 5615 case 0x10ec0236: 5616 case 0x10ec0256: 5617 case 0x19e58326: 5618 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5619 alc_write_coef_idx(codec, 0x06, 0x6104); 5620 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); 5621 5622 snd_hda_codec_write(codec, 0x21, 0, 5623 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5624 msleep(80); 5625 snd_hda_codec_write(codec, 0x21, 0, 5626 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5627 5628 alc_process_coef_fw(codec, coef0255); 5629 msleep(300); 5630 val = alc_read_coef_idx(codec, 0x46); 5631 is_ctia = (val & 0x0070) == 0x0070; 5632 5633 alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3); 5634 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 5635 5636 snd_hda_codec_write(codec, 0x21, 0, 5637 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 5638 msleep(80); 5639 snd_hda_codec_write(codec, 0x21, 0, 5640 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5641 break; 5642 case 0x10ec0234: 5643 case 0x10ec0274: 5644 case 0x10ec0294: 5645 alc_process_coef_fw(codec, coef0274); 5646 msleep(850); 5647 val = alc_read_coef_idx(codec, 0x46); 5648 is_ctia = (val & 0x00f0) == 0x00f0; 5649 break; 5650 case 0x10ec0233: 5651 case 0x10ec0283: 5652 alc_write_coef_idx(codec, 0x45, 0xd029); 5653 msleep(300); 5654 val = alc_read_coef_idx(codec, 0x46); 5655 is_ctia = (val & 0x0070) == 0x0070; 5656 break; 5657 case 0x10ec0298: 5658 snd_hda_codec_write(codec, 0x21, 0, 5659 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5660 msleep(100); 5661 snd_hda_codec_write(codec, 0x21, 0, 5662 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5663 msleep(200); 5664 5665 val = alc_read_coef_idx(codec, 0x50); 5666 if (val & (1 << 12)) { 5667 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); 5668 alc_process_coef_fw(codec, coef0288); 5669 msleep(350); 5670 val = alc_read_coef_idx(codec, 0x50); 5671 is_ctia = (val & 0x0070) == 0x0070; 5672 } else { 5673 alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010); 5674 alc_process_coef_fw(codec, coef0288); 5675 msleep(350); 5676 val = alc_read_coef_idx(codec, 0x50); 5677 is_ctia = (val & 0x0070) == 0x0070; 5678 } 5679 alc_process_coef_fw(codec, coef0298); 5680 snd_hda_codec_write(codec, 0x21, 0, 5681 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); 5682 msleep(75); 5683 snd_hda_codec_write(codec, 0x21, 0, 5684 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5685 break; 5686 case 0x10ec0286: 5687 case 0x10ec0288: 5688 alc_process_coef_fw(codec, coef0288); 5689 msleep(350); 5690 val = alc_read_coef_idx(codec, 0x50); 5691 is_ctia = (val & 0x0070) == 0x0070; 5692 break; 5693 case 0x10ec0292: 5694 alc_write_coef_idx(codec, 0x6b, 0xd429); 5695 msleep(300); 5696 val = alc_read_coef_idx(codec, 0x6c); 5697 is_ctia = (val & 0x001c) == 0x001c; 5698 break; 5699 case 0x10ec0293: 5700 alc_process_coef_fw(codec, coef0293); 5701 msleep(300); 5702 val = alc_read_coef_idx(codec, 0x46); 5703 is_ctia = (val & 0x0070) == 0x0070; 5704 break; 5705 case 0x10ec0668: 5706 alc_process_coef_fw(codec, coef0688); 5707 msleep(300); 5708 val = alc_read_coef_idx(codec, 0xbe); 5709 is_ctia = (val & 0x1c02) == 0x1c02; 5710 break; 5711 case 0x10ec0215: 5712 case 0x10ec0225: 5713 case 0x10ec0285: 5714 case 0x10ec0295: 5715 case 0x10ec0289: 5716 case 0x10ec0299: 5717 snd_hda_codec_write(codec, 0x21, 0, 5718 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5719 msleep(80); 5720 snd_hda_codec_write(codec, 0x21, 0, 5721 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5722 5723 alc_process_coef_fw(codec, alc225_pre_hsmode); 5724 alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000); 5725 val = alc_read_coef_idx(codec, 0x45); 5726 if (val & (1 << 9)) { 5727 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); 5728 alc_update_coef_idx(codec, 0x49, 3<<8, 2<<8); 5729 msleep(800); 5730 val = alc_read_coef_idx(codec, 0x46); 5731 is_ctia = (val & 0x00f0) == 0x00f0; 5732 } else { 5733 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x34<<10); 5734 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8); 5735 msleep(800); 5736 val = alc_read_coef_idx(codec, 0x46); 5737 is_ctia = (val & 0x00f0) == 0x00f0; 5738 } 5739 alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6); 5740 alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4); 5741 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 5742 5743 snd_hda_codec_write(codec, 0x21, 0, 5744 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 5745 msleep(80); 5746 snd_hda_codec_write(codec, 0x21, 0, 5747 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5748 break; 5749 case 0x10ec0867: 5750 is_ctia = true; 5751 break; 5752 } 5753 5754 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n", 5755 is_ctia ? "yes" : "no"); 5756 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; 5757 } 5758 5759 static void alc_update_headset_mode(struct hda_codec *codec) 5760 { 5761 struct alc_spec *spec = codec->spec; 5762 5763 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; 5764 hda_nid_t hp_pin = alc_get_hp_pin(spec); 5765 5766 int new_headset_mode; 5767 5768 if (!snd_hda_jack_detect(codec, hp_pin)) 5769 new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED; 5770 else if (mux_pin == spec->headset_mic_pin) 5771 new_headset_mode = ALC_HEADSET_MODE_HEADSET; 5772 else if (mux_pin == spec->headphone_mic_pin) 5773 new_headset_mode = ALC_HEADSET_MODE_MIC; 5774 else 5775 new_headset_mode = ALC_HEADSET_MODE_HEADPHONE; 5776 5777 if (new_headset_mode == spec->current_headset_mode) { 5778 snd_hda_gen_update_outputs(codec); 5779 return; 5780 } 5781 5782 switch (new_headset_mode) { 5783 case ALC_HEADSET_MODE_UNPLUGGED: 5784 alc_headset_mode_unplugged(codec); 5785 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; 5786 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; 5787 spec->gen.hp_jack_present = false; 5788 break; 5789 case ALC_HEADSET_MODE_HEADSET: 5790 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN) 5791 alc_determine_headset_type(codec); 5792 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA) 5793 alc_headset_mode_ctia(codec); 5794 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP) 5795 alc_headset_mode_omtp(codec); 5796 spec->gen.hp_jack_present = true; 5797 break; 5798 case ALC_HEADSET_MODE_MIC: 5799 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin); 5800 spec->gen.hp_jack_present = false; 5801 break; 5802 case ALC_HEADSET_MODE_HEADPHONE: 5803 alc_headset_mode_default(codec); 5804 spec->gen.hp_jack_present = true; 5805 break; 5806 } 5807 if (new_headset_mode != ALC_HEADSET_MODE_MIC) { 5808 snd_hda_set_pin_ctl_cache(codec, hp_pin, 5809 AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); 5810 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) 5811 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, 5812 PIN_VREFHIZ); 5813 } 5814 spec->current_headset_mode = new_headset_mode; 5815 5816 snd_hda_gen_update_outputs(codec); 5817 } 5818 5819 static void alc_update_headset_mode_hook(struct hda_codec *codec, 5820 struct snd_kcontrol *kcontrol, 5821 struct snd_ctl_elem_value *ucontrol) 5822 { 5823 alc_update_headset_mode(codec); 5824 } 5825 5826 static void alc_update_headset_jack_cb(struct hda_codec *codec, 5827 struct hda_jack_callback *jack) 5828 { 5829 snd_hda_gen_hp_automute(codec, jack); 5830 alc_update_headset_mode(codec); 5831 } 5832 5833 static void alc_probe_headset_mode(struct hda_codec *codec) 5834 { 5835 int i; 5836 struct alc_spec *spec = codec->spec; 5837 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 5838 5839 /* Find mic pins */ 5840 for (i = 0; i < cfg->num_inputs; i++) { 5841 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin) 5842 spec->headset_mic_pin = cfg->inputs[i].pin; 5843 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin) 5844 spec->headphone_mic_pin = cfg->inputs[i].pin; 5845 } 5846 5847 WARN_ON(spec->gen.cap_sync_hook); 5848 spec->gen.cap_sync_hook = alc_update_headset_mode_hook; 5849 spec->gen.automute_hook = alc_update_headset_mode; 5850 spec->gen.hp_automute_hook = alc_update_headset_jack_cb; 5851 } 5852 5853 static void alc_fixup_headset_mode(struct hda_codec *codec, 5854 const struct hda_fixup *fix, int action) 5855 { 5856 struct alc_spec *spec = codec->spec; 5857 5858 switch (action) { 5859 case HDA_FIXUP_ACT_PRE_PROBE: 5860 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC; 5861 break; 5862 case HDA_FIXUP_ACT_PROBE: 5863 alc_probe_headset_mode(codec); 5864 break; 5865 case HDA_FIXUP_ACT_INIT: 5866 if (is_s3_resume(codec) || is_s4_resume(codec)) { 5867 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; 5868 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; 5869 } 5870 alc_update_headset_mode(codec); 5871 break; 5872 } 5873 } 5874 5875 static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, 5876 const struct hda_fixup *fix, int action) 5877 { 5878 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5879 struct alc_spec *spec = codec->spec; 5880 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 5881 } 5882 else 5883 alc_fixup_headset_mode(codec, fix, action); 5884 } 5885 5886 static void alc255_set_default_jack_type(struct hda_codec *codec) 5887 { 5888 /* Set to iphone type */ 5889 static const struct coef_fw alc255fw[] = { 5890 WRITE_COEF(0x1b, 0x880b), 5891 WRITE_COEF(0x45, 0xd089), 5892 WRITE_COEF(0x1b, 0x080b), 5893 WRITE_COEF(0x46, 0x0004), 5894 WRITE_COEF(0x1b, 0x0c0b), 5895 {} 5896 }; 5897 static const struct coef_fw alc256fw[] = { 5898 WRITE_COEF(0x1b, 0x884b), 5899 WRITE_COEF(0x45, 0xd089), 5900 WRITE_COEF(0x1b, 0x084b), 5901 WRITE_COEF(0x46, 0x0004), 5902 WRITE_COEF(0x1b, 0x0c4b), 5903 {} 5904 }; 5905 switch (codec->core.vendor_id) { 5906 case 0x10ec0255: 5907 alc_process_coef_fw(codec, alc255fw); 5908 break; 5909 case 0x10ec0230: 5910 case 0x10ec0236: 5911 case 0x10ec0256: 5912 case 0x19e58326: 5913 alc_process_coef_fw(codec, alc256fw); 5914 break; 5915 } 5916 msleep(30); 5917 } 5918 5919 static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, 5920 const struct hda_fixup *fix, int action) 5921 { 5922 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5923 alc255_set_default_jack_type(codec); 5924 } 5925 alc_fixup_headset_mode(codec, fix, action); 5926 } 5927 5928 static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, 5929 const struct hda_fixup *fix, int action) 5930 { 5931 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5932 struct alc_spec *spec = codec->spec; 5933 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 5934 alc255_set_default_jack_type(codec); 5935 } 5936 else 5937 alc_fixup_headset_mode(codec, fix, action); 5938 } 5939 5940 static void alc288_update_headset_jack_cb(struct hda_codec *codec, 5941 struct hda_jack_callback *jack) 5942 { 5943 struct alc_spec *spec = codec->spec; 5944 5945 alc_update_headset_jack_cb(codec, jack); 5946 /* Headset Mic enable or disable, only for Dell Dino */ 5947 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present); 5948 } 5949 5950 static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec, 5951 const struct hda_fixup *fix, int action) 5952 { 5953 alc_fixup_headset_mode(codec, fix, action); 5954 if (action == HDA_FIXUP_ACT_PROBE) { 5955 struct alc_spec *spec = codec->spec; 5956 /* toggled via hp_automute_hook */ 5957 spec->gpio_mask |= 0x40; 5958 spec->gpio_dir |= 0x40; 5959 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb; 5960 } 5961 } 5962 5963 static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, 5964 const struct hda_fixup *fix, int action) 5965 { 5966 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5967 struct alc_spec *spec = codec->spec; 5968 spec->gen.auto_mute_via_amp = 1; 5969 } 5970 } 5971 5972 static void alc_fixup_no_shutup(struct hda_codec *codec, 5973 const struct hda_fixup *fix, int action) 5974 { 5975 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5976 struct alc_spec *spec = codec->spec; 5977 spec->no_shutup_pins = 1; 5978 } 5979 } 5980 5981 static void alc_fixup_disable_aamix(struct hda_codec *codec, 5982 const struct hda_fixup *fix, int action) 5983 { 5984 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5985 struct alc_spec *spec = codec->spec; 5986 /* Disable AA-loopback as it causes white noise */ 5987 spec->gen.mixer_nid = 0; 5988 } 5989 } 5990 5991 /* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */ 5992 static void alc_fixup_tpt440_dock(struct hda_codec *codec, 5993 const struct hda_fixup *fix, int action) 5994 { 5995 static const struct hda_pintbl pincfgs[] = { 5996 { 0x16, 0x21211010 }, /* dock headphone */ 5997 { 0x19, 0x21a11010 }, /* dock mic */ 5998 { } 5999 }; 6000 struct alc_spec *spec = codec->spec; 6001 6002 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6003 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 6004 codec->power_save_node = 0; /* avoid click noises */ 6005 snd_hda_apply_pincfgs(codec, pincfgs); 6006 } 6007 } 6008 6009 static void alc_fixup_tpt470_dock(struct hda_codec *codec, 6010 const struct hda_fixup *fix, int action) 6011 { 6012 static const struct hda_pintbl pincfgs[] = { 6013 { 0x17, 0x21211010 }, /* dock headphone */ 6014 { 0x19, 0x21a11010 }, /* dock mic */ 6015 { } 6016 }; 6017 struct alc_spec *spec = codec->spec; 6018 6019 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6020 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 6021 snd_hda_apply_pincfgs(codec, pincfgs); 6022 } else if (action == HDA_FIXUP_ACT_INIT) { 6023 /* Enable DOCK device */ 6024 snd_hda_codec_write(codec, 0x17, 0, 6025 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 6026 /* Enable DOCK device */ 6027 snd_hda_codec_write(codec, 0x19, 0, 6028 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 6029 } 6030 } 6031 6032 static void alc_fixup_tpt470_dacs(struct hda_codec *codec, 6033 const struct hda_fixup *fix, int action) 6034 { 6035 /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise 6036 * the speaker output becomes too low by some reason on Thinkpads with 6037 * ALC298 codec 6038 */ 6039 static const hda_nid_t preferred_pairs[] = { 6040 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, 6041 0 6042 }; 6043 struct alc_spec *spec = codec->spec; 6044 6045 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6046 spec->gen.preferred_dacs = preferred_pairs; 6047 } 6048 6049 static void alc295_fixup_asus_dacs(struct hda_codec *codec, 6050 const struct hda_fixup *fix, int action) 6051 { 6052 static const hda_nid_t preferred_pairs[] = { 6053 0x17, 0x02, 0x21, 0x03, 0 6054 }; 6055 struct alc_spec *spec = codec->spec; 6056 6057 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6058 spec->gen.preferred_dacs = preferred_pairs; 6059 } 6060 6061 static void alc_shutup_dell_xps13(struct hda_codec *codec) 6062 { 6063 struct alc_spec *spec = codec->spec; 6064 int hp_pin = alc_get_hp_pin(spec); 6065 6066 /* Prevent pop noises when headphones are plugged in */ 6067 snd_hda_codec_write(codec, hp_pin, 0, 6068 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 6069 msleep(20); 6070 } 6071 6072 static void alc_fixup_dell_xps13(struct hda_codec *codec, 6073 const struct hda_fixup *fix, int action) 6074 { 6075 struct alc_spec *spec = codec->spec; 6076 struct hda_input_mux *imux = &spec->gen.input_mux; 6077 int i; 6078 6079 switch (action) { 6080 case HDA_FIXUP_ACT_PRE_PROBE: 6081 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise 6082 * it causes a click noise at start up 6083 */ 6084 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 6085 spec->shutup = alc_shutup_dell_xps13; 6086 break; 6087 case HDA_FIXUP_ACT_PROBE: 6088 /* Make the internal mic the default input source. */ 6089 for (i = 0; i < imux->num_items; i++) { 6090 if (spec->gen.imux_pins[i] == 0x12) { 6091 spec->gen.cur_mux[0] = i; 6092 break; 6093 } 6094 } 6095 break; 6096 } 6097 } 6098 6099 static void alc_fixup_headset_mode_alc662(struct hda_codec *codec, 6100 const struct hda_fixup *fix, int action) 6101 { 6102 struct alc_spec *spec = codec->spec; 6103 6104 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6105 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 6106 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ 6107 6108 /* Disable boost for mic-in permanently. (This code is only called 6109 from quirks that guarantee that the headphone is at NID 0x1b.) */ 6110 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000); 6111 snd_hda_override_wcaps(codec, 0x1b, get_wcaps(codec, 0x1b) & ~AC_WCAP_IN_AMP); 6112 } else 6113 alc_fixup_headset_mode(codec, fix, action); 6114 } 6115 6116 static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, 6117 const struct hda_fixup *fix, int action) 6118 { 6119 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6120 alc_write_coef_idx(codec, 0xc4, 0x8000); 6121 alc_update_coef_idx(codec, 0xc2, ~0xfe, 0); 6122 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); 6123 } 6124 alc_fixup_headset_mode(codec, fix, action); 6125 } 6126 6127 /* Returns the nid of the external mic input pin, or 0 if it cannot be found. */ 6128 static int find_ext_mic_pin(struct hda_codec *codec) 6129 { 6130 struct alc_spec *spec = codec->spec; 6131 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 6132 hda_nid_t nid; 6133 unsigned int defcfg; 6134 int i; 6135 6136 for (i = 0; i < cfg->num_inputs; i++) { 6137 if (cfg->inputs[i].type != AUTO_PIN_MIC) 6138 continue; 6139 nid = cfg->inputs[i].pin; 6140 defcfg = snd_hda_codec_get_pincfg(codec, nid); 6141 if (snd_hda_get_input_pin_attr(defcfg) == INPUT_PIN_ATTR_INT) 6142 continue; 6143 return nid; 6144 } 6145 6146 return 0; 6147 } 6148 6149 static void alc271_hp_gate_mic_jack(struct hda_codec *codec, 6150 const struct hda_fixup *fix, 6151 int action) 6152 { 6153 struct alc_spec *spec = codec->spec; 6154 6155 if (action == HDA_FIXUP_ACT_PROBE) { 6156 int mic_pin = find_ext_mic_pin(codec); 6157 int hp_pin = alc_get_hp_pin(spec); 6158 6159 if (snd_BUG_ON(!mic_pin || !hp_pin)) 6160 return; 6161 snd_hda_jack_set_gating_jack(codec, mic_pin, hp_pin); 6162 } 6163 } 6164 6165 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, 6166 const struct hda_fixup *fix, 6167 int action) 6168 { 6169 struct alc_spec *spec = codec->spec; 6170 struct auto_pin_cfg *cfg = &spec->gen.autocfg; 6171 int i; 6172 6173 /* The mic boosts on level 2 and 3 are too noisy 6174 on the internal mic input. 6175 Therefore limit the boost to 0 or 1. */ 6176 6177 if (action != HDA_FIXUP_ACT_PROBE) 6178 return; 6179 6180 for (i = 0; i < cfg->num_inputs; i++) { 6181 hda_nid_t nid = cfg->inputs[i].pin; 6182 unsigned int defcfg; 6183 if (cfg->inputs[i].type != AUTO_PIN_MIC) 6184 continue; 6185 defcfg = snd_hda_codec_get_pincfg(codec, nid); 6186 if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT) 6187 continue; 6188 6189 snd_hda_override_amp_caps(codec, nid, HDA_INPUT, 6190 (0x00 << AC_AMPCAP_OFFSET_SHIFT) | 6191 (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) | 6192 (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) | 6193 (0 << AC_AMPCAP_MUTE_SHIFT)); 6194 } 6195 } 6196 6197 static void alc283_hp_automute_hook(struct hda_codec *codec, 6198 struct hda_jack_callback *jack) 6199 { 6200 struct alc_spec *spec = codec->spec; 6201 int vref; 6202 6203 msleep(200); 6204 snd_hda_gen_hp_automute(codec, jack); 6205 6206 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 6207 6208 msleep(600); 6209 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 6210 vref); 6211 } 6212 6213 static void alc283_fixup_chromebook(struct hda_codec *codec, 6214 const struct hda_fixup *fix, int action) 6215 { 6216 struct alc_spec *spec = codec->spec; 6217 6218 switch (action) { 6219 case HDA_FIXUP_ACT_PRE_PROBE: 6220 snd_hda_override_wcaps(codec, 0x03, 0); 6221 /* Disable AA-loopback as it causes white noise */ 6222 spec->gen.mixer_nid = 0; 6223 break; 6224 case HDA_FIXUP_ACT_INIT: 6225 /* MIC2-VREF control */ 6226 /* Set to manual mode */ 6227 alc_update_coef_idx(codec, 0x06, 0x000c, 0); 6228 /* Enable Line1 input control by verb */ 6229 alc_update_coef_idx(codec, 0x1a, 0, 1 << 4); 6230 break; 6231 } 6232 } 6233 6234 static void alc283_fixup_sense_combo_jack(struct hda_codec *codec, 6235 const struct hda_fixup *fix, int action) 6236 { 6237 struct alc_spec *spec = codec->spec; 6238 6239 switch (action) { 6240 case HDA_FIXUP_ACT_PRE_PROBE: 6241 spec->gen.hp_automute_hook = alc283_hp_automute_hook; 6242 break; 6243 case HDA_FIXUP_ACT_INIT: 6244 /* MIC2-VREF control */ 6245 /* Set to manual mode */ 6246 alc_update_coef_idx(codec, 0x06, 0x000c, 0); 6247 break; 6248 } 6249 } 6250 6251 /* mute tablet speaker pin (0x14) via dock plugging in addition */ 6252 static void asus_tx300_automute(struct hda_codec *codec) 6253 { 6254 struct alc_spec *spec = codec->spec; 6255 snd_hda_gen_update_outputs(codec); 6256 if (snd_hda_jack_detect(codec, 0x1b)) 6257 spec->gen.mute_bits |= (1ULL << 0x14); 6258 } 6259 6260 static void alc282_fixup_asus_tx300(struct hda_codec *codec, 6261 const struct hda_fixup *fix, int action) 6262 { 6263 struct alc_spec *spec = codec->spec; 6264 static const struct hda_pintbl dock_pins[] = { 6265 { 0x1b, 0x21114000 }, /* dock speaker pin */ 6266 {} 6267 }; 6268 6269 switch (action) { 6270 case HDA_FIXUP_ACT_PRE_PROBE: 6271 spec->init_amp = ALC_INIT_DEFAULT; 6272 /* TX300 needs to set up GPIO2 for the speaker amp */ 6273 alc_setup_gpio(codec, 0x04); 6274 snd_hda_apply_pincfgs(codec, dock_pins); 6275 spec->gen.auto_mute_via_amp = 1; 6276 spec->gen.automute_hook = asus_tx300_automute; 6277 snd_hda_jack_detect_enable_callback(codec, 0x1b, 6278 snd_hda_gen_hp_automute); 6279 break; 6280 case HDA_FIXUP_ACT_PROBE: 6281 spec->init_amp = ALC_INIT_DEFAULT; 6282 break; 6283 case HDA_FIXUP_ACT_BUILD: 6284 /* this is a bit tricky; give more sane names for the main 6285 * (tablet) speaker and the dock speaker, respectively 6286 */ 6287 rename_ctl(codec, "Speaker Playback Switch", 6288 "Dock Speaker Playback Switch"); 6289 rename_ctl(codec, "Bass Speaker Playback Switch", 6290 "Speaker Playback Switch"); 6291 break; 6292 } 6293 } 6294 6295 static void alc290_fixup_mono_speakers(struct hda_codec *codec, 6296 const struct hda_fixup *fix, int action) 6297 { 6298 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6299 /* DAC node 0x03 is giving mono output. We therefore want to 6300 make sure 0x14 (front speaker) and 0x15 (headphones) use the 6301 stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */ 6302 static const hda_nid_t conn1[] = { 0x0c }; 6303 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); 6304 snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); 6305 } 6306 } 6307 6308 static void alc298_fixup_speaker_volume(struct hda_codec *codec, 6309 const struct hda_fixup *fix, int action) 6310 { 6311 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6312 /* The speaker is routed to the Node 0x06 by a mistake, as a result 6313 we can't adjust the speaker's volume since this node does not has 6314 Amp-out capability. we change the speaker's route to: 6315 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 ( 6316 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust 6317 speaker's volume now. */ 6318 6319 static const hda_nid_t conn1[] = { 0x0c }; 6320 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1); 6321 } 6322 } 6323 6324 /* disable DAC3 (0x06) selection on NID 0x17 as it has no volume amp control */ 6325 static void alc295_fixup_disable_dac3(struct hda_codec *codec, 6326 const struct hda_fixup *fix, int action) 6327 { 6328 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6329 static const hda_nid_t conn[] = { 0x02, 0x03 }; 6330 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6331 } 6332 } 6333 6334 /* force NID 0x17 (Bass Speaker) to DAC1 to share it with the main speaker */ 6335 static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec, 6336 const struct hda_fixup *fix, int action) 6337 { 6338 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6339 static const hda_nid_t conn[] = { 0x02 }; 6340 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6341 } 6342 } 6343 6344 /* Hook to update amp GPIO4 for automute */ 6345 static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, 6346 struct hda_jack_callback *jack) 6347 { 6348 struct alc_spec *spec = codec->spec; 6349 6350 snd_hda_gen_hp_automute(codec, jack); 6351 /* mute_led_polarity is set to 0, so we pass inverted value here */ 6352 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity, 6353 !spec->gen.hp_jack_present); 6354 } 6355 6356 /* Manage GPIOs for HP EliteBook Folio 9480m. 6357 * 6358 * GPIO4 is the headphone amplifier power control 6359 * GPIO3 is the audio output mute indicator LED 6360 */ 6361 6362 static void alc280_fixup_hp_9480m(struct hda_codec *codec, 6363 const struct hda_fixup *fix, 6364 int action) 6365 { 6366 struct alc_spec *spec = codec->spec; 6367 6368 alc_fixup_hp_gpio_led(codec, action, 0x08, 0); 6369 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6370 /* amp at GPIO4; toggled via alc280_hp_gpio4_automute_hook() */ 6371 spec->gpio_mask |= 0x10; 6372 spec->gpio_dir |= 0x10; 6373 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; 6374 } 6375 } 6376 6377 static void alc275_fixup_gpio4_off(struct hda_codec *codec, 6378 const struct hda_fixup *fix, 6379 int action) 6380 { 6381 struct alc_spec *spec = codec->spec; 6382 6383 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6384 spec->gpio_mask |= 0x04; 6385 spec->gpio_dir |= 0x04; 6386 /* set data bit low */ 6387 } 6388 } 6389 6390 /* Quirk for Thinkpad X1 7th and 8th Gen 6391 * The following fixed routing needed 6392 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly 6393 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC 6394 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp 6395 */ 6396 static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec, 6397 const struct hda_fixup *fix, int action) 6398 { 6399 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 6400 static const hda_nid_t preferred_pairs[] = { 6401 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0 6402 }; 6403 struct alc_spec *spec = codec->spec; 6404 6405 switch (action) { 6406 case HDA_FIXUP_ACT_PRE_PROBE: 6407 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6408 spec->gen.preferred_dacs = preferred_pairs; 6409 break; 6410 case HDA_FIXUP_ACT_BUILD: 6411 /* The generic parser creates somewhat unintuitive volume ctls 6412 * with the fixed routing above, and the shared DAC2 may be 6413 * confusing for PA. 6414 * Rename those to unique names so that PA doesn't touch them 6415 * and use only Master volume. 6416 */ 6417 rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume"); 6418 rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume"); 6419 break; 6420 } 6421 } 6422 6423 static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, 6424 const struct hda_fixup *fix, 6425 int action) 6426 { 6427 alc_fixup_dual_codecs(codec, fix, action); 6428 switch (action) { 6429 case HDA_FIXUP_ACT_PRE_PROBE: 6430 /* override card longname to provide a unique UCM profile */ 6431 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs"); 6432 break; 6433 case HDA_FIXUP_ACT_BUILD: 6434 /* rename Capture controls depending on the codec */ 6435 rename_ctl(codec, "Capture Volume", 6436 codec->addr == 0 ? 6437 "Rear-Panel Capture Volume" : 6438 "Front-Panel Capture Volume"); 6439 rename_ctl(codec, "Capture Switch", 6440 codec->addr == 0 ? 6441 "Rear-Panel Capture Switch" : 6442 "Front-Panel Capture Switch"); 6443 break; 6444 } 6445 } 6446 6447 static void alc225_fixup_s3_pop_noise(struct hda_codec *codec, 6448 const struct hda_fixup *fix, int action) 6449 { 6450 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6451 return; 6452 6453 codec->power_save_node = 1; 6454 } 6455 6456 /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */ 6457 static void alc274_fixup_bind_dacs(struct hda_codec *codec, 6458 const struct hda_fixup *fix, int action) 6459 { 6460 struct alc_spec *spec = codec->spec; 6461 static const hda_nid_t preferred_pairs[] = { 6462 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, 6463 0 6464 }; 6465 6466 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6467 return; 6468 6469 spec->gen.preferred_dacs = preferred_pairs; 6470 spec->gen.auto_mute_via_amp = 1; 6471 codec->power_save_node = 0; 6472 } 6473 6474 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ 6475 static void alc289_fixup_asus_ga401(struct hda_codec *codec, 6476 const struct hda_fixup *fix, int action) 6477 { 6478 static const hda_nid_t preferred_pairs[] = { 6479 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0 6480 }; 6481 struct alc_spec *spec = codec->spec; 6482 6483 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 6484 spec->gen.preferred_dacs = preferred_pairs; 6485 spec->gen.obey_preferred_dacs = 1; 6486 } 6487 } 6488 6489 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */ 6490 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec, 6491 const struct hda_fixup *fix, int action) 6492 { 6493 if (action != HDA_FIXUP_ACT_PRE_PROBE) 6494 return; 6495 6496 snd_hda_override_wcaps(codec, 0x03, 0); 6497 } 6498 6499 static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) 6500 { 6501 switch (codec->core.vendor_id) { 6502 case 0x10ec0274: 6503 case 0x10ec0294: 6504 case 0x10ec0225: 6505 case 0x10ec0295: 6506 case 0x10ec0299: 6507 alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ 6508 alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); 6509 break; 6510 case 0x10ec0230: 6511 case 0x10ec0235: 6512 case 0x10ec0236: 6513 case 0x10ec0255: 6514 case 0x10ec0256: 6515 case 0x10ec0257: 6516 case 0x19e58326: 6517 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 6518 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); 6519 break; 6520 } 6521 } 6522 6523 static void alc295_fixup_chromebook(struct hda_codec *codec, 6524 const struct hda_fixup *fix, int action) 6525 { 6526 struct alc_spec *spec = codec->spec; 6527 6528 switch (action) { 6529 case HDA_FIXUP_ACT_PRE_PROBE: 6530 spec->ultra_low_power = true; 6531 break; 6532 case HDA_FIXUP_ACT_INIT: 6533 alc_combo_jack_hp_jd_restart(codec); 6534 break; 6535 } 6536 } 6537 6538 static void alc256_fixup_chromebook(struct hda_codec *codec, 6539 const struct hda_fixup *fix, int action) 6540 { 6541 struct alc_spec *spec = codec->spec; 6542 6543 switch (action) { 6544 case HDA_FIXUP_ACT_PRE_PROBE: 6545 spec->gen.suppress_auto_mute = 1; 6546 spec->gen.suppress_auto_mic = 1; 6547 spec->en_3kpull_low = false; 6548 break; 6549 } 6550 } 6551 6552 static void alc_fixup_disable_mic_vref(struct hda_codec *codec, 6553 const struct hda_fixup *fix, int action) 6554 { 6555 if (action == HDA_FIXUP_ACT_PRE_PROBE) 6556 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 6557 } 6558 6559 6560 static void alc294_gx502_toggle_output(struct hda_codec *codec, 6561 struct hda_jack_callback *cb) 6562 { 6563 /* The Windows driver sets the codec up in a very different way where 6564 * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it 6565 */ 6566 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) 6567 alc_write_coef_idx(codec, 0x10, 0x8a20); 6568 else 6569 alc_write_coef_idx(codec, 0x10, 0x0a20); 6570 } 6571 6572 static void alc294_fixup_gx502_hp(struct hda_codec *codec, 6573 const struct hda_fixup *fix, int action) 6574 { 6575 /* Pin 0x21: headphones/headset mic */ 6576 if (!is_jack_detectable(codec, 0x21)) 6577 return; 6578 6579 switch (action) { 6580 case HDA_FIXUP_ACT_PRE_PROBE: 6581 snd_hda_jack_detect_enable_callback(codec, 0x21, 6582 alc294_gx502_toggle_output); 6583 break; 6584 case HDA_FIXUP_ACT_INIT: 6585 /* Make sure to start in a correct state, i.e. if 6586 * headphones have been plugged in before powering up the system 6587 */ 6588 alc294_gx502_toggle_output(codec, NULL); 6589 break; 6590 } 6591 } 6592 6593 static void alc294_gu502_toggle_output(struct hda_codec *codec, 6594 struct hda_jack_callback *cb) 6595 { 6596 /* Windows sets 0x10 to 0x8420 for Node 0x20 which is 6597 * responsible from changes between speakers and headphones 6598 */ 6599 if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) 6600 alc_write_coef_idx(codec, 0x10, 0x8420); 6601 else 6602 alc_write_coef_idx(codec, 0x10, 0x0a20); 6603 } 6604 6605 static void alc294_fixup_gu502_hp(struct hda_codec *codec, 6606 const struct hda_fixup *fix, int action) 6607 { 6608 if (!is_jack_detectable(codec, 0x21)) 6609 return; 6610 6611 switch (action) { 6612 case HDA_FIXUP_ACT_PRE_PROBE: 6613 snd_hda_jack_detect_enable_callback(codec, 0x21, 6614 alc294_gu502_toggle_output); 6615 break; 6616 case HDA_FIXUP_ACT_INIT: 6617 alc294_gu502_toggle_output(codec, NULL); 6618 break; 6619 } 6620 } 6621 6622 static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, 6623 const struct hda_fixup *fix, int action) 6624 { 6625 if (action != HDA_FIXUP_ACT_INIT) 6626 return; 6627 6628 msleep(100); 6629 alc_write_coef_idx(codec, 0x65, 0x0); 6630 } 6631 6632 static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, 6633 const struct hda_fixup *fix, int action) 6634 { 6635 switch (action) { 6636 case HDA_FIXUP_ACT_INIT: 6637 alc_combo_jack_hp_jd_restart(codec); 6638 break; 6639 } 6640 } 6641 6642 static void alc_fixup_no_int_mic(struct hda_codec *codec, 6643 const struct hda_fixup *fix, int action) 6644 { 6645 struct alc_spec *spec = codec->spec; 6646 6647 switch (action) { 6648 case HDA_FIXUP_ACT_PRE_PROBE: 6649 /* Mic RING SLEEVE swap for combo jack */ 6650 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 6651 spec->no_internal_mic_pin = true; 6652 break; 6653 case HDA_FIXUP_ACT_INIT: 6654 alc_combo_jack_hp_jd_restart(codec); 6655 break; 6656 } 6657 } 6658 6659 /* GPIO1 = amplifier on/off 6660 * GPIO3 = mic mute LED 6661 */ 6662 static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, 6663 const struct hda_fixup *fix, int action) 6664 { 6665 static const hda_nid_t conn[] = { 0x02 }; 6666 6667 struct alc_spec *spec = codec->spec; 6668 static const struct hda_pintbl pincfgs[] = { 6669 { 0x14, 0x90170110 }, /* front/high speakers */ 6670 { 0x17, 0x90170130 }, /* back/bass speakers */ 6671 { } 6672 }; 6673 6674 //enable micmute led 6675 alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); 6676 6677 switch (action) { 6678 case HDA_FIXUP_ACT_PRE_PROBE: 6679 spec->micmute_led_polarity = 1; 6680 /* needed for amp of back speakers */ 6681 spec->gpio_mask |= 0x01; 6682 spec->gpio_dir |= 0x01; 6683 snd_hda_apply_pincfgs(codec, pincfgs); 6684 /* share DAC to have unified volume control */ 6685 snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 6686 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6687 break; 6688 case HDA_FIXUP_ACT_INIT: 6689 /* need to toggle GPIO to enable the amp of back speakers */ 6690 alc_update_gpio_data(codec, 0x01, true); 6691 msleep(100); 6692 alc_update_gpio_data(codec, 0x01, false); 6693 break; 6694 } 6695 } 6696 6697 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, 6698 const struct hda_fixup *fix, int action) 6699 { 6700 static const hda_nid_t conn[] = { 0x02 }; 6701 static const struct hda_pintbl pincfgs[] = { 6702 { 0x14, 0x90170110 }, /* rear speaker */ 6703 { } 6704 }; 6705 6706 switch (action) { 6707 case HDA_FIXUP_ACT_PRE_PROBE: 6708 snd_hda_apply_pincfgs(codec, pincfgs); 6709 /* force front speaker to DAC1 */ 6710 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6711 break; 6712 } 6713 } 6714 6715 static void alc285_fixup_hp_envy_x360(struct hda_codec *codec, 6716 const struct hda_fixup *fix, 6717 int action) 6718 { 6719 static const struct coef_fw coefs[] = { 6720 WRITE_COEF(0x08, 0x6a0c), WRITE_COEF(0x0d, 0xa023), 6721 WRITE_COEF(0x10, 0x0320), WRITE_COEF(0x1a, 0x8c03), 6722 WRITE_COEF(0x25, 0x1800), WRITE_COEF(0x26, 0x003a), 6723 WRITE_COEF(0x28, 0x1dfe), WRITE_COEF(0x29, 0xb014), 6724 WRITE_COEF(0x2b, 0x1dfe), WRITE_COEF(0x37, 0xfe15), 6725 WRITE_COEF(0x38, 0x7909), WRITE_COEF(0x45, 0xd489), 6726 WRITE_COEF(0x46, 0x00f4), WRITE_COEF(0x4a, 0x21e0), 6727 WRITE_COEF(0x66, 0x03f0), WRITE_COEF(0x67, 0x1000), 6728 WRITE_COEF(0x6e, 0x1005), { } 6729 }; 6730 6731 static const struct hda_pintbl pincfgs[] = { 6732 { 0x12, 0xb7a60130 }, /* Internal microphone*/ 6733 { 0x14, 0x90170150 }, /* B&O soundbar speakers */ 6734 { 0x17, 0x90170153 }, /* Side speakers */ 6735 { 0x19, 0x03a11040 }, /* Headset microphone */ 6736 { } 6737 }; 6738 6739 switch (action) { 6740 case HDA_FIXUP_ACT_PRE_PROBE: 6741 snd_hda_apply_pincfgs(codec, pincfgs); 6742 6743 /* Fixes volume control problem for side speakers */ 6744 alc295_fixup_disable_dac3(codec, fix, action); 6745 6746 /* Fixes no sound from headset speaker */ 6747 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0); 6748 6749 /* Auto-enable headset mic when plugged */ 6750 snd_hda_jack_set_gating_jack(codec, 0x19, 0x21); 6751 6752 /* Headset mic volume enhancement */ 6753 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREF50); 6754 break; 6755 case HDA_FIXUP_ACT_INIT: 6756 alc_process_coef_fw(codec, coefs); 6757 break; 6758 case HDA_FIXUP_ACT_BUILD: 6759 rename_ctl(codec, "Bass Speaker Playback Volume", 6760 "B&O-Tuned Playback Volume"); 6761 rename_ctl(codec, "Front Playback Switch", 6762 "B&O Soundbar Playback Switch"); 6763 rename_ctl(codec, "Bass Speaker Playback Switch", 6764 "Side Speaker Playback Switch"); 6765 break; 6766 } 6767 } 6768 6769 /* for hda_fixup_thinkpad_acpi() */ 6770 #include "thinkpad_helper.c" 6771 6772 static void alc_fixup_thinkpad_acpi(struct hda_codec *codec, 6773 const struct hda_fixup *fix, int action) 6774 { 6775 alc_fixup_no_shutup(codec, fix, action); /* reduce click noise */ 6776 hda_fixup_thinkpad_acpi(codec, fix, action); 6777 } 6778 6779 /* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */ 6780 static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, 6781 const struct hda_fixup *fix, 6782 int action) 6783 { 6784 struct alc_spec *spec = codec->spec; 6785 6786 switch (action) { 6787 case HDA_FIXUP_ACT_PRE_PROBE: 6788 spec->gen.suppress_auto_mute = 1; 6789 break; 6790 } 6791 } 6792 6793 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data) 6794 { 6795 struct hda_codec *cdc = data; 6796 struct alc_spec *spec = cdc->spec; 6797 6798 codec_info(cdc, "ACPI Notification %d\n", event); 6799 6800 hda_component_acpi_device_notify(&spec->comps, handle, event, data); 6801 } 6802 6803 static int comp_bind(struct device *dev) 6804 { 6805 struct hda_codec *cdc = dev_to_hda_codec(dev); 6806 struct alc_spec *spec = cdc->spec; 6807 int ret; 6808 6809 ret = hda_component_manager_bind(cdc, &spec->comps); 6810 if (ret) 6811 return ret; 6812 6813 return hda_component_manager_bind_acpi_notifications(cdc, 6814 &spec->comps, 6815 comp_acpi_device_notify, cdc); 6816 } 6817 6818 static void comp_unbind(struct device *dev) 6819 { 6820 struct hda_codec *cdc = dev_to_hda_codec(dev); 6821 struct alc_spec *spec = cdc->spec; 6822 6823 hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify); 6824 hda_component_manager_unbind(cdc, &spec->comps); 6825 } 6826 6827 static const struct component_master_ops comp_master_ops = { 6828 .bind = comp_bind, 6829 .unbind = comp_unbind, 6830 }; 6831 6832 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 6833 struct snd_pcm_substream *sub, int action) 6834 { 6835 struct alc_spec *spec = cdc->spec; 6836 6837 hda_component_manager_playback_hook(&spec->comps, action); 6838 } 6839 6840 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus, 6841 const char *hid, const char *match_str, int count) 6842 { 6843 struct alc_spec *spec = cdc->spec; 6844 int ret; 6845 6846 switch (action) { 6847 case HDA_FIXUP_ACT_PRE_PROBE: 6848 ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid, 6849 match_str, &comp_master_ops); 6850 if (ret) 6851 return; 6852 6853 spec->gen.pcm_playback_hook = comp_generic_playback_hook; 6854 break; 6855 case HDA_FIXUP_ACT_FREE: 6856 hda_component_manager_free(cdc, &comp_master_ops); 6857 break; 6858 } 6859 } 6860 6861 static void cs35lxx_autodet_fixup(struct hda_codec *cdc, 6862 const struct hda_fixup *fix, 6863 int action) 6864 { 6865 struct device *dev = hda_codec_dev(cdc); 6866 struct acpi_device *adev; 6867 struct fwnode_handle *fwnode __free(fwnode_handle) = NULL; 6868 const char *bus = NULL; 6869 static const struct { 6870 const char *hid; 6871 const char *name; 6872 } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" }, 6873 { "CSC3556", "cs35l56-hda" }, 6874 { "CSC3557", "cs35l57-hda" }}; 6875 char *match; 6876 int i, count = 0, count_devindex = 0; 6877 6878 switch (action) { 6879 case HDA_FIXUP_ACT_PRE_PROBE: 6880 for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) { 6881 adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1); 6882 if (adev) 6883 break; 6884 } 6885 if (!adev) { 6886 dev_err(dev, "Failed to find ACPI entry for a Cirrus Amp\n"); 6887 return; 6888 } 6889 6890 count = i2c_acpi_client_count(adev); 6891 if (count > 0) { 6892 bus = "i2c"; 6893 } else { 6894 count = acpi_spi_count_resources(adev); 6895 if (count > 0) 6896 bus = "spi"; 6897 } 6898 6899 fwnode = fwnode_handle_get(acpi_fwnode_handle(adev)); 6900 acpi_dev_put(adev); 6901 6902 if (!bus) { 6903 dev_err(dev, "Did not find any buses for %s\n", acpi_ids[i].hid); 6904 return; 6905 } 6906 6907 if (!fwnode) { 6908 dev_err(dev, "Could not get fwnode for %s\n", acpi_ids[i].hid); 6909 return; 6910 } 6911 6912 /* 6913 * When available the cirrus,dev-index property is an accurate 6914 * count of the amps in a system and is used in preference to 6915 * the count of bus devices that can contain additional address 6916 * alias entries. 6917 */ 6918 count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index"); 6919 if (count_devindex > 0) 6920 count = count_devindex; 6921 6922 match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name); 6923 if (!match) 6924 return; 6925 dev_info(dev, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match); 6926 comp_generic_fixup(cdc, action, bus, acpi_ids[i].hid, match, count); 6927 6928 break; 6929 case HDA_FIXUP_ACT_FREE: 6930 /* 6931 * Pass the action on to comp_generic_fixup() so that 6932 * hda_component_manager functions can be called in just once 6933 * place. In this context the bus, hid, match_str or count 6934 * values do not need to be calculated. 6935 */ 6936 comp_generic_fixup(cdc, action, NULL, NULL, NULL, 0); 6937 break; 6938 } 6939 } 6940 6941 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6942 { 6943 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 6944 } 6945 6946 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6947 { 6948 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 6949 } 6950 6951 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action) 6952 { 6953 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 6954 } 6955 6956 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action) 6957 { 6958 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 6959 } 6960 6961 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 6962 int action) 6963 { 6964 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2); 6965 } 6966 6967 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 6968 int action) 6969 { 6970 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2); 6971 } 6972 6973 static void cs35l56_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6974 { 6975 comp_generic_fixup(cdc, action, "i2c", "CSC3556", "-%s:00-cs35l56-hda.%d", 2); 6976 } 6977 6978 static void cs35l56_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6979 { 6980 comp_generic_fixup(cdc, action, "i2c", "CSC3556", "-%s:00-cs35l56-hda.%d", 4); 6981 } 6982 6983 static void cs35l56_fixup_spi_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6984 { 6985 comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 2); 6986 } 6987 6988 static void cs35l56_fixup_spi_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6989 { 6990 comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 4); 6991 } 6992 6993 static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 6994 { 6995 /* 6996 * The same SSID has been re-used in different hardware, they have 6997 * different codecs and the newer GA403U has a ALC285. 6998 */ 6999 if (cdc->core.vendor_id == 0x10ec0285) 7000 cs35l56_fixup_i2c_two(cdc, fix, action); 7001 else 7002 alc_fixup_inv_dmic(cdc, fix, action); 7003 } 7004 7005 static void tas2781_fixup_i2c(struct hda_codec *cdc, 7006 const struct hda_fixup *fix, int action) 7007 { 7008 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1); 7009 } 7010 7011 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc, 7012 const struct hda_fixup *fix, int action) 7013 { 7014 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1); 7015 } 7016 7017 static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec, 7018 const struct hda_fixup *fix, int action) 7019 { 7020 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 7021 } 7022 7023 7024 /* for alc295_fixup_hp_top_speakers */ 7025 #include "hp_x360_helper.c" 7026 7027 /* for alc285_fixup_ideapad_s740_coef() */ 7028 #include "ideapad_s740_helper.c" 7029 7030 static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = { 7031 WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000), 7032 WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000), 7033 WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089), 7034 {} 7035 }; 7036 7037 static void alc256_fixup_set_coef_defaults(struct hda_codec *codec, 7038 const struct hda_fixup *fix, 7039 int action) 7040 { 7041 /* 7042 * A certain other OS sets these coeffs to different values. On at least 7043 * one TongFang barebone these settings might survive even a cold 7044 * reboot. So to restore a clean slate the values are explicitly reset 7045 * to default here. Without this, the external microphone is always in a 7046 * plugged-in state, while the internal microphone is always in an 7047 * unplugged state, breaking the ability to use the internal microphone. 7048 */ 7049 alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs); 7050 } 7051 7052 static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = { 7053 WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06), 7054 WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074), 7055 WRITE_COEF(0x49, 0x0149), 7056 {} 7057 }; 7058 7059 static void alc233_fixup_no_audio_jack(struct hda_codec *codec, 7060 const struct hda_fixup *fix, 7061 int action) 7062 { 7063 /* 7064 * The audio jack input and output is not detected on the ASRock NUC Box 7065 * 1100 series when cold booting without this fix. Warm rebooting from a 7066 * certain other OS makes the audio functional, as COEF settings are 7067 * preserved in this case. This fix sets these altered COEF values as 7068 * the default. 7069 */ 7070 alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs); 7071 } 7072 7073 static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec, 7074 const struct hda_fixup *fix, 7075 int action) 7076 { 7077 /* 7078 * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, 7079 * but uses the 0x8686 subproduct id in both cases. The ALC256 codec 7080 * needs an additional quirk for sound working after suspend and resume. 7081 */ 7082 if (codec->core.vendor_id == 0x10ec0256) { 7083 alc_update_coef_idx(codec, 0x10, 1<<9, 0); 7084 snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120); 7085 } else { 7086 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); 7087 } 7088 } 7089 7090 static void alc256_decrease_headphone_amp_val(struct hda_codec *codec, 7091 const struct hda_fixup *fix, int action) 7092 { 7093 u32 caps; 7094 u8 nsteps, offs; 7095 7096 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7097 return; 7098 7099 caps = query_amp_caps(codec, 0x3, HDA_OUTPUT); 7100 nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10; 7101 offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10; 7102 caps &= ~AC_AMPCAP_NUM_STEPS & ~AC_AMPCAP_OFFSET; 7103 caps |= (nsteps << AC_AMPCAP_NUM_STEPS_SHIFT) | (offs << AC_AMPCAP_OFFSET_SHIFT); 7104 7105 if (snd_hda_override_amp_caps(codec, 0x3, HDA_OUTPUT, caps)) 7106 codec_warn(codec, "failed to override amp caps for NID 0x3\n"); 7107 } 7108 7109 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec, 7110 const struct hda_fixup *fix, 7111 int action) 7112 { 7113 struct alc_spec *spec = codec->spec; 7114 struct hda_input_mux *imux = &spec->gen.input_mux; 7115 int i; 7116 7117 alc269_fixup_limit_int_mic_boost(codec, fix, action); 7118 7119 switch (action) { 7120 case HDA_FIXUP_ACT_PRE_PROBE: 7121 /** 7122 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic) 7123 * to Hi-Z to avoid pop noises at startup and when plugging and 7124 * unplugging headphones. 7125 */ 7126 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 7127 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ); 7128 break; 7129 case HDA_FIXUP_ACT_PROBE: 7130 /** 7131 * Make the internal mic (0x12) the default input source to 7132 * prevent pop noises on cold boot. 7133 */ 7134 for (i = 0; i < imux->num_items; i++) { 7135 if (spec->gen.imux_pins[i] == 0x12) { 7136 spec->gen.cur_mux[0] = i; 7137 break; 7138 } 7139 } 7140 break; 7141 } 7142 } 7143 7144 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec, 7145 const struct hda_fixup *fix, int action) 7146 { 7147 /* 7148 * The Pin Complex 0x17 for the bass speakers is wrongly reported as 7149 * unconnected. 7150 */ 7151 static const struct hda_pintbl pincfgs[] = { 7152 { 0x17, 0x90170121 }, 7153 { } 7154 }; 7155 /* 7156 * Avoid DAC 0x06 and 0x08, as they have no volume controls. 7157 * DAC 0x02 and 0x03 would be fine. 7158 */ 7159 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7160 /* 7161 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02. 7162 * Headphones (0x21) are connected to DAC 0x03. 7163 */ 7164 static const hda_nid_t preferred_pairs[] = { 7165 0x14, 0x02, 7166 0x17, 0x02, 7167 0x21, 0x03, 7168 0 7169 }; 7170 struct alc_spec *spec = codec->spec; 7171 7172 switch (action) { 7173 case HDA_FIXUP_ACT_PRE_PROBE: 7174 snd_hda_apply_pincfgs(codec, pincfgs); 7175 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7176 spec->gen.preferred_dacs = preferred_pairs; 7177 break; 7178 } 7179 } 7180 7181 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, 7182 const struct hda_fixup *fix, int action) 7183 { 7184 static const struct hda_pintbl pincfgs[] = { 7185 { 0x14, 0x90170151 }, 7186 { 0x17, 0x90170150 }, 7187 { } 7188 }; 7189 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7190 static const hda_nid_t preferred_pairs[] = { 7191 0x14, 0x02, 7192 0x17, 0x03, 7193 0x21, 0x02, 7194 0 7195 }; 7196 struct alc_spec *spec = codec->spec; 7197 7198 alc_fixup_no_shutup(codec, fix, action); 7199 7200 switch (action) { 7201 case HDA_FIXUP_ACT_PRE_PROBE: 7202 snd_hda_apply_pincfgs(codec, pincfgs); 7203 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7204 spec->gen.preferred_dacs = preferred_pairs; 7205 break; 7206 } 7207 } 7208 7209 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */ 7210 static void alc287_fixup_bind_dacs(struct hda_codec *codec, 7211 const struct hda_fixup *fix, int action) 7212 { 7213 struct alc_spec *spec = codec->spec; 7214 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 7215 static const hda_nid_t preferred_pairs[] = { 7216 0x17, 0x02, 0x21, 0x03, 0 7217 }; 7218 7219 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7220 return; 7221 7222 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7223 spec->gen.preferred_dacs = preferred_pairs; 7224 spec->gen.auto_mute_via_amp = 1; 7225 if (spec->gen.autocfg.speaker_pins[0] != 0x14) { 7226 snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 7227 0x0); /* Make sure 0x14 was disable */ 7228 } 7229 } 7230 /* Fix none verb table of Headset Mic pin */ 7231 static void alc_fixup_headset_mic(struct hda_codec *codec, 7232 const struct hda_fixup *fix, int action) 7233 { 7234 struct alc_spec *spec = codec->spec; 7235 static const struct hda_pintbl pincfgs[] = { 7236 { 0x19, 0x03a1103c }, 7237 { } 7238 }; 7239 7240 switch (action) { 7241 case HDA_FIXUP_ACT_PRE_PROBE: 7242 snd_hda_apply_pincfgs(codec, pincfgs); 7243 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 7244 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 7245 break; 7246 } 7247 } 7248 7249 static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec, 7250 const struct hda_fixup *fix, int action) 7251 { 7252 /* 7253 * The Pin Complex 0x14 for the treble speakers is wrongly reported as 7254 * unconnected. 7255 * The Pin Complex 0x17 for the bass speakers has the lowest association 7256 * and sequence values so shift it up a bit to squeeze 0x14 in. 7257 */ 7258 static const struct hda_pintbl pincfgs[] = { 7259 { 0x14, 0x90170110 }, // top/treble 7260 { 0x17, 0x90170111 }, // bottom/bass 7261 { } 7262 }; 7263 7264 /* 7265 * Force DAC 0x02 for the bass speakers 0x17. 7266 */ 7267 static const hda_nid_t conn[] = { 0x02 }; 7268 7269 switch (action) { 7270 case HDA_FIXUP_ACT_PRE_PROBE: 7271 snd_hda_apply_pincfgs(codec, pincfgs); 7272 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7273 break; 7274 } 7275 7276 cs35l41_fixup_i2c_two(codec, fix, action); 7277 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 7278 alc245_fixup_hp_gpio_led(codec, fix, action); 7279 } 7280 7281 /* 7282 * ALC287 PCM hooks 7283 */ 7284 static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, 7285 struct hda_codec *codec, 7286 struct snd_pcm_substream *substream, 7287 int action) 7288 { 7289 alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */ 7290 switch (action) { 7291 case HDA_GEN_PCM_ACT_OPEN: 7292 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */ 7293 break; 7294 case HDA_GEN_PCM_ACT_CLOSE: 7295 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 7296 break; 7297 } 7298 } 7299 7300 static void alc287_s4_power_gpio3_default(struct hda_codec *codec) 7301 { 7302 if (is_s4_suspend(codec)) { 7303 alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */ 7304 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 7305 } 7306 } 7307 7308 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, 7309 const struct hda_fixup *fix, int action) 7310 { 7311 struct alc_spec *spec = codec->spec; 7312 7313 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7314 return; 7315 spec->power_hook = alc287_s4_power_gpio3_default; 7316 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; 7317 } 7318 7319 7320 enum { 7321 ALC269_FIXUP_GPIO2, 7322 ALC269_FIXUP_SONY_VAIO, 7323 ALC275_FIXUP_SONY_VAIO_GPIO2, 7324 ALC269_FIXUP_DELL_M101Z, 7325 ALC269_FIXUP_SKU_IGNORE, 7326 ALC269_FIXUP_ASUS_G73JW, 7327 ALC269_FIXUP_ASUS_N7601ZM_PINS, 7328 ALC269_FIXUP_ASUS_N7601ZM, 7329 ALC269_FIXUP_LENOVO_EAPD, 7330 ALC275_FIXUP_SONY_HWEQ, 7331 ALC275_FIXUP_SONY_DISABLE_AAMIX, 7332 ALC271_FIXUP_DMIC, 7333 ALC269_FIXUP_PCM_44K, 7334 ALC269_FIXUP_STEREO_DMIC, 7335 ALC269_FIXUP_HEADSET_MIC, 7336 ALC269_FIXUP_QUANTA_MUTE, 7337 ALC269_FIXUP_LIFEBOOK, 7338 ALC269_FIXUP_LIFEBOOK_EXTMIC, 7339 ALC269_FIXUP_LIFEBOOK_HP_PIN, 7340 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, 7341 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, 7342 ALC269_FIXUP_AMIC, 7343 ALC269_FIXUP_DMIC, 7344 ALC269VB_FIXUP_AMIC, 7345 ALC269VB_FIXUP_DMIC, 7346 ALC269_FIXUP_HP_MUTE_LED, 7347 ALC269_FIXUP_HP_MUTE_LED_MIC1, 7348 ALC269_FIXUP_HP_MUTE_LED_MIC2, 7349 ALC269_FIXUP_HP_MUTE_LED_MIC3, 7350 ALC269_FIXUP_HP_GPIO_LED, 7351 ALC269_FIXUP_HP_GPIO_MIC1_LED, 7352 ALC269_FIXUP_HP_LINE1_MIC1_LED, 7353 ALC269_FIXUP_INV_DMIC, 7354 ALC269_FIXUP_LENOVO_DOCK, 7355 ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, 7356 ALC269_FIXUP_NO_SHUTUP, 7357 ALC286_FIXUP_SONY_MIC_NO_PRESENCE, 7358 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 7359 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 7360 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 7361 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 7362 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 7363 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 7364 ALC269_FIXUP_HEADSET_MODE, 7365 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 7366 ALC269_FIXUP_ASPIRE_HEADSET_MIC, 7367 ALC269_FIXUP_ASUS_X101_FUNC, 7368 ALC269_FIXUP_ASUS_X101_VERB, 7369 ALC269_FIXUP_ASUS_X101, 7370 ALC271_FIXUP_AMIC_MIC2, 7371 ALC271_FIXUP_HP_GATE_MIC_JACK, 7372 ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, 7373 ALC269_FIXUP_ACER_AC700, 7374 ALC269_FIXUP_LIMIT_INT_MIC_BOOST, 7375 ALC269VB_FIXUP_ASUS_ZENBOOK, 7376 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 7377 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, 7378 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7379 ALC269VB_FIXUP_ORDISSIMO_EVE2, 7380 ALC283_FIXUP_CHROME_BOOK, 7381 ALC283_FIXUP_SENSE_COMBO_JACK, 7382 ALC282_FIXUP_ASUS_TX300, 7383 ALC283_FIXUP_INT_MIC, 7384 ALC290_FIXUP_MONO_SPEAKERS, 7385 ALC290_FIXUP_MONO_SPEAKERS_HSJACK, 7386 ALC290_FIXUP_SUBWOOFER, 7387 ALC290_FIXUP_SUBWOOFER_HSJACK, 7388 ALC269_FIXUP_THINKPAD_ACPI, 7389 ALC269_FIXUP_DMIC_THINKPAD_ACPI, 7390 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO, 7391 ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 7392 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 7393 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 7394 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 7395 ALC255_FIXUP_HEADSET_MODE, 7396 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, 7397 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 7398 ALC292_FIXUP_TPT440_DOCK, 7399 ALC292_FIXUP_TPT440, 7400 ALC283_FIXUP_HEADSET_MIC, 7401 ALC255_FIXUP_MIC_MUTE_LED, 7402 ALC282_FIXUP_ASPIRE_V5_PINS, 7403 ALC269VB_FIXUP_ASPIRE_E1_COEF, 7404 ALC280_FIXUP_HP_GPIO4, 7405 ALC286_FIXUP_HP_GPIO_LED, 7406 ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, 7407 ALC280_FIXUP_HP_DOCK_PINS, 7408 ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, 7409 ALC280_FIXUP_HP_9480M, 7410 ALC245_FIXUP_HP_X360_AMP, 7411 ALC285_FIXUP_HP_SPECTRE_X360_EB1, 7412 ALC285_FIXUP_HP_ENVY_X360, 7413 ALC288_FIXUP_DELL_HEADSET_MODE, 7414 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, 7415 ALC288_FIXUP_DELL_XPS_13, 7416 ALC288_FIXUP_DISABLE_AAMIX, 7417 ALC292_FIXUP_DELL_E7X_AAMIX, 7418 ALC292_FIXUP_DELL_E7X, 7419 ALC292_FIXUP_DISABLE_AAMIX, 7420 ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, 7421 ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, 7422 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 7423 ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, 7424 ALC275_FIXUP_DELL_XPS, 7425 ALC293_FIXUP_LENOVO_SPK_NOISE, 7426 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 7427 ALC255_FIXUP_DELL_SPK_NOISE, 7428 ALC225_FIXUP_DISABLE_MIC_VREF, 7429 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 7430 ALC295_FIXUP_DISABLE_DAC3, 7431 ALC285_FIXUP_SPEAKER2_TO_DAC1, 7432 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1, 7433 ALC285_FIXUP_ASUS_HEADSET_MIC, 7434 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS, 7435 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1, 7436 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC, 7437 ALC280_FIXUP_HP_HEADSET_MIC, 7438 ALC221_FIXUP_HP_FRONT_MIC, 7439 ALC292_FIXUP_TPT460, 7440 ALC298_FIXUP_SPK_VOLUME, 7441 ALC298_FIXUP_LENOVO_SPK_VOLUME, 7442 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, 7443 ALC269_FIXUP_ATIV_BOOK_8, 7444 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE, 7445 ALC221_FIXUP_HP_MIC_NO_PRESENCE, 7446 ALC256_FIXUP_ASUS_HEADSET_MODE, 7447 ALC256_FIXUP_ASUS_MIC, 7448 ALC256_FIXUP_ASUS_AIO_GPIO2, 7449 ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, 7450 ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, 7451 ALC233_FIXUP_LENOVO_MULTI_CODECS, 7452 ALC233_FIXUP_ACER_HEADSET_MIC, 7453 ALC294_FIXUP_LENOVO_MIC_LOCATION, 7454 ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, 7455 ALC225_FIXUP_S3_POP_NOISE, 7456 ALC700_FIXUP_INTEL_REFERENCE, 7457 ALC274_FIXUP_DELL_BIND_DACS, 7458 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 7459 ALC298_FIXUP_TPT470_DOCK_FIX, 7460 ALC298_FIXUP_TPT470_DOCK, 7461 ALC255_FIXUP_DUMMY_LINEOUT_VERB, 7462 ALC255_FIXUP_DELL_HEADSET_MIC, 7463 ALC256_FIXUP_HUAWEI_MACH_WX9_PINS, 7464 ALC298_FIXUP_HUAWEI_MBX_STEREO, 7465 ALC295_FIXUP_HP_X360, 7466 ALC221_FIXUP_HP_HEADSET_MIC, 7467 ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, 7468 ALC295_FIXUP_HP_AUTO_MUTE, 7469 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 7470 ALC294_FIXUP_ASUS_MIC, 7471 ALC294_FIXUP_ASUS_HEADSET_MIC, 7472 ALC294_FIXUP_ASUS_SPK, 7473 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 7474 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 7475 ALC255_FIXUP_ACER_HEADSET_MIC, 7476 ALC295_FIXUP_CHROME_BOOK, 7477 ALC225_FIXUP_HEADSET_JACK, 7478 ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE, 7479 ALC225_FIXUP_WYSE_AUTO_MUTE, 7480 ALC225_FIXUP_WYSE_DISABLE_MIC_VREF, 7481 ALC286_FIXUP_ACER_AIO_HEADSET_MIC, 7482 ALC256_FIXUP_ASUS_HEADSET_MIC, 7483 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 7484 ALC299_FIXUP_PREDATOR_SPK, 7485 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, 7486 ALC289_FIXUP_DELL_SPK1, 7487 ALC289_FIXUP_DELL_SPK2, 7488 ALC289_FIXUP_DUAL_SPK, 7489 ALC289_FIXUP_RTK_AMP_DUAL_SPK, 7490 ALC294_FIXUP_SPK2_TO_DAC1, 7491 ALC294_FIXUP_ASUS_DUAL_SPK, 7492 ALC285_FIXUP_THINKPAD_X1_GEN7, 7493 ALC285_FIXUP_THINKPAD_HEADSET_JACK, 7494 ALC294_FIXUP_ASUS_ALLY, 7495 ALC294_FIXUP_ASUS_ALLY_PINS, 7496 ALC294_FIXUP_ASUS_ALLY_VERBS, 7497 ALC294_FIXUP_ASUS_ALLY_SPEAKER, 7498 ALC294_FIXUP_ASUS_HPE, 7499 ALC294_FIXUP_ASUS_COEF_1B, 7500 ALC294_FIXUP_ASUS_GX502_HP, 7501 ALC294_FIXUP_ASUS_GX502_PINS, 7502 ALC294_FIXUP_ASUS_GX502_VERBS, 7503 ALC294_FIXUP_ASUS_GU502_HP, 7504 ALC294_FIXUP_ASUS_GU502_PINS, 7505 ALC294_FIXUP_ASUS_GU502_VERBS, 7506 ALC294_FIXUP_ASUS_G513_PINS, 7507 ALC285_FIXUP_ASUS_G533Z_PINS, 7508 ALC285_FIXUP_HP_GPIO_LED, 7509 ALC285_FIXUP_HP_MUTE_LED, 7510 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, 7511 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2, 7512 ALC236_FIXUP_HP_GPIO_LED, 7513 ALC236_FIXUP_HP_MUTE_LED, 7514 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 7515 ALC298_FIXUP_SAMSUNG_AMP, 7516 ALC298_FIXUP_SAMSUNG_AMP2, 7517 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 7518 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 7519 ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 7520 ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS, 7521 ALC269VC_FIXUP_ACER_HEADSET_MIC, 7522 ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, 7523 ALC289_FIXUP_ASUS_GA401, 7524 ALC289_FIXUP_ASUS_GA502, 7525 ALC256_FIXUP_ACER_MIC_NO_PRESENCE, 7526 ALC285_FIXUP_HP_GPIO_AMP_INIT, 7527 ALC269_FIXUP_CZC_B20, 7528 ALC269_FIXUP_CZC_TMI, 7529 ALC269_FIXUP_CZC_L101, 7530 ALC269_FIXUP_LEMOTE_A1802, 7531 ALC269_FIXUP_LEMOTE_A190X, 7532 ALC256_FIXUP_INTEL_NUC8_RUGGED, 7533 ALC233_FIXUP_INTEL_NUC8_DMIC, 7534 ALC233_FIXUP_INTEL_NUC8_BOOST, 7535 ALC256_FIXUP_INTEL_NUC10, 7536 ALC255_FIXUP_XIAOMI_HEADSET_MIC, 7537 ALC274_FIXUP_HP_MIC, 7538 ALC274_FIXUP_HP_HEADSET_MIC, 7539 ALC274_FIXUP_HP_ENVY_GPIO, 7540 ALC256_FIXUP_ASUS_HPE, 7541 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 7542 ALC287_FIXUP_HP_GPIO_LED, 7543 ALC256_FIXUP_HP_HEADSET_MIC, 7544 ALC245_FIXUP_HP_GPIO_LED, 7545 ALC236_FIXUP_DELL_AIO_HEADSET_MIC, 7546 ALC282_FIXUP_ACER_DISABLE_LINEOUT, 7547 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, 7548 ALC256_FIXUP_ACER_HEADSET_MIC, 7549 ALC285_FIXUP_IDEAPAD_S740_COEF, 7550 ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST, 7551 ALC295_FIXUP_ASUS_DACS, 7552 ALC295_FIXUP_HP_OMEN, 7553 ALC285_FIXUP_HP_SPECTRE_X360, 7554 ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, 7555 ALC623_FIXUP_LENOVO_THINKSTATION_P340, 7556 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, 7557 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST, 7558 ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS, 7559 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 7560 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 7561 ALC298_FIXUP_LENOVO_C940_DUET7, 7562 ALC287_FIXUP_LENOVO_14IRP8_DUETITL, 7563 ALC287_FIXUP_LENOVO_LEGION_7, 7564 ALC287_FIXUP_13S_GEN2_SPEAKERS, 7565 ALC256_FIXUP_SET_COEF_DEFAULTS, 7566 ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 7567 ALC233_FIXUP_NO_AUDIO_JACK, 7568 ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME, 7569 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, 7570 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 7571 ALC287_FIXUP_LEGION_16ACHG6, 7572 ALC287_FIXUP_CS35L41_I2C_2, 7573 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED, 7574 ALC287_FIXUP_CS35L41_I2C_4, 7575 ALC245_FIXUP_CS35L41_SPI_2, 7576 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED, 7577 ALC245_FIXUP_CS35L41_SPI_4, 7578 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED, 7579 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, 7580 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE, 7581 ALC287_FIXUP_LEGION_16ITHG6, 7582 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 7583 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, 7584 ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN, 7585 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, 7586 ALC236_FIXUP_DELL_DUAL_CODECS, 7587 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 7588 ALC287_FIXUP_TAS2781_I2C, 7589 ALC287_FIXUP_YOGA7_14ARB7_I2C, 7590 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 7591 ALC245_FIXUP_HP_X360_MUTE_LEDS, 7592 ALC287_FIXUP_THINKPAD_I2S_SPK, 7593 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, 7594 ALC2XX_FIXUP_HEADSET_MIC, 7595 ALC289_FIXUP_DELL_CS35L41_SPI_2, 7596 ALC294_FIXUP_CS35L41_I2C_2, 7597 ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED, 7598 ALC256_FIXUP_ACER_SFG16_MICMUTE_LED, 7599 ALC256_FIXUP_HEADPHONE_AMP_VOL, 7600 ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX, 7601 ALC285_FIXUP_CS35L56_SPI_2, 7602 ALC285_FIXUP_CS35L56_I2C_2, 7603 ALC285_FIXUP_CS35L56_I2C_4, 7604 ALC285_FIXUP_ASUS_GA403U, 7605 ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC, 7606 ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1, 7607 ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 7608 ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1, 7609 ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318, 7610 ALC256_FIXUP_CHROME_BOOK, 7611 ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7, 7612 ALC287_FIXUP_LENOVO_SSID_17AA3820, 7613 ALCXXX_FIXUP_CS35LXX, 7614 }; 7615 7616 /* A special fixup for Lenovo C940 and Yoga Duet 7; 7617 * both have the very same PCI SSID, and we need to apply different fixups 7618 * depending on the codec ID 7619 */ 7620 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec, 7621 const struct hda_fixup *fix, 7622 int action) 7623 { 7624 int id; 7625 7626 if (codec->core.vendor_id == 0x10ec0298) 7627 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */ 7628 else 7629 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */ 7630 __snd_hda_apply_fixup(codec, id, action, 0); 7631 } 7632 7633 /* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021; 7634 * 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID, 7635 * so we need to apply a different fixup in this case. The only DuetITL codec 7636 * SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be 7637 * and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would 7638 * have matched correctly by their codecs. 7639 */ 7640 static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec, 7641 const struct hda_fixup *fix, 7642 int action) 7643 { 7644 int id; 7645 7646 if (codec->core.subsystem_id == 0x17aa3802) 7647 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */ 7648 else 7649 id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */ 7650 __snd_hda_apply_fixup(codec, id, action, 0); 7651 } 7652 7653 /* Similar to above the Lenovo Yoga Pro 7 14ARP8 PCI SSID matches the codec SSID of the 7654 Legion Y9000X 2022 IAH7.*/ 7655 static void alc287_fixup_lenovo_14arp8_legion_iah7(struct hda_codec *codec, 7656 const struct hda_fixup *fix, 7657 int action) 7658 { 7659 int id; 7660 7661 if (codec->core.subsystem_id == 0x17aa386e) 7662 id = ALC287_FIXUP_CS35L41_I2C_2; /* Legion Y9000X 2022 IAH7 */ 7663 else 7664 id = ALC285_FIXUP_SPEAKER2_TO_DAC1; /* Yoga Pro 7 14ARP8 */ 7665 __snd_hda_apply_fixup(codec, id, action, 0); 7666 } 7667 7668 /* Another hilarious PCI SSID conflict with Lenovo Legion Pro 7 16ARX8H (with 7669 * TAS2781 codec) and Legion 7i 16IAX7 (with CS35L41 codec); 7670 * we apply a corresponding fixup depending on the codec SSID instead 7671 */ 7672 static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec, 7673 const struct hda_fixup *fix, 7674 int action) 7675 { 7676 int id; 7677 7678 if (codec->core.subsystem_id == 0x17aa38a8) 7679 id = ALC287_FIXUP_TAS2781_I2C; /* Legion Pro 7 16ARX8H */ 7680 else 7681 id = ALC287_FIXUP_CS35L41_I2C_2; /* Legion 7i 16IAX7 */ 7682 __snd_hda_apply_fixup(codec, id, action, 0); 7683 } 7684 7685 /* Yet more conflicting PCI SSID (17aa:3820) on two Lenovo models */ 7686 static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec, 7687 const struct hda_fixup *fix, 7688 int action) 7689 { 7690 int id; 7691 7692 if (codec->core.subsystem_id == 0x17aa3820) 7693 id = ALC269_FIXUP_ASPIRE_HEADSET_MIC; /* IdeaPad 330-17IKB 81DM */ 7694 else /* 0x17aa3802 */ 7695 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* "Yoga Duet 7 13ITL6 */ 7696 __snd_hda_apply_fixup(codec, id, action, 0); 7697 } 7698 7699 static const struct hda_fixup alc269_fixups[] = { 7700 [ALC269_FIXUP_GPIO2] = { 7701 .type = HDA_FIXUP_FUNC, 7702 .v.func = alc_fixup_gpio2, 7703 }, 7704 [ALC269_FIXUP_SONY_VAIO] = { 7705 .type = HDA_FIXUP_PINCTLS, 7706 .v.pins = (const struct hda_pintbl[]) { 7707 {0x19, PIN_VREFGRD}, 7708 {} 7709 } 7710 }, 7711 [ALC275_FIXUP_SONY_VAIO_GPIO2] = { 7712 .type = HDA_FIXUP_FUNC, 7713 .v.func = alc275_fixup_gpio4_off, 7714 .chained = true, 7715 .chain_id = ALC269_FIXUP_SONY_VAIO 7716 }, 7717 [ALC269_FIXUP_DELL_M101Z] = { 7718 .type = HDA_FIXUP_VERBS, 7719 .v.verbs = (const struct hda_verb[]) { 7720 /* Enables internal speaker */ 7721 {0x20, AC_VERB_SET_COEF_INDEX, 13}, 7722 {0x20, AC_VERB_SET_PROC_COEF, 0x4040}, 7723 {} 7724 } 7725 }, 7726 [ALC269_FIXUP_SKU_IGNORE] = { 7727 .type = HDA_FIXUP_FUNC, 7728 .v.func = alc_fixup_sku_ignore, 7729 }, 7730 [ALC269_FIXUP_ASUS_G73JW] = { 7731 .type = HDA_FIXUP_PINS, 7732 .v.pins = (const struct hda_pintbl[]) { 7733 { 0x17, 0x99130111 }, /* subwoofer */ 7734 { } 7735 } 7736 }, 7737 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = { 7738 .type = HDA_FIXUP_PINS, 7739 .v.pins = (const struct hda_pintbl[]) { 7740 { 0x19, 0x03A11050 }, 7741 { 0x1a, 0x03A11C30 }, 7742 { 0x21, 0x03211420 }, 7743 { } 7744 } 7745 }, 7746 [ALC269_FIXUP_ASUS_N7601ZM] = { 7747 .type = HDA_FIXUP_VERBS, 7748 .v.verbs = (const struct hda_verb[]) { 7749 {0x20, AC_VERB_SET_COEF_INDEX, 0x62}, 7750 {0x20, AC_VERB_SET_PROC_COEF, 0xa007}, 7751 {0x20, AC_VERB_SET_COEF_INDEX, 0x10}, 7752 {0x20, AC_VERB_SET_PROC_COEF, 0x8420}, 7753 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f}, 7754 {0x20, AC_VERB_SET_PROC_COEF, 0x7774}, 7755 { } 7756 }, 7757 .chained = true, 7758 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS, 7759 }, 7760 [ALC269_FIXUP_LENOVO_EAPD] = { 7761 .type = HDA_FIXUP_VERBS, 7762 .v.verbs = (const struct hda_verb[]) { 7763 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, 7764 {} 7765 } 7766 }, 7767 [ALC275_FIXUP_SONY_HWEQ] = { 7768 .type = HDA_FIXUP_FUNC, 7769 .v.func = alc269_fixup_hweq, 7770 .chained = true, 7771 .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 7772 }, 7773 [ALC275_FIXUP_SONY_DISABLE_AAMIX] = { 7774 .type = HDA_FIXUP_FUNC, 7775 .v.func = alc_fixup_disable_aamix, 7776 .chained = true, 7777 .chain_id = ALC269_FIXUP_SONY_VAIO 7778 }, 7779 [ALC271_FIXUP_DMIC] = { 7780 .type = HDA_FIXUP_FUNC, 7781 .v.func = alc271_fixup_dmic, 7782 }, 7783 [ALC269_FIXUP_PCM_44K] = { 7784 .type = HDA_FIXUP_FUNC, 7785 .v.func = alc269_fixup_pcm_44k, 7786 .chained = true, 7787 .chain_id = ALC269_FIXUP_QUANTA_MUTE 7788 }, 7789 [ALC269_FIXUP_STEREO_DMIC] = { 7790 .type = HDA_FIXUP_FUNC, 7791 .v.func = alc269_fixup_stereo_dmic, 7792 }, 7793 [ALC269_FIXUP_HEADSET_MIC] = { 7794 .type = HDA_FIXUP_FUNC, 7795 .v.func = alc269_fixup_headset_mic, 7796 }, 7797 [ALC269_FIXUP_QUANTA_MUTE] = { 7798 .type = HDA_FIXUP_FUNC, 7799 .v.func = alc269_fixup_quanta_mute, 7800 }, 7801 [ALC269_FIXUP_LIFEBOOK] = { 7802 .type = HDA_FIXUP_PINS, 7803 .v.pins = (const struct hda_pintbl[]) { 7804 { 0x1a, 0x2101103f }, /* dock line-out */ 7805 { 0x1b, 0x23a11040 }, /* dock mic-in */ 7806 { } 7807 }, 7808 .chained = true, 7809 .chain_id = ALC269_FIXUP_QUANTA_MUTE 7810 }, 7811 [ALC269_FIXUP_LIFEBOOK_EXTMIC] = { 7812 .type = HDA_FIXUP_PINS, 7813 .v.pins = (const struct hda_pintbl[]) { 7814 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */ 7815 { } 7816 }, 7817 }, 7818 [ALC269_FIXUP_LIFEBOOK_HP_PIN] = { 7819 .type = HDA_FIXUP_PINS, 7820 .v.pins = (const struct hda_pintbl[]) { 7821 { 0x21, 0x0221102f }, /* HP out */ 7822 { } 7823 }, 7824 }, 7825 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = { 7826 .type = HDA_FIXUP_FUNC, 7827 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 7828 }, 7829 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = { 7830 .type = HDA_FIXUP_FUNC, 7831 .v.func = alc269_fixup_pincfg_U7x7_headset_mic, 7832 }, 7833 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { 7834 .type = HDA_FIXUP_PINS, 7835 .v.pins = (const struct hda_pintbl[]) { 7836 { 0x18, 0x03a19020 }, /* headset mic */ 7837 { 0x1b, 0x90170150 }, /* speaker */ 7838 { } 7839 }, 7840 }, 7841 [ALC269_FIXUP_AMIC] = { 7842 .type = HDA_FIXUP_PINS, 7843 .v.pins = (const struct hda_pintbl[]) { 7844 { 0x14, 0x99130110 }, /* speaker */ 7845 { 0x15, 0x0121401f }, /* HP out */ 7846 { 0x18, 0x01a19c20 }, /* mic */ 7847 { 0x19, 0x99a3092f }, /* int-mic */ 7848 { } 7849 }, 7850 }, 7851 [ALC269_FIXUP_DMIC] = { 7852 .type = HDA_FIXUP_PINS, 7853 .v.pins = (const struct hda_pintbl[]) { 7854 { 0x12, 0x99a3092f }, /* int-mic */ 7855 { 0x14, 0x99130110 }, /* speaker */ 7856 { 0x15, 0x0121401f }, /* HP out */ 7857 { 0x18, 0x01a19c20 }, /* mic */ 7858 { } 7859 }, 7860 }, 7861 [ALC269VB_FIXUP_AMIC] = { 7862 .type = HDA_FIXUP_PINS, 7863 .v.pins = (const struct hda_pintbl[]) { 7864 { 0x14, 0x99130110 }, /* speaker */ 7865 { 0x18, 0x01a19c20 }, /* mic */ 7866 { 0x19, 0x99a3092f }, /* int-mic */ 7867 { 0x21, 0x0121401f }, /* HP out */ 7868 { } 7869 }, 7870 }, 7871 [ALC269VB_FIXUP_DMIC] = { 7872 .type = HDA_FIXUP_PINS, 7873 .v.pins = (const struct hda_pintbl[]) { 7874 { 0x12, 0x99a3092f }, /* int-mic */ 7875 { 0x14, 0x99130110 }, /* speaker */ 7876 { 0x18, 0x01a19c20 }, /* mic */ 7877 { 0x21, 0x0121401f }, /* HP out */ 7878 { } 7879 }, 7880 }, 7881 [ALC269_FIXUP_HP_MUTE_LED] = { 7882 .type = HDA_FIXUP_FUNC, 7883 .v.func = alc269_fixup_hp_mute_led, 7884 }, 7885 [ALC269_FIXUP_HP_MUTE_LED_MIC1] = { 7886 .type = HDA_FIXUP_FUNC, 7887 .v.func = alc269_fixup_hp_mute_led_mic1, 7888 }, 7889 [ALC269_FIXUP_HP_MUTE_LED_MIC2] = { 7890 .type = HDA_FIXUP_FUNC, 7891 .v.func = alc269_fixup_hp_mute_led_mic2, 7892 }, 7893 [ALC269_FIXUP_HP_MUTE_LED_MIC3] = { 7894 .type = HDA_FIXUP_FUNC, 7895 .v.func = alc269_fixup_hp_mute_led_mic3, 7896 .chained = true, 7897 .chain_id = ALC295_FIXUP_HP_AUTO_MUTE 7898 }, 7899 [ALC269_FIXUP_HP_GPIO_LED] = { 7900 .type = HDA_FIXUP_FUNC, 7901 .v.func = alc269_fixup_hp_gpio_led, 7902 }, 7903 [ALC269_FIXUP_HP_GPIO_MIC1_LED] = { 7904 .type = HDA_FIXUP_FUNC, 7905 .v.func = alc269_fixup_hp_gpio_mic1_led, 7906 }, 7907 [ALC269_FIXUP_HP_LINE1_MIC1_LED] = { 7908 .type = HDA_FIXUP_FUNC, 7909 .v.func = alc269_fixup_hp_line1_mic1_led, 7910 }, 7911 [ALC269_FIXUP_INV_DMIC] = { 7912 .type = HDA_FIXUP_FUNC, 7913 .v.func = alc_fixup_inv_dmic, 7914 }, 7915 [ALC269_FIXUP_NO_SHUTUP] = { 7916 .type = HDA_FIXUP_FUNC, 7917 .v.func = alc_fixup_no_shutup, 7918 }, 7919 [ALC269_FIXUP_LENOVO_DOCK] = { 7920 .type = HDA_FIXUP_PINS, 7921 .v.pins = (const struct hda_pintbl[]) { 7922 { 0x19, 0x23a11040 }, /* dock mic */ 7923 { 0x1b, 0x2121103f }, /* dock headphone */ 7924 { } 7925 }, 7926 .chained = true, 7927 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT 7928 }, 7929 [ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST] = { 7930 .type = HDA_FIXUP_FUNC, 7931 .v.func = alc269_fixup_limit_int_mic_boost, 7932 .chained = true, 7933 .chain_id = ALC269_FIXUP_LENOVO_DOCK, 7934 }, 7935 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { 7936 .type = HDA_FIXUP_FUNC, 7937 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 7938 .chained = true, 7939 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 7940 }, 7941 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { 7942 .type = HDA_FIXUP_PINS, 7943 .v.pins = (const struct hda_pintbl[]) { 7944 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 7945 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 7946 { } 7947 }, 7948 .chained = true, 7949 .chain_id = ALC269_FIXUP_HEADSET_MODE 7950 }, 7951 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = { 7952 .type = HDA_FIXUP_PINS, 7953 .v.pins = (const struct hda_pintbl[]) { 7954 { 0x16, 0x21014020 }, /* dock line out */ 7955 { 0x19, 0x21a19030 }, /* dock mic */ 7956 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 7957 { } 7958 }, 7959 .chained = true, 7960 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 7961 }, 7962 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = { 7963 .type = HDA_FIXUP_PINS, 7964 .v.pins = (const struct hda_pintbl[]) { 7965 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 7966 { } 7967 }, 7968 .chained = true, 7969 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 7970 }, 7971 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = { 7972 .type = HDA_FIXUP_PINS, 7973 .v.pins = (const struct hda_pintbl[]) { 7974 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 7975 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 7976 { } 7977 }, 7978 .chained = true, 7979 .chain_id = ALC269_FIXUP_HEADSET_MODE 7980 }, 7981 [ALC269_FIXUP_HEADSET_MODE] = { 7982 .type = HDA_FIXUP_FUNC, 7983 .v.func = alc_fixup_headset_mode, 7984 .chained = true, 7985 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 7986 }, 7987 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 7988 .type = HDA_FIXUP_FUNC, 7989 .v.func = alc_fixup_headset_mode_no_hp_mic, 7990 }, 7991 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = { 7992 .type = HDA_FIXUP_PINS, 7993 .v.pins = (const struct hda_pintbl[]) { 7994 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */ 7995 { } 7996 }, 7997 .chained = true, 7998 .chain_id = ALC269_FIXUP_HEADSET_MODE, 7999 }, 8000 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = { 8001 .type = HDA_FIXUP_PINS, 8002 .v.pins = (const struct hda_pintbl[]) { 8003 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8004 { } 8005 }, 8006 .chained = true, 8007 .chain_id = ALC269_FIXUP_HEADSET_MIC 8008 }, 8009 [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = { 8010 .type = HDA_FIXUP_PINS, 8011 .v.pins = (const struct hda_pintbl[]) { 8012 {0x12, 0x90a60130}, 8013 {0x13, 0x40000000}, 8014 {0x14, 0x90170110}, 8015 {0x18, 0x411111f0}, 8016 {0x19, 0x04a11040}, 8017 {0x1a, 0x411111f0}, 8018 {0x1b, 0x90170112}, 8019 {0x1d, 0x40759a05}, 8020 {0x1e, 0x411111f0}, 8021 {0x21, 0x04211020}, 8022 { } 8023 }, 8024 .chained = true, 8025 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8026 }, 8027 [ALC298_FIXUP_HUAWEI_MBX_STEREO] = { 8028 .type = HDA_FIXUP_FUNC, 8029 .v.func = alc298_fixup_huawei_mbx_stereo, 8030 .chained = true, 8031 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8032 }, 8033 [ALC269_FIXUP_ASUS_X101_FUNC] = { 8034 .type = HDA_FIXUP_FUNC, 8035 .v.func = alc269_fixup_x101_headset_mic, 8036 }, 8037 [ALC269_FIXUP_ASUS_X101_VERB] = { 8038 .type = HDA_FIXUP_VERBS, 8039 .v.verbs = (const struct hda_verb[]) { 8040 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 8041 {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, 8042 {0x20, AC_VERB_SET_PROC_COEF, 0x0310}, 8043 { } 8044 }, 8045 .chained = true, 8046 .chain_id = ALC269_FIXUP_ASUS_X101_FUNC 8047 }, 8048 [ALC269_FIXUP_ASUS_X101] = { 8049 .type = HDA_FIXUP_PINS, 8050 .v.pins = (const struct hda_pintbl[]) { 8051 { 0x18, 0x04a1182c }, /* Headset mic */ 8052 { } 8053 }, 8054 .chained = true, 8055 .chain_id = ALC269_FIXUP_ASUS_X101_VERB 8056 }, 8057 [ALC271_FIXUP_AMIC_MIC2] = { 8058 .type = HDA_FIXUP_PINS, 8059 .v.pins = (const struct hda_pintbl[]) { 8060 { 0x14, 0x99130110 }, /* speaker */ 8061 { 0x19, 0x01a19c20 }, /* mic */ 8062 { 0x1b, 0x99a7012f }, /* int-mic */ 8063 { 0x21, 0x0121401f }, /* HP out */ 8064 { } 8065 }, 8066 }, 8067 [ALC271_FIXUP_HP_GATE_MIC_JACK] = { 8068 .type = HDA_FIXUP_FUNC, 8069 .v.func = alc271_hp_gate_mic_jack, 8070 .chained = true, 8071 .chain_id = ALC271_FIXUP_AMIC_MIC2, 8072 }, 8073 [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = { 8074 .type = HDA_FIXUP_FUNC, 8075 .v.func = alc269_fixup_limit_int_mic_boost, 8076 .chained = true, 8077 .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK, 8078 }, 8079 [ALC269_FIXUP_ACER_AC700] = { 8080 .type = HDA_FIXUP_PINS, 8081 .v.pins = (const struct hda_pintbl[]) { 8082 { 0x12, 0x99a3092f }, /* int-mic */ 8083 { 0x14, 0x99130110 }, /* speaker */ 8084 { 0x18, 0x03a11c20 }, /* mic */ 8085 { 0x1e, 0x0346101e }, /* SPDIF1 */ 8086 { 0x21, 0x0321101f }, /* HP out */ 8087 { } 8088 }, 8089 .chained = true, 8090 .chain_id = ALC271_FIXUP_DMIC, 8091 }, 8092 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = { 8093 .type = HDA_FIXUP_FUNC, 8094 .v.func = alc269_fixup_limit_int_mic_boost, 8095 .chained = true, 8096 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8097 }, 8098 [ALC269VB_FIXUP_ASUS_ZENBOOK] = { 8099 .type = HDA_FIXUP_FUNC, 8100 .v.func = alc269_fixup_limit_int_mic_boost, 8101 .chained = true, 8102 .chain_id = ALC269VB_FIXUP_DMIC, 8103 }, 8104 [ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A] = { 8105 .type = HDA_FIXUP_VERBS, 8106 .v.verbs = (const struct hda_verb[]) { 8107 /* class-D output amp +5dB */ 8108 { 0x20, AC_VERB_SET_COEF_INDEX, 0x12 }, 8109 { 0x20, AC_VERB_SET_PROC_COEF, 0x2800 }, 8110 {} 8111 }, 8112 .chained = true, 8113 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8114 }, 8115 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8116 .type = HDA_FIXUP_PINS, 8117 .v.pins = (const struct hda_pintbl[]) { 8118 { 0x18, 0x01a110f0 }, /* use as headset mic */ 8119 { } 8120 }, 8121 .chained = true, 8122 .chain_id = ALC269_FIXUP_HEADSET_MIC 8123 }, 8124 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8125 .type = HDA_FIXUP_FUNC, 8126 .v.func = alc269_fixup_limit_int_mic_boost, 8127 .chained = true, 8128 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1, 8129 }, 8130 [ALC269VB_FIXUP_ORDISSIMO_EVE2] = { 8131 .type = HDA_FIXUP_PINS, 8132 .v.pins = (const struct hda_pintbl[]) { 8133 { 0x12, 0x99a3092f }, /* int-mic */ 8134 { 0x18, 0x03a11d20 }, /* mic */ 8135 { 0x19, 0x411111f0 }, /* Unused bogus pin */ 8136 { } 8137 }, 8138 }, 8139 [ALC283_FIXUP_CHROME_BOOK] = { 8140 .type = HDA_FIXUP_FUNC, 8141 .v.func = alc283_fixup_chromebook, 8142 }, 8143 [ALC283_FIXUP_SENSE_COMBO_JACK] = { 8144 .type = HDA_FIXUP_FUNC, 8145 .v.func = alc283_fixup_sense_combo_jack, 8146 .chained = true, 8147 .chain_id = ALC283_FIXUP_CHROME_BOOK, 8148 }, 8149 [ALC282_FIXUP_ASUS_TX300] = { 8150 .type = HDA_FIXUP_FUNC, 8151 .v.func = alc282_fixup_asus_tx300, 8152 }, 8153 [ALC283_FIXUP_INT_MIC] = { 8154 .type = HDA_FIXUP_VERBS, 8155 .v.verbs = (const struct hda_verb[]) { 8156 {0x20, AC_VERB_SET_COEF_INDEX, 0x1a}, 8157 {0x20, AC_VERB_SET_PROC_COEF, 0x0011}, 8158 { } 8159 }, 8160 .chained = true, 8161 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8162 }, 8163 [ALC290_FIXUP_SUBWOOFER_HSJACK] = { 8164 .type = HDA_FIXUP_PINS, 8165 .v.pins = (const struct hda_pintbl[]) { 8166 { 0x17, 0x90170112 }, /* subwoofer */ 8167 { } 8168 }, 8169 .chained = true, 8170 .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, 8171 }, 8172 [ALC290_FIXUP_SUBWOOFER] = { 8173 .type = HDA_FIXUP_PINS, 8174 .v.pins = (const struct hda_pintbl[]) { 8175 { 0x17, 0x90170112 }, /* subwoofer */ 8176 { } 8177 }, 8178 .chained = true, 8179 .chain_id = ALC290_FIXUP_MONO_SPEAKERS, 8180 }, 8181 [ALC290_FIXUP_MONO_SPEAKERS] = { 8182 .type = HDA_FIXUP_FUNC, 8183 .v.func = alc290_fixup_mono_speakers, 8184 }, 8185 [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = { 8186 .type = HDA_FIXUP_FUNC, 8187 .v.func = alc290_fixup_mono_speakers, 8188 .chained = true, 8189 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 8190 }, 8191 [ALC269_FIXUP_THINKPAD_ACPI] = { 8192 .type = HDA_FIXUP_FUNC, 8193 .v.func = alc_fixup_thinkpad_acpi, 8194 .chained = true, 8195 .chain_id = ALC269_FIXUP_SKU_IGNORE, 8196 }, 8197 [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = { 8198 .type = HDA_FIXUP_FUNC, 8199 .v.func = alc_fixup_inv_dmic, 8200 .chained = true, 8201 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8202 }, 8203 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = { 8204 .type = HDA_FIXUP_PINS, 8205 .v.pins = (const struct hda_pintbl[]) { 8206 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8207 { } 8208 }, 8209 .chained = true, 8210 .chain_id = ALC255_FIXUP_HEADSET_MODE 8211 }, 8212 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8213 .type = HDA_FIXUP_PINS, 8214 .v.pins = (const struct hda_pintbl[]) { 8215 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8216 { } 8217 }, 8218 .chained = true, 8219 .chain_id = ALC255_FIXUP_HEADSET_MODE 8220 }, 8221 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8222 .type = HDA_FIXUP_PINS, 8223 .v.pins = (const struct hda_pintbl[]) { 8224 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8225 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8226 { } 8227 }, 8228 .chained = true, 8229 .chain_id = ALC255_FIXUP_HEADSET_MODE 8230 }, 8231 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = { 8232 .type = HDA_FIXUP_PINS, 8233 .v.pins = (const struct hda_pintbl[]) { 8234 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8235 { } 8236 }, 8237 .chained = true, 8238 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC 8239 }, 8240 [ALC255_FIXUP_HEADSET_MODE] = { 8241 .type = HDA_FIXUP_FUNC, 8242 .v.func = alc_fixup_headset_mode_alc255, 8243 .chained = true, 8244 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8245 }, 8246 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 8247 .type = HDA_FIXUP_FUNC, 8248 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic, 8249 }, 8250 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8251 .type = HDA_FIXUP_PINS, 8252 .v.pins = (const struct hda_pintbl[]) { 8253 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8254 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8255 { } 8256 }, 8257 .chained = true, 8258 .chain_id = ALC269_FIXUP_HEADSET_MODE 8259 }, 8260 [ALC292_FIXUP_TPT440_DOCK] = { 8261 .type = HDA_FIXUP_FUNC, 8262 .v.func = alc_fixup_tpt440_dock, 8263 .chained = true, 8264 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8265 }, 8266 [ALC292_FIXUP_TPT440] = { 8267 .type = HDA_FIXUP_FUNC, 8268 .v.func = alc_fixup_disable_aamix, 8269 .chained = true, 8270 .chain_id = ALC292_FIXUP_TPT440_DOCK, 8271 }, 8272 [ALC283_FIXUP_HEADSET_MIC] = { 8273 .type = HDA_FIXUP_PINS, 8274 .v.pins = (const struct hda_pintbl[]) { 8275 { 0x19, 0x04a110f0 }, 8276 { }, 8277 }, 8278 }, 8279 [ALC255_FIXUP_MIC_MUTE_LED] = { 8280 .type = HDA_FIXUP_FUNC, 8281 .v.func = alc_fixup_micmute_led, 8282 }, 8283 [ALC282_FIXUP_ASPIRE_V5_PINS] = { 8284 .type = HDA_FIXUP_PINS, 8285 .v.pins = (const struct hda_pintbl[]) { 8286 { 0x12, 0x90a60130 }, 8287 { 0x14, 0x90170110 }, 8288 { 0x17, 0x40000008 }, 8289 { 0x18, 0x411111f0 }, 8290 { 0x19, 0x01a1913c }, 8291 { 0x1a, 0x411111f0 }, 8292 { 0x1b, 0x411111f0 }, 8293 { 0x1d, 0x40f89b2d }, 8294 { 0x1e, 0x411111f0 }, 8295 { 0x21, 0x0321101f }, 8296 { }, 8297 }, 8298 }, 8299 [ALC269VB_FIXUP_ASPIRE_E1_COEF] = { 8300 .type = HDA_FIXUP_FUNC, 8301 .v.func = alc269vb_fixup_aspire_e1_coef, 8302 }, 8303 [ALC280_FIXUP_HP_GPIO4] = { 8304 .type = HDA_FIXUP_FUNC, 8305 .v.func = alc280_fixup_hp_gpio4, 8306 }, 8307 [ALC286_FIXUP_HP_GPIO_LED] = { 8308 .type = HDA_FIXUP_FUNC, 8309 .v.func = alc286_fixup_hp_gpio_led, 8310 }, 8311 [ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY] = { 8312 .type = HDA_FIXUP_FUNC, 8313 .v.func = alc280_fixup_hp_gpio2_mic_hotkey, 8314 }, 8315 [ALC280_FIXUP_HP_DOCK_PINS] = { 8316 .type = HDA_FIXUP_PINS, 8317 .v.pins = (const struct hda_pintbl[]) { 8318 { 0x1b, 0x21011020 }, /* line-out */ 8319 { 0x1a, 0x01a1903c }, /* headset mic */ 8320 { 0x18, 0x2181103f }, /* line-in */ 8321 { }, 8322 }, 8323 .chained = true, 8324 .chain_id = ALC280_FIXUP_HP_GPIO4 8325 }, 8326 [ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED] = { 8327 .type = HDA_FIXUP_PINS, 8328 .v.pins = (const struct hda_pintbl[]) { 8329 { 0x1b, 0x21011020 }, /* line-out */ 8330 { 0x18, 0x2181103f }, /* line-in */ 8331 { }, 8332 }, 8333 .chained = true, 8334 .chain_id = ALC269_FIXUP_HP_GPIO_MIC1_LED 8335 }, 8336 [ALC280_FIXUP_HP_9480M] = { 8337 .type = HDA_FIXUP_FUNC, 8338 .v.func = alc280_fixup_hp_9480m, 8339 }, 8340 [ALC245_FIXUP_HP_X360_AMP] = { 8341 .type = HDA_FIXUP_FUNC, 8342 .v.func = alc245_fixup_hp_x360_amp, 8343 .chained = true, 8344 .chain_id = ALC245_FIXUP_HP_GPIO_LED 8345 }, 8346 [ALC288_FIXUP_DELL_HEADSET_MODE] = { 8347 .type = HDA_FIXUP_FUNC, 8348 .v.func = alc_fixup_headset_mode_dell_alc288, 8349 .chained = true, 8350 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8351 }, 8352 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8353 .type = HDA_FIXUP_PINS, 8354 .v.pins = (const struct hda_pintbl[]) { 8355 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8356 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8357 { } 8358 }, 8359 .chained = true, 8360 .chain_id = ALC288_FIXUP_DELL_HEADSET_MODE 8361 }, 8362 [ALC288_FIXUP_DISABLE_AAMIX] = { 8363 .type = HDA_FIXUP_FUNC, 8364 .v.func = alc_fixup_disable_aamix, 8365 .chained = true, 8366 .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE 8367 }, 8368 [ALC288_FIXUP_DELL_XPS_13] = { 8369 .type = HDA_FIXUP_FUNC, 8370 .v.func = alc_fixup_dell_xps13, 8371 .chained = true, 8372 .chain_id = ALC288_FIXUP_DISABLE_AAMIX 8373 }, 8374 [ALC292_FIXUP_DISABLE_AAMIX] = { 8375 .type = HDA_FIXUP_FUNC, 8376 .v.func = alc_fixup_disable_aamix, 8377 .chained = true, 8378 .chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE 8379 }, 8380 [ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK] = { 8381 .type = HDA_FIXUP_FUNC, 8382 .v.func = alc_fixup_disable_aamix, 8383 .chained = true, 8384 .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE 8385 }, 8386 [ALC292_FIXUP_DELL_E7X_AAMIX] = { 8387 .type = HDA_FIXUP_FUNC, 8388 .v.func = alc_fixup_dell_xps13, 8389 .chained = true, 8390 .chain_id = ALC292_FIXUP_DISABLE_AAMIX 8391 }, 8392 [ALC292_FIXUP_DELL_E7X] = { 8393 .type = HDA_FIXUP_FUNC, 8394 .v.func = alc_fixup_micmute_led, 8395 /* micmute fixup must be applied at last */ 8396 .chained_before = true, 8397 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX, 8398 }, 8399 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = { 8400 .type = HDA_FIXUP_PINS, 8401 .v.pins = (const struct hda_pintbl[]) { 8402 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */ 8403 { } 8404 }, 8405 .chained_before = true, 8406 .chain_id = ALC269_FIXUP_HEADSET_MODE, 8407 }, 8408 [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8409 .type = HDA_FIXUP_PINS, 8410 .v.pins = (const struct hda_pintbl[]) { 8411 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8412 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8413 { } 8414 }, 8415 .chained = true, 8416 .chain_id = ALC269_FIXUP_HEADSET_MODE 8417 }, 8418 [ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = { 8419 .type = HDA_FIXUP_PINS, 8420 .v.pins = (const struct hda_pintbl[]) { 8421 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8422 { } 8423 }, 8424 .chained = true, 8425 .chain_id = ALC269_FIXUP_HEADSET_MODE 8426 }, 8427 [ALC275_FIXUP_DELL_XPS] = { 8428 .type = HDA_FIXUP_VERBS, 8429 .v.verbs = (const struct hda_verb[]) { 8430 /* Enables internal speaker */ 8431 {0x20, AC_VERB_SET_COEF_INDEX, 0x1f}, 8432 {0x20, AC_VERB_SET_PROC_COEF, 0x00c0}, 8433 {0x20, AC_VERB_SET_COEF_INDEX, 0x30}, 8434 {0x20, AC_VERB_SET_PROC_COEF, 0x00b1}, 8435 {} 8436 } 8437 }, 8438 [ALC293_FIXUP_LENOVO_SPK_NOISE] = { 8439 .type = HDA_FIXUP_FUNC, 8440 .v.func = alc_fixup_disable_aamix, 8441 .chained = true, 8442 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8443 }, 8444 [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = { 8445 .type = HDA_FIXUP_FUNC, 8446 .v.func = alc233_fixup_lenovo_line2_mic_hotkey, 8447 }, 8448 [ALC233_FIXUP_INTEL_NUC8_DMIC] = { 8449 .type = HDA_FIXUP_FUNC, 8450 .v.func = alc_fixup_inv_dmic, 8451 .chained = true, 8452 .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST, 8453 }, 8454 [ALC233_FIXUP_INTEL_NUC8_BOOST] = { 8455 .type = HDA_FIXUP_FUNC, 8456 .v.func = alc269_fixup_limit_int_mic_boost 8457 }, 8458 [ALC255_FIXUP_DELL_SPK_NOISE] = { 8459 .type = HDA_FIXUP_FUNC, 8460 .v.func = alc_fixup_disable_aamix, 8461 .chained = true, 8462 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8463 }, 8464 [ALC225_FIXUP_DISABLE_MIC_VREF] = { 8465 .type = HDA_FIXUP_FUNC, 8466 .v.func = alc_fixup_disable_mic_vref, 8467 .chained = true, 8468 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8469 }, 8470 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8471 .type = HDA_FIXUP_VERBS, 8472 .v.verbs = (const struct hda_verb[]) { 8473 /* Disable pass-through path for FRONT 14h */ 8474 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 }, 8475 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 }, 8476 {} 8477 }, 8478 .chained = true, 8479 .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF 8480 }, 8481 [ALC280_FIXUP_HP_HEADSET_MIC] = { 8482 .type = HDA_FIXUP_FUNC, 8483 .v.func = alc_fixup_disable_aamix, 8484 .chained = true, 8485 .chain_id = ALC269_FIXUP_HEADSET_MIC, 8486 }, 8487 [ALC221_FIXUP_HP_FRONT_MIC] = { 8488 .type = HDA_FIXUP_PINS, 8489 .v.pins = (const struct hda_pintbl[]) { 8490 { 0x19, 0x02a19020 }, /* Front Mic */ 8491 { } 8492 }, 8493 }, 8494 [ALC292_FIXUP_TPT460] = { 8495 .type = HDA_FIXUP_FUNC, 8496 .v.func = alc_fixup_tpt440_dock, 8497 .chained = true, 8498 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE, 8499 }, 8500 [ALC298_FIXUP_SPK_VOLUME] = { 8501 .type = HDA_FIXUP_FUNC, 8502 .v.func = alc298_fixup_speaker_volume, 8503 .chained = true, 8504 .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, 8505 }, 8506 [ALC298_FIXUP_LENOVO_SPK_VOLUME] = { 8507 .type = HDA_FIXUP_FUNC, 8508 .v.func = alc298_fixup_speaker_volume, 8509 }, 8510 [ALC295_FIXUP_DISABLE_DAC3] = { 8511 .type = HDA_FIXUP_FUNC, 8512 .v.func = alc295_fixup_disable_dac3, 8513 }, 8514 [ALC285_FIXUP_SPEAKER2_TO_DAC1] = { 8515 .type = HDA_FIXUP_FUNC, 8516 .v.func = alc285_fixup_speaker2_to_dac1, 8517 .chained = true, 8518 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8519 }, 8520 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = { 8521 .type = HDA_FIXUP_FUNC, 8522 .v.func = alc285_fixup_speaker2_to_dac1, 8523 .chained = true, 8524 .chain_id = ALC245_FIXUP_CS35L41_SPI_2 8525 }, 8526 [ALC285_FIXUP_ASUS_HEADSET_MIC] = { 8527 .type = HDA_FIXUP_PINS, 8528 .v.pins = (const struct hda_pintbl[]) { 8529 { 0x19, 0x03a11050 }, 8530 { 0x1b, 0x03a11c30 }, 8531 { } 8532 }, 8533 .chained = true, 8534 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1 8535 }, 8536 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = { 8537 .type = HDA_FIXUP_PINS, 8538 .v.pins = (const struct hda_pintbl[]) { 8539 { 0x14, 0x90170120 }, 8540 { } 8541 }, 8542 .chained = true, 8543 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC 8544 }, 8545 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = { 8546 .type = HDA_FIXUP_FUNC, 8547 .v.func = alc285_fixup_speaker2_to_dac1, 8548 .chained = true, 8549 .chain_id = ALC287_FIXUP_CS35L41_I2C_2 8550 }, 8551 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = { 8552 .type = HDA_FIXUP_PINS, 8553 .v.pins = (const struct hda_pintbl[]) { 8554 { 0x19, 0x03a11050 }, 8555 { 0x1b, 0x03a11c30 }, 8556 { } 8557 }, 8558 .chained = true, 8559 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1 8560 }, 8561 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = { 8562 .type = HDA_FIXUP_PINS, 8563 .v.pins = (const struct hda_pintbl[]) { 8564 { 0x1b, 0x90170151 }, 8565 { } 8566 }, 8567 .chained = true, 8568 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8569 }, 8570 [ALC269_FIXUP_ATIV_BOOK_8] = { 8571 .type = HDA_FIXUP_FUNC, 8572 .v.func = alc_fixup_auto_mute_via_amp, 8573 .chained = true, 8574 .chain_id = ALC269_FIXUP_NO_SHUTUP 8575 }, 8576 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = { 8577 .type = HDA_FIXUP_PINS, 8578 .v.pins = (const struct hda_pintbl[]) { 8579 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8580 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */ 8581 { } 8582 }, 8583 .chained = true, 8584 .chain_id = ALC269_FIXUP_HEADSET_MODE 8585 }, 8586 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { 8587 .type = HDA_FIXUP_PINS, 8588 .v.pins = (const struct hda_pintbl[]) { 8589 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8590 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ 8591 { } 8592 }, 8593 .chained = true, 8594 .chain_id = ALC269_FIXUP_HEADSET_MODE 8595 }, 8596 [ALC256_FIXUP_ASUS_HEADSET_MODE] = { 8597 .type = HDA_FIXUP_FUNC, 8598 .v.func = alc_fixup_headset_mode, 8599 }, 8600 [ALC256_FIXUP_ASUS_MIC] = { 8601 .type = HDA_FIXUP_PINS, 8602 .v.pins = (const struct hda_pintbl[]) { 8603 { 0x13, 0x90a60160 }, /* use as internal mic */ 8604 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 8605 { } 8606 }, 8607 .chained = true, 8608 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 8609 }, 8610 [ALC256_FIXUP_ASUS_AIO_GPIO2] = { 8611 .type = HDA_FIXUP_FUNC, 8612 /* Set up GPIO2 for the speaker amp */ 8613 .v.func = alc_fixup_gpio4, 8614 }, 8615 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8616 .type = HDA_FIXUP_PINS, 8617 .v.pins = (const struct hda_pintbl[]) { 8618 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8619 { } 8620 }, 8621 .chained = true, 8622 .chain_id = ALC269_FIXUP_HEADSET_MIC 8623 }, 8624 [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = { 8625 .type = HDA_FIXUP_VERBS, 8626 .v.verbs = (const struct hda_verb[]) { 8627 /* Enables internal speaker */ 8628 {0x20, AC_VERB_SET_COEF_INDEX, 0x40}, 8629 {0x20, AC_VERB_SET_PROC_COEF, 0x8800}, 8630 {} 8631 }, 8632 .chained = true, 8633 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE 8634 }, 8635 [ALC233_FIXUP_LENOVO_MULTI_CODECS] = { 8636 .type = HDA_FIXUP_FUNC, 8637 .v.func = alc233_alc662_fixup_lenovo_dual_codecs, 8638 .chained = true, 8639 .chain_id = ALC269_FIXUP_GPIO2 8640 }, 8641 [ALC233_FIXUP_ACER_HEADSET_MIC] = { 8642 .type = HDA_FIXUP_VERBS, 8643 .v.verbs = (const struct hda_verb[]) { 8644 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 8645 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 8646 { } 8647 }, 8648 .chained = true, 8649 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE 8650 }, 8651 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = { 8652 .type = HDA_FIXUP_PINS, 8653 .v.pins = (const struct hda_pintbl[]) { 8654 /* Change the mic location from front to right, otherwise there are 8655 two front mics with the same name, pulseaudio can't handle them. 8656 This is just a temporary workaround, after applying this fixup, 8657 there will be one "Front Mic" and one "Mic" in this machine. 8658 */ 8659 { 0x1a, 0x04a19040 }, 8660 { } 8661 }, 8662 }, 8663 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = { 8664 .type = HDA_FIXUP_PINS, 8665 .v.pins = (const struct hda_pintbl[]) { 8666 { 0x16, 0x0101102f }, /* Rear Headset HP */ 8667 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */ 8668 { 0x1a, 0x01a19030 }, /* Rear Headset MIC */ 8669 { 0x1b, 0x02011020 }, 8670 { } 8671 }, 8672 .chained = true, 8673 .chain_id = ALC225_FIXUP_S3_POP_NOISE 8674 }, 8675 [ALC225_FIXUP_S3_POP_NOISE] = { 8676 .type = HDA_FIXUP_FUNC, 8677 .v.func = alc225_fixup_s3_pop_noise, 8678 .chained = true, 8679 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8680 }, 8681 [ALC700_FIXUP_INTEL_REFERENCE] = { 8682 .type = HDA_FIXUP_VERBS, 8683 .v.verbs = (const struct hda_verb[]) { 8684 /* Enables internal speaker */ 8685 {0x20, AC_VERB_SET_COEF_INDEX, 0x45}, 8686 {0x20, AC_VERB_SET_PROC_COEF, 0x5289}, 8687 {0x20, AC_VERB_SET_COEF_INDEX, 0x4A}, 8688 {0x20, AC_VERB_SET_PROC_COEF, 0x001b}, 8689 {0x58, AC_VERB_SET_COEF_INDEX, 0x00}, 8690 {0x58, AC_VERB_SET_PROC_COEF, 0x3888}, 8691 {0x20, AC_VERB_SET_COEF_INDEX, 0x6f}, 8692 {0x20, AC_VERB_SET_PROC_COEF, 0x2c0b}, 8693 {} 8694 } 8695 }, 8696 [ALC274_FIXUP_DELL_BIND_DACS] = { 8697 .type = HDA_FIXUP_FUNC, 8698 .v.func = alc274_fixup_bind_dacs, 8699 .chained = true, 8700 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8701 }, 8702 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = { 8703 .type = HDA_FIXUP_PINS, 8704 .v.pins = (const struct hda_pintbl[]) { 8705 { 0x1b, 0x0401102f }, 8706 { } 8707 }, 8708 .chained = true, 8709 .chain_id = ALC274_FIXUP_DELL_BIND_DACS 8710 }, 8711 [ALC298_FIXUP_TPT470_DOCK_FIX] = { 8712 .type = HDA_FIXUP_FUNC, 8713 .v.func = alc_fixup_tpt470_dock, 8714 .chained = true, 8715 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE 8716 }, 8717 [ALC298_FIXUP_TPT470_DOCK] = { 8718 .type = HDA_FIXUP_FUNC, 8719 .v.func = alc_fixup_tpt470_dacs, 8720 .chained = true, 8721 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX 8722 }, 8723 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = { 8724 .type = HDA_FIXUP_PINS, 8725 .v.pins = (const struct hda_pintbl[]) { 8726 { 0x14, 0x0201101f }, 8727 { } 8728 }, 8729 .chained = true, 8730 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 8731 }, 8732 [ALC255_FIXUP_DELL_HEADSET_MIC] = { 8733 .type = HDA_FIXUP_PINS, 8734 .v.pins = (const struct hda_pintbl[]) { 8735 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8736 { } 8737 }, 8738 .chained = true, 8739 .chain_id = ALC269_FIXUP_HEADSET_MIC 8740 }, 8741 [ALC295_FIXUP_HP_X360] = { 8742 .type = HDA_FIXUP_FUNC, 8743 .v.func = alc295_fixup_hp_top_speakers, 8744 .chained = true, 8745 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3 8746 }, 8747 [ALC221_FIXUP_HP_HEADSET_MIC] = { 8748 .type = HDA_FIXUP_PINS, 8749 .v.pins = (const struct hda_pintbl[]) { 8750 { 0x19, 0x0181313f}, 8751 { } 8752 }, 8753 .chained = true, 8754 .chain_id = ALC269_FIXUP_HEADSET_MIC 8755 }, 8756 [ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = { 8757 .type = HDA_FIXUP_FUNC, 8758 .v.func = alc285_fixup_invalidate_dacs, 8759 .chained = true, 8760 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8761 }, 8762 [ALC295_FIXUP_HP_AUTO_MUTE] = { 8763 .type = HDA_FIXUP_FUNC, 8764 .v.func = alc_fixup_auto_mute_via_amp, 8765 }, 8766 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = { 8767 .type = HDA_FIXUP_PINS, 8768 .v.pins = (const struct hda_pintbl[]) { 8769 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8770 { } 8771 }, 8772 .chained = true, 8773 .chain_id = ALC269_FIXUP_HEADSET_MIC 8774 }, 8775 [ALC294_FIXUP_ASUS_MIC] = { 8776 .type = HDA_FIXUP_PINS, 8777 .v.pins = (const struct hda_pintbl[]) { 8778 { 0x13, 0x90a60160 }, /* use as internal mic */ 8779 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 8780 { } 8781 }, 8782 .chained = true, 8783 .chain_id = ALC269_FIXUP_HEADSET_MIC 8784 }, 8785 [ALC294_FIXUP_ASUS_HEADSET_MIC] = { 8786 .type = HDA_FIXUP_PINS, 8787 .v.pins = (const struct hda_pintbl[]) { 8788 { 0x19, 0x01a1103c }, /* use as headset mic */ 8789 { } 8790 }, 8791 .chained = true, 8792 .chain_id = ALC269_FIXUP_HEADSET_MIC 8793 }, 8794 [ALC294_FIXUP_ASUS_SPK] = { 8795 .type = HDA_FIXUP_VERBS, 8796 .v.verbs = (const struct hda_verb[]) { 8797 /* Set EAPD high */ 8798 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 }, 8799 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 }, 8800 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 8801 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 }, 8802 { } 8803 }, 8804 .chained = true, 8805 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 8806 }, 8807 [ALC295_FIXUP_CHROME_BOOK] = { 8808 .type = HDA_FIXUP_FUNC, 8809 .v.func = alc295_fixup_chromebook, 8810 .chained = true, 8811 .chain_id = ALC225_FIXUP_HEADSET_JACK 8812 }, 8813 [ALC225_FIXUP_HEADSET_JACK] = { 8814 .type = HDA_FIXUP_FUNC, 8815 .v.func = alc_fixup_headset_jack, 8816 }, 8817 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { 8818 .type = HDA_FIXUP_PINS, 8819 .v.pins = (const struct hda_pintbl[]) { 8820 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8821 { } 8822 }, 8823 .chained = true, 8824 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8825 }, 8826 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = { 8827 .type = HDA_FIXUP_VERBS, 8828 .v.verbs = (const struct hda_verb[]) { 8829 /* Disable PCBEEP-IN passthrough */ 8830 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 }, 8831 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 }, 8832 { } 8833 }, 8834 .chained = true, 8835 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE 8836 }, 8837 [ALC255_FIXUP_ACER_HEADSET_MIC] = { 8838 .type = HDA_FIXUP_PINS, 8839 .v.pins = (const struct hda_pintbl[]) { 8840 { 0x19, 0x03a11130 }, 8841 { 0x1a, 0x90a60140 }, /* use as internal mic */ 8842 { } 8843 }, 8844 .chained = true, 8845 .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC 8846 }, 8847 [ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = { 8848 .type = HDA_FIXUP_PINS, 8849 .v.pins = (const struct hda_pintbl[]) { 8850 { 0x16, 0x01011020 }, /* Rear Line out */ 8851 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */ 8852 { } 8853 }, 8854 .chained = true, 8855 .chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE 8856 }, 8857 [ALC225_FIXUP_WYSE_AUTO_MUTE] = { 8858 .type = HDA_FIXUP_FUNC, 8859 .v.func = alc_fixup_auto_mute_via_amp, 8860 .chained = true, 8861 .chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF 8862 }, 8863 [ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = { 8864 .type = HDA_FIXUP_FUNC, 8865 .v.func = alc_fixup_disable_mic_vref, 8866 .chained = true, 8867 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8868 }, 8869 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = { 8870 .type = HDA_FIXUP_VERBS, 8871 .v.verbs = (const struct hda_verb[]) { 8872 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4f }, 8873 { 0x20, AC_VERB_SET_PROC_COEF, 0x5029 }, 8874 { } 8875 }, 8876 .chained = true, 8877 .chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE 8878 }, 8879 [ALC256_FIXUP_ASUS_HEADSET_MIC] = { 8880 .type = HDA_FIXUP_PINS, 8881 .v.pins = (const struct hda_pintbl[]) { 8882 { 0x19, 0x03a11020 }, /* headset mic with jack detect */ 8883 { } 8884 }, 8885 .chained = true, 8886 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 8887 }, 8888 [ALC256_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8889 .type = HDA_FIXUP_PINS, 8890 .v.pins = (const struct hda_pintbl[]) { 8891 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ 8892 { } 8893 }, 8894 .chained = true, 8895 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 8896 }, 8897 [ALC299_FIXUP_PREDATOR_SPK] = { 8898 .type = HDA_FIXUP_PINS, 8899 .v.pins = (const struct hda_pintbl[]) { 8900 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */ 8901 { } 8902 } 8903 }, 8904 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = { 8905 .type = HDA_FIXUP_PINS, 8906 .v.pins = (const struct hda_pintbl[]) { 8907 { 0x19, 0x04a11040 }, 8908 { 0x21, 0x04211020 }, 8909 { } 8910 }, 8911 .chained = true, 8912 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 8913 }, 8914 [ALC289_FIXUP_DELL_SPK1] = { 8915 .type = HDA_FIXUP_PINS, 8916 .v.pins = (const struct hda_pintbl[]) { 8917 { 0x14, 0x90170140 }, 8918 { } 8919 }, 8920 .chained = true, 8921 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 8922 }, 8923 [ALC289_FIXUP_DELL_SPK2] = { 8924 .type = HDA_FIXUP_PINS, 8925 .v.pins = (const struct hda_pintbl[]) { 8926 { 0x17, 0x90170130 }, /* bass spk */ 8927 { } 8928 }, 8929 .chained = true, 8930 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 8931 }, 8932 [ALC289_FIXUP_DUAL_SPK] = { 8933 .type = HDA_FIXUP_FUNC, 8934 .v.func = alc285_fixup_speaker2_to_dac1, 8935 .chained = true, 8936 .chain_id = ALC289_FIXUP_DELL_SPK2 8937 }, 8938 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = { 8939 .type = HDA_FIXUP_FUNC, 8940 .v.func = alc285_fixup_speaker2_to_dac1, 8941 .chained = true, 8942 .chain_id = ALC289_FIXUP_DELL_SPK1 8943 }, 8944 [ALC294_FIXUP_SPK2_TO_DAC1] = { 8945 .type = HDA_FIXUP_FUNC, 8946 .v.func = alc285_fixup_speaker2_to_dac1, 8947 .chained = true, 8948 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 8949 }, 8950 [ALC294_FIXUP_ASUS_DUAL_SPK] = { 8951 .type = HDA_FIXUP_FUNC, 8952 /* The GPIO must be pulled to initialize the AMP */ 8953 .v.func = alc_fixup_gpio4, 8954 .chained = true, 8955 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 8956 }, 8957 [ALC294_FIXUP_ASUS_ALLY] = { 8958 .type = HDA_FIXUP_FUNC, 8959 .v.func = cs35l41_fixup_i2c_two, 8960 .chained = true, 8961 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS 8962 }, 8963 [ALC294_FIXUP_ASUS_ALLY_PINS] = { 8964 .type = HDA_FIXUP_PINS, 8965 .v.pins = (const struct hda_pintbl[]) { 8966 { 0x19, 0x03a11050 }, 8967 { 0x1a, 0x03a11c30 }, 8968 { 0x21, 0x03211420 }, 8969 { } 8970 }, 8971 .chained = true, 8972 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS 8973 }, 8974 [ALC294_FIXUP_ASUS_ALLY_VERBS] = { 8975 .type = HDA_FIXUP_VERBS, 8976 .v.verbs = (const struct hda_verb[]) { 8977 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 8978 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 8979 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 }, 8980 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 }, 8981 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 }, 8982 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a }, 8983 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 }, 8984 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049}, 8985 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a }, 8986 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b }, 8987 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b }, 8988 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278}, 8989 { } 8990 }, 8991 .chained = true, 8992 .chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER 8993 }, 8994 [ALC294_FIXUP_ASUS_ALLY_SPEAKER] = { 8995 .type = HDA_FIXUP_FUNC, 8996 .v.func = alc285_fixup_speaker2_to_dac1, 8997 }, 8998 [ALC285_FIXUP_THINKPAD_X1_GEN7] = { 8999 .type = HDA_FIXUP_FUNC, 9000 .v.func = alc285_fixup_thinkpad_x1_gen7, 9001 .chained = true, 9002 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9003 }, 9004 [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { 9005 .type = HDA_FIXUP_FUNC, 9006 .v.func = alc_fixup_headset_jack, 9007 .chained = true, 9008 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7 9009 }, 9010 [ALC294_FIXUP_ASUS_HPE] = { 9011 .type = HDA_FIXUP_VERBS, 9012 .v.verbs = (const struct hda_verb[]) { 9013 /* Set EAPD high */ 9014 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 9015 { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 }, 9016 { } 9017 }, 9018 .chained = true, 9019 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9020 }, 9021 [ALC294_FIXUP_ASUS_GX502_PINS] = { 9022 .type = HDA_FIXUP_PINS, 9023 .v.pins = (const struct hda_pintbl[]) { 9024 { 0x19, 0x03a11050 }, /* front HP mic */ 9025 { 0x1a, 0x01a11830 }, /* rear external mic */ 9026 { 0x21, 0x03211020 }, /* front HP out */ 9027 { } 9028 }, 9029 .chained = true, 9030 .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS 9031 }, 9032 [ALC294_FIXUP_ASUS_GX502_VERBS] = { 9033 .type = HDA_FIXUP_VERBS, 9034 .v.verbs = (const struct hda_verb[]) { 9035 /* set 0x15 to HP-OUT ctrl */ 9036 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, 9037 /* unmute the 0x15 amp */ 9038 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, 9039 { } 9040 }, 9041 .chained = true, 9042 .chain_id = ALC294_FIXUP_ASUS_GX502_HP 9043 }, 9044 [ALC294_FIXUP_ASUS_GX502_HP] = { 9045 .type = HDA_FIXUP_FUNC, 9046 .v.func = alc294_fixup_gx502_hp, 9047 }, 9048 [ALC294_FIXUP_ASUS_GU502_PINS] = { 9049 .type = HDA_FIXUP_PINS, 9050 .v.pins = (const struct hda_pintbl[]) { 9051 { 0x19, 0x01a11050 }, /* rear HP mic */ 9052 { 0x1a, 0x01a11830 }, /* rear external mic */ 9053 { 0x21, 0x012110f0 }, /* rear HP out */ 9054 { } 9055 }, 9056 .chained = true, 9057 .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS 9058 }, 9059 [ALC294_FIXUP_ASUS_GU502_VERBS] = { 9060 .type = HDA_FIXUP_VERBS, 9061 .v.verbs = (const struct hda_verb[]) { 9062 /* set 0x15 to HP-OUT ctrl */ 9063 { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, 9064 /* unmute the 0x15 amp */ 9065 { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, 9066 /* set 0x1b to HP-OUT */ 9067 { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 9068 { } 9069 }, 9070 .chained = true, 9071 .chain_id = ALC294_FIXUP_ASUS_GU502_HP 9072 }, 9073 [ALC294_FIXUP_ASUS_GU502_HP] = { 9074 .type = HDA_FIXUP_FUNC, 9075 .v.func = alc294_fixup_gu502_hp, 9076 }, 9077 [ALC294_FIXUP_ASUS_G513_PINS] = { 9078 .type = HDA_FIXUP_PINS, 9079 .v.pins = (const struct hda_pintbl[]) { 9080 { 0x19, 0x03a11050 }, /* front HP mic */ 9081 { 0x1a, 0x03a11c30 }, /* rear external mic */ 9082 { 0x21, 0x03211420 }, /* front HP out */ 9083 { } 9084 }, 9085 }, 9086 [ALC285_FIXUP_ASUS_G533Z_PINS] = { 9087 .type = HDA_FIXUP_PINS, 9088 .v.pins = (const struct hda_pintbl[]) { 9089 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ 9090 { 0x19, 0x03a19020 }, /* Mic Boost Volume */ 9091 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ 9092 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ 9093 { 0x21, 0x03211420 }, 9094 { } 9095 }, 9096 }, 9097 [ALC294_FIXUP_ASUS_COEF_1B] = { 9098 .type = HDA_FIXUP_VERBS, 9099 .v.verbs = (const struct hda_verb[]) { 9100 /* Set bit 10 to correct noisy output after reboot from 9101 * Windows 10 (due to pop noise reduction?) 9102 */ 9103 { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b }, 9104 { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b }, 9105 { } 9106 }, 9107 .chained = true, 9108 .chain_id = ALC289_FIXUP_ASUS_GA401, 9109 }, 9110 [ALC285_FIXUP_HP_GPIO_LED] = { 9111 .type = HDA_FIXUP_FUNC, 9112 .v.func = alc285_fixup_hp_gpio_led, 9113 }, 9114 [ALC285_FIXUP_HP_MUTE_LED] = { 9115 .type = HDA_FIXUP_FUNC, 9116 .v.func = alc285_fixup_hp_mute_led, 9117 }, 9118 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = { 9119 .type = HDA_FIXUP_FUNC, 9120 .v.func = alc285_fixup_hp_spectre_x360_mute_led, 9121 }, 9122 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { 9123 .type = HDA_FIXUP_FUNC, 9124 .v.func = alc236_fixup_hp_mute_led_coefbit2, 9125 }, 9126 [ALC236_FIXUP_HP_GPIO_LED] = { 9127 .type = HDA_FIXUP_FUNC, 9128 .v.func = alc236_fixup_hp_gpio_led, 9129 }, 9130 [ALC236_FIXUP_HP_MUTE_LED] = { 9131 .type = HDA_FIXUP_FUNC, 9132 .v.func = alc236_fixup_hp_mute_led, 9133 }, 9134 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = { 9135 .type = HDA_FIXUP_FUNC, 9136 .v.func = alc236_fixup_hp_mute_led_micmute_vref, 9137 }, 9138 [ALC298_FIXUP_SAMSUNG_AMP] = { 9139 .type = HDA_FIXUP_FUNC, 9140 .v.func = alc298_fixup_samsung_amp, 9141 .chained = true, 9142 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET 9143 }, 9144 [ALC298_FIXUP_SAMSUNG_AMP2] = { 9145 .type = HDA_FIXUP_FUNC, 9146 .v.func = alc298_fixup_samsung_amp2 9147 }, 9148 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { 9149 .type = HDA_FIXUP_VERBS, 9150 .v.verbs = (const struct hda_verb[]) { 9151 { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 }, 9152 { } 9153 }, 9154 }, 9155 [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { 9156 .type = HDA_FIXUP_VERBS, 9157 .v.verbs = (const struct hda_verb[]) { 9158 { 0x20, AC_VERB_SET_COEF_INDEX, 0x08}, 9159 { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf}, 9160 { } 9161 }, 9162 }, 9163 [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = { 9164 .type = HDA_FIXUP_PINS, 9165 .v.pins = (const struct hda_pintbl[]) { 9166 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9167 { } 9168 }, 9169 .chained = true, 9170 .chain_id = ALC269_FIXUP_HEADSET_MODE 9171 }, 9172 [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = { 9173 .type = HDA_FIXUP_PINS, 9174 .v.pins = (const struct hda_pintbl[]) { 9175 { 0x14, 0x90100120 }, /* use as internal speaker */ 9176 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */ 9177 { 0x1a, 0x01011020 }, /* use as line out */ 9178 { }, 9179 }, 9180 .chained = true, 9181 .chain_id = ALC269_FIXUP_HEADSET_MIC 9182 }, 9183 [ALC269VC_FIXUP_ACER_HEADSET_MIC] = { 9184 .type = HDA_FIXUP_PINS, 9185 .v.pins = (const struct hda_pintbl[]) { 9186 { 0x18, 0x02a11030 }, /* use as headset mic */ 9187 { } 9188 }, 9189 .chained = true, 9190 .chain_id = ALC269_FIXUP_HEADSET_MIC 9191 }, 9192 [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = { 9193 .type = HDA_FIXUP_PINS, 9194 .v.pins = (const struct hda_pintbl[]) { 9195 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */ 9196 { } 9197 }, 9198 .chained = true, 9199 .chain_id = ALC269_FIXUP_HEADSET_MIC 9200 }, 9201 [ALC289_FIXUP_ASUS_GA401] = { 9202 .type = HDA_FIXUP_FUNC, 9203 .v.func = alc289_fixup_asus_ga401, 9204 .chained = true, 9205 .chain_id = ALC289_FIXUP_ASUS_GA502, 9206 }, 9207 [ALC289_FIXUP_ASUS_GA502] = { 9208 .type = HDA_FIXUP_PINS, 9209 .v.pins = (const struct hda_pintbl[]) { 9210 { 0x19, 0x03a11020 }, /* headset mic with jack detect */ 9211 { } 9212 }, 9213 }, 9214 [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = { 9215 .type = HDA_FIXUP_PINS, 9216 .v.pins = (const struct hda_pintbl[]) { 9217 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */ 9218 { } 9219 }, 9220 .chained = true, 9221 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9222 }, 9223 [ALC285_FIXUP_HP_GPIO_AMP_INIT] = { 9224 .type = HDA_FIXUP_FUNC, 9225 .v.func = alc285_fixup_hp_gpio_amp_init, 9226 .chained = true, 9227 .chain_id = ALC285_FIXUP_HP_GPIO_LED 9228 }, 9229 [ALC269_FIXUP_CZC_B20] = { 9230 .type = HDA_FIXUP_PINS, 9231 .v.pins = (const struct hda_pintbl[]) { 9232 { 0x12, 0x411111f0 }, 9233 { 0x14, 0x90170110 }, /* speaker */ 9234 { 0x15, 0x032f1020 }, /* HP out */ 9235 { 0x17, 0x411111f0 }, 9236 { 0x18, 0x03ab1040 }, /* mic */ 9237 { 0x19, 0xb7a7013f }, 9238 { 0x1a, 0x0181305f }, 9239 { 0x1b, 0x411111f0 }, 9240 { 0x1d, 0x411111f0 }, 9241 { 0x1e, 0x411111f0 }, 9242 { } 9243 }, 9244 .chain_id = ALC269_FIXUP_DMIC, 9245 }, 9246 [ALC269_FIXUP_CZC_TMI] = { 9247 .type = HDA_FIXUP_PINS, 9248 .v.pins = (const struct hda_pintbl[]) { 9249 { 0x12, 0x4000c000 }, 9250 { 0x14, 0x90170110 }, /* speaker */ 9251 { 0x15, 0x0421401f }, /* HP out */ 9252 { 0x17, 0x411111f0 }, 9253 { 0x18, 0x04a19020 }, /* mic */ 9254 { 0x19, 0x411111f0 }, 9255 { 0x1a, 0x411111f0 }, 9256 { 0x1b, 0x411111f0 }, 9257 { 0x1d, 0x40448505 }, 9258 { 0x1e, 0x411111f0 }, 9259 { 0x20, 0x8000ffff }, 9260 { } 9261 }, 9262 .chain_id = ALC269_FIXUP_DMIC, 9263 }, 9264 [ALC269_FIXUP_CZC_L101] = { 9265 .type = HDA_FIXUP_PINS, 9266 .v.pins = (const struct hda_pintbl[]) { 9267 { 0x12, 0x40000000 }, 9268 { 0x14, 0x01014010 }, /* speaker */ 9269 { 0x15, 0x411111f0 }, /* HP out */ 9270 { 0x16, 0x411111f0 }, 9271 { 0x18, 0x01a19020 }, /* mic */ 9272 { 0x19, 0x02a19021 }, 9273 { 0x1a, 0x0181302f }, 9274 { 0x1b, 0x0221401f }, 9275 { 0x1c, 0x411111f0 }, 9276 { 0x1d, 0x4044c601 }, 9277 { 0x1e, 0x411111f0 }, 9278 { } 9279 }, 9280 .chain_id = ALC269_FIXUP_DMIC, 9281 }, 9282 [ALC269_FIXUP_LEMOTE_A1802] = { 9283 .type = HDA_FIXUP_PINS, 9284 .v.pins = (const struct hda_pintbl[]) { 9285 { 0x12, 0x40000000 }, 9286 { 0x14, 0x90170110 }, /* speaker */ 9287 { 0x17, 0x411111f0 }, 9288 { 0x18, 0x03a19040 }, /* mic1 */ 9289 { 0x19, 0x90a70130 }, /* mic2 */ 9290 { 0x1a, 0x411111f0 }, 9291 { 0x1b, 0x411111f0 }, 9292 { 0x1d, 0x40489d2d }, 9293 { 0x1e, 0x411111f0 }, 9294 { 0x20, 0x0003ffff }, 9295 { 0x21, 0x03214020 }, 9296 { } 9297 }, 9298 .chain_id = ALC269_FIXUP_DMIC, 9299 }, 9300 [ALC269_FIXUP_LEMOTE_A190X] = { 9301 .type = HDA_FIXUP_PINS, 9302 .v.pins = (const struct hda_pintbl[]) { 9303 { 0x14, 0x99130110 }, /* speaker */ 9304 { 0x15, 0x0121401f }, /* HP out */ 9305 { 0x18, 0x01a19c20 }, /* rear mic */ 9306 { 0x19, 0x99a3092f }, /* front mic */ 9307 { 0x1b, 0x0201401f }, /* front lineout */ 9308 { } 9309 }, 9310 .chain_id = ALC269_FIXUP_DMIC, 9311 }, 9312 [ALC256_FIXUP_INTEL_NUC8_RUGGED] = { 9313 .type = HDA_FIXUP_PINS, 9314 .v.pins = (const struct hda_pintbl[]) { 9315 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9316 { } 9317 }, 9318 .chained = true, 9319 .chain_id = ALC269_FIXUP_HEADSET_MODE 9320 }, 9321 [ALC256_FIXUP_INTEL_NUC10] = { 9322 .type = HDA_FIXUP_PINS, 9323 .v.pins = (const struct hda_pintbl[]) { 9324 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9325 { } 9326 }, 9327 .chained = true, 9328 .chain_id = ALC269_FIXUP_HEADSET_MODE 9329 }, 9330 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { 9331 .type = HDA_FIXUP_VERBS, 9332 .v.verbs = (const struct hda_verb[]) { 9333 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9334 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9335 { } 9336 }, 9337 .chained = true, 9338 .chain_id = ALC289_FIXUP_ASUS_GA502 9339 }, 9340 [ALC274_FIXUP_HP_MIC] = { 9341 .type = HDA_FIXUP_VERBS, 9342 .v.verbs = (const struct hda_verb[]) { 9343 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9344 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9345 { } 9346 }, 9347 }, 9348 [ALC274_FIXUP_HP_HEADSET_MIC] = { 9349 .type = HDA_FIXUP_FUNC, 9350 .v.func = alc274_fixup_hp_headset_mic, 9351 .chained = true, 9352 .chain_id = ALC274_FIXUP_HP_MIC 9353 }, 9354 [ALC274_FIXUP_HP_ENVY_GPIO] = { 9355 .type = HDA_FIXUP_FUNC, 9356 .v.func = alc274_fixup_hp_envy_gpio, 9357 }, 9358 [ALC256_FIXUP_ASUS_HPE] = { 9359 .type = HDA_FIXUP_VERBS, 9360 .v.verbs = (const struct hda_verb[]) { 9361 /* Set EAPD high */ 9362 { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 9363 { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 }, 9364 { } 9365 }, 9366 .chained = true, 9367 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 9368 }, 9369 [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = { 9370 .type = HDA_FIXUP_FUNC, 9371 .v.func = alc_fixup_headset_jack, 9372 .chained = true, 9373 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9374 }, 9375 [ALC287_FIXUP_HP_GPIO_LED] = { 9376 .type = HDA_FIXUP_FUNC, 9377 .v.func = alc287_fixup_hp_gpio_led, 9378 }, 9379 [ALC256_FIXUP_HP_HEADSET_MIC] = { 9380 .type = HDA_FIXUP_FUNC, 9381 .v.func = alc274_fixup_hp_headset_mic, 9382 }, 9383 [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = { 9384 .type = HDA_FIXUP_FUNC, 9385 .v.func = alc_fixup_no_int_mic, 9386 .chained = true, 9387 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 9388 }, 9389 [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = { 9390 .type = HDA_FIXUP_PINS, 9391 .v.pins = (const struct hda_pintbl[]) { 9392 { 0x1b, 0x411111f0 }, 9393 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 9394 { }, 9395 }, 9396 .chained = true, 9397 .chain_id = ALC269_FIXUP_HEADSET_MODE 9398 }, 9399 [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = { 9400 .type = HDA_FIXUP_FUNC, 9401 .v.func = alc269_fixup_limit_int_mic_boost, 9402 .chained = true, 9403 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 9404 }, 9405 [ALC256_FIXUP_ACER_HEADSET_MIC] = { 9406 .type = HDA_FIXUP_PINS, 9407 .v.pins = (const struct hda_pintbl[]) { 9408 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 9409 { 0x1a, 0x90a1092f }, /* use as internal mic */ 9410 { } 9411 }, 9412 .chained = true, 9413 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9414 }, 9415 [ALC285_FIXUP_IDEAPAD_S740_COEF] = { 9416 .type = HDA_FIXUP_FUNC, 9417 .v.func = alc285_fixup_ideapad_s740_coef, 9418 .chained = true, 9419 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9420 }, 9421 [ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { 9422 .type = HDA_FIXUP_FUNC, 9423 .v.func = alc269_fixup_limit_int_mic_boost, 9424 .chained = true, 9425 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9426 }, 9427 [ALC295_FIXUP_ASUS_DACS] = { 9428 .type = HDA_FIXUP_FUNC, 9429 .v.func = alc295_fixup_asus_dacs, 9430 }, 9431 [ALC295_FIXUP_HP_OMEN] = { 9432 .type = HDA_FIXUP_PINS, 9433 .v.pins = (const struct hda_pintbl[]) { 9434 { 0x12, 0xb7a60130 }, 9435 { 0x13, 0x40000000 }, 9436 { 0x14, 0x411111f0 }, 9437 { 0x16, 0x411111f0 }, 9438 { 0x17, 0x90170110 }, 9439 { 0x18, 0x411111f0 }, 9440 { 0x19, 0x02a11030 }, 9441 { 0x1a, 0x411111f0 }, 9442 { 0x1b, 0x04a19030 }, 9443 { 0x1d, 0x40600001 }, 9444 { 0x1e, 0x411111f0 }, 9445 { 0x21, 0x03211020 }, 9446 {} 9447 }, 9448 .chained = true, 9449 .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED, 9450 }, 9451 [ALC285_FIXUP_HP_SPECTRE_X360] = { 9452 .type = HDA_FIXUP_FUNC, 9453 .v.func = alc285_fixup_hp_spectre_x360, 9454 }, 9455 [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = { 9456 .type = HDA_FIXUP_FUNC, 9457 .v.func = alc285_fixup_hp_spectre_x360_eb1 9458 }, 9459 [ALC285_FIXUP_HP_ENVY_X360] = { 9460 .type = HDA_FIXUP_FUNC, 9461 .v.func = alc285_fixup_hp_envy_x360, 9462 .chained = true, 9463 .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT, 9464 }, 9465 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { 9466 .type = HDA_FIXUP_FUNC, 9467 .v.func = alc285_fixup_ideapad_s740_coef, 9468 .chained = true, 9469 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 9470 }, 9471 [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = { 9472 .type = HDA_FIXUP_FUNC, 9473 .v.func = alc_fixup_no_shutup, 9474 .chained = true, 9475 .chain_id = ALC283_FIXUP_HEADSET_MIC, 9476 }, 9477 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = { 9478 .type = HDA_FIXUP_PINS, 9479 .v.pins = (const struct hda_pintbl[]) { 9480 { 0x21, 0x03211030 }, /* Change the Headphone location to Left */ 9481 { } 9482 }, 9483 .chained = true, 9484 .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC 9485 }, 9486 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { 9487 .type = HDA_FIXUP_FUNC, 9488 .v.func = alc269_fixup_limit_int_mic_boost, 9489 .chained = true, 9490 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 9491 }, 9492 [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = { 9493 .type = HDA_FIXUP_FUNC, 9494 .v.func = alc285_fixup_ideapad_s740_coef, 9495 .chained = true, 9496 .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 9497 }, 9498 [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = { 9499 .type = HDA_FIXUP_FUNC, 9500 .v.func = alc287_fixup_legion_15imhg05_speakers, 9501 .chained = true, 9502 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9503 }, 9504 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { 9505 .type = HDA_FIXUP_VERBS, 9506 //.v.verbs = legion_15imhg05_coefs, 9507 .v.verbs = (const struct hda_verb[]) { 9508 // set left speaker Legion 7i. 9509 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9510 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 9511 9512 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9513 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9514 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9515 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 9516 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9517 9518 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9519 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9520 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9521 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9522 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9523 9524 // set right speaker Legion 7i. 9525 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9526 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 9527 9528 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9529 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9530 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9531 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 9532 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9533 9534 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9535 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9536 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9537 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9538 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9539 {} 9540 }, 9541 .chained = true, 9542 .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 9543 }, 9544 [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = { 9545 .type = HDA_FIXUP_FUNC, 9546 .v.func = alc287_fixup_legion_15imhg05_speakers, 9547 .chained = true, 9548 .chain_id = ALC269_FIXUP_HEADSET_MODE, 9549 }, 9550 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = { 9551 .type = HDA_FIXUP_VERBS, 9552 .v.verbs = (const struct hda_verb[]) { 9553 // set left speaker Yoga 7i. 9554 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9555 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 9556 9557 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9558 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9559 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9560 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 9561 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9562 9563 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9564 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9565 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9566 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9567 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9568 9569 // set right speaker Yoga 7i. 9570 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9571 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 9572 9573 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9574 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9575 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9576 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 9577 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9578 9579 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9580 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9581 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9582 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9583 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9584 {} 9585 }, 9586 .chained = true, 9587 .chain_id = ALC269_FIXUP_HEADSET_MODE, 9588 }, 9589 [ALC298_FIXUP_LENOVO_C940_DUET7] = { 9590 .type = HDA_FIXUP_FUNC, 9591 .v.func = alc298_fixup_lenovo_c940_duet7, 9592 }, 9593 [ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = { 9594 .type = HDA_FIXUP_FUNC, 9595 .v.func = alc287_fixup_lenovo_14irp8_duetitl, 9596 }, 9597 [ALC287_FIXUP_LENOVO_LEGION_7] = { 9598 .type = HDA_FIXUP_FUNC, 9599 .v.func = alc287_fixup_lenovo_legion_7, 9600 }, 9601 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { 9602 .type = HDA_FIXUP_VERBS, 9603 .v.verbs = (const struct hda_verb[]) { 9604 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9605 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 9606 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9607 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9608 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9609 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9610 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9611 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9612 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 9613 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9614 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9615 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9616 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9617 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9618 {} 9619 }, 9620 .chained = true, 9621 .chain_id = ALC269_FIXUP_HEADSET_MODE, 9622 }, 9623 [ALC256_FIXUP_SET_COEF_DEFAULTS] = { 9624 .type = HDA_FIXUP_FUNC, 9625 .v.func = alc256_fixup_set_coef_defaults, 9626 }, 9627 [ALC245_FIXUP_HP_GPIO_LED] = { 9628 .type = HDA_FIXUP_FUNC, 9629 .v.func = alc245_fixup_hp_gpio_led, 9630 }, 9631 [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { 9632 .type = HDA_FIXUP_PINS, 9633 .v.pins = (const struct hda_pintbl[]) { 9634 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */ 9635 { } 9636 }, 9637 .chained = true, 9638 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 9639 }, 9640 [ALC233_FIXUP_NO_AUDIO_JACK] = { 9641 .type = HDA_FIXUP_FUNC, 9642 .v.func = alc233_fixup_no_audio_jack, 9643 }, 9644 [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = { 9645 .type = HDA_FIXUP_FUNC, 9646 .v.func = alc256_fixup_mic_no_presence_and_resume, 9647 .chained = true, 9648 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9649 }, 9650 [ALC287_FIXUP_LEGION_16ACHG6] = { 9651 .type = HDA_FIXUP_FUNC, 9652 .v.func = alc287_fixup_legion_16achg6_speakers, 9653 }, 9654 [ALC287_FIXUP_CS35L41_I2C_2] = { 9655 .type = HDA_FIXUP_FUNC, 9656 .v.func = cs35l41_fixup_i2c_two, 9657 }, 9658 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = { 9659 .type = HDA_FIXUP_FUNC, 9660 .v.func = cs35l41_fixup_i2c_two, 9661 .chained = true, 9662 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9663 }, 9664 [ALC287_FIXUP_CS35L41_I2C_4] = { 9665 .type = HDA_FIXUP_FUNC, 9666 .v.func = cs35l41_fixup_i2c_four, 9667 }, 9668 [ALC245_FIXUP_CS35L41_SPI_2] = { 9669 .type = HDA_FIXUP_FUNC, 9670 .v.func = cs35l41_fixup_spi_two, 9671 }, 9672 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = { 9673 .type = HDA_FIXUP_FUNC, 9674 .v.func = cs35l41_fixup_spi_two, 9675 .chained = true, 9676 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 9677 }, 9678 [ALC245_FIXUP_CS35L41_SPI_4] = { 9679 .type = HDA_FIXUP_FUNC, 9680 .v.func = cs35l41_fixup_spi_four, 9681 }, 9682 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = { 9683 .type = HDA_FIXUP_FUNC, 9684 .v.func = cs35l41_fixup_spi_four, 9685 .chained = true, 9686 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 9687 }, 9688 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { 9689 .type = HDA_FIXUP_VERBS, 9690 .v.verbs = (const struct hda_verb[]) { 9691 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, 9692 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, 9693 { } 9694 }, 9695 .chained = true, 9696 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9697 }, 9698 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = { 9699 .type = HDA_FIXUP_FUNC, 9700 .v.func = alc_fixup_dell4_mic_no_presence_quiet, 9701 .chained = true, 9702 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 9703 }, 9704 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = { 9705 .type = HDA_FIXUP_PINS, 9706 .v.pins = (const struct hda_pintbl[]) { 9707 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */ 9708 { } 9709 }, 9710 .chained = true, 9711 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9712 }, 9713 [ALC287_FIXUP_LEGION_16ITHG6] = { 9714 .type = HDA_FIXUP_FUNC, 9715 .v.func = alc287_fixup_legion_16ithg6_speakers, 9716 }, 9717 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = { 9718 .type = HDA_FIXUP_VERBS, 9719 .v.verbs = (const struct hda_verb[]) { 9720 // enable left speaker 9721 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9722 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 9723 9724 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9725 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9726 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9727 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 9728 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9729 9730 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9731 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 9732 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9733 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 9734 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9735 9736 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9737 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 9738 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9739 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 }, 9740 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9741 9742 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9743 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9744 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9745 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9746 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9747 9748 // enable right speaker 9749 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 9750 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 9751 9752 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9753 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 9754 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9755 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 9756 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9757 9758 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9759 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 9760 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9761 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 9762 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9763 9764 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9765 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 9766 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9767 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 }, 9768 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9769 9770 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 9771 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 9772 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9773 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 9774 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 9775 9776 { }, 9777 }, 9778 }, 9779 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = { 9780 .type = HDA_FIXUP_FUNC, 9781 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 9782 .chained = true, 9783 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 9784 }, 9785 [ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7] = { 9786 .type = HDA_FIXUP_FUNC, 9787 .v.func = alc287_fixup_lenovo_14arp8_legion_iah7, 9788 }, 9789 [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { 9790 .type = HDA_FIXUP_FUNC, 9791 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 9792 .chained = true, 9793 .chain_id = ALC287_FIXUP_CS35L41_I2C_2, 9794 }, 9795 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { 9796 .type = HDA_FIXUP_FUNC, 9797 .v.func = alc295_fixup_dell_inspiron_top_speakers, 9798 .chained = true, 9799 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 9800 }, 9801 [ALC236_FIXUP_DELL_DUAL_CODECS] = { 9802 .type = HDA_FIXUP_PINS, 9803 .v.func = alc1220_fixup_gb_dual_codecs, 9804 .chained = true, 9805 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 9806 }, 9807 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = { 9808 .type = HDA_FIXUP_FUNC, 9809 .v.func = cs35l41_fixup_i2c_two, 9810 .chained = true, 9811 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 9812 }, 9813 [ALC287_FIXUP_TAS2781_I2C] = { 9814 .type = HDA_FIXUP_FUNC, 9815 .v.func = tas2781_fixup_i2c, 9816 .chained = true, 9817 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 9818 }, 9819 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = { 9820 .type = HDA_FIXUP_FUNC, 9821 .v.func = yoga7_14arb7_fixup_i2c, 9822 .chained = true, 9823 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 9824 }, 9825 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = { 9826 .type = HDA_FIXUP_FUNC, 9827 .v.func = alc245_fixup_hp_mute_led_coefbit, 9828 }, 9829 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = { 9830 .type = HDA_FIXUP_FUNC, 9831 .v.func = alc245_fixup_hp_mute_led_coefbit, 9832 .chained = true, 9833 .chain_id = ALC245_FIXUP_HP_GPIO_LED 9834 }, 9835 [ALC287_FIXUP_THINKPAD_I2S_SPK] = { 9836 .type = HDA_FIXUP_FUNC, 9837 .v.func = alc287_fixup_bind_dacs, 9838 .chained = true, 9839 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 9840 }, 9841 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = { 9842 .type = HDA_FIXUP_FUNC, 9843 .v.func = alc287_fixup_bind_dacs, 9844 .chained = true, 9845 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 9846 }, 9847 [ALC2XX_FIXUP_HEADSET_MIC] = { 9848 .type = HDA_FIXUP_FUNC, 9849 .v.func = alc_fixup_headset_mic, 9850 }, 9851 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = { 9852 .type = HDA_FIXUP_FUNC, 9853 .v.func = cs35l41_fixup_spi_two, 9854 .chained = true, 9855 .chain_id = ALC289_FIXUP_DUAL_SPK 9856 }, 9857 [ALC294_FIXUP_CS35L41_I2C_2] = { 9858 .type = HDA_FIXUP_FUNC, 9859 .v.func = cs35l41_fixup_i2c_two, 9860 }, 9861 [ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED] = { 9862 .type = HDA_FIXUP_FUNC, 9863 .v.func = cs35l56_fixup_spi_four, 9864 .chained = true, 9865 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 9866 }, 9867 [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = { 9868 .type = HDA_FIXUP_FUNC, 9869 .v.func = alc256_fixup_acer_sfg16_micmute_led, 9870 }, 9871 [ALC256_FIXUP_HEADPHONE_AMP_VOL] = { 9872 .type = HDA_FIXUP_FUNC, 9873 .v.func = alc256_decrease_headphone_amp_val, 9874 }, 9875 [ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = { 9876 .type = HDA_FIXUP_FUNC, 9877 .v.func = alc245_fixup_hp_spectre_x360_eu0xxx, 9878 }, 9879 [ALC285_FIXUP_CS35L56_SPI_2] = { 9880 .type = HDA_FIXUP_FUNC, 9881 .v.func = cs35l56_fixup_spi_two, 9882 }, 9883 [ALC285_FIXUP_CS35L56_I2C_2] = { 9884 .type = HDA_FIXUP_FUNC, 9885 .v.func = cs35l56_fixup_i2c_two, 9886 }, 9887 [ALC285_FIXUP_CS35L56_I2C_4] = { 9888 .type = HDA_FIXUP_FUNC, 9889 .v.func = cs35l56_fixup_i2c_four, 9890 }, 9891 [ALC285_FIXUP_ASUS_GA403U] = { 9892 .type = HDA_FIXUP_FUNC, 9893 .v.func = alc285_fixup_asus_ga403u, 9894 }, 9895 [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = { 9896 .type = HDA_FIXUP_PINS, 9897 .v.pins = (const struct hda_pintbl[]) { 9898 { 0x19, 0x03a11050 }, 9899 { 0x1b, 0x03a11c30 }, 9900 { } 9901 }, 9902 .chained = true, 9903 .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1 9904 }, 9905 [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = { 9906 .type = HDA_FIXUP_FUNC, 9907 .v.func = alc285_fixup_speaker2_to_dac1, 9908 .chained = true, 9909 .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 9910 }, 9911 [ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = { 9912 .type = HDA_FIXUP_PINS, 9913 .v.pins = (const struct hda_pintbl[]) { 9914 { 0x19, 0x03a11050 }, 9915 { 0x1b, 0x03a11c30 }, 9916 { } 9917 }, 9918 .chained = true, 9919 .chain_id = ALC285_FIXUP_CS35L56_SPI_2 9920 }, 9921 [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = { 9922 .type = HDA_FIXUP_FUNC, 9923 .v.func = alc285_fixup_speaker2_to_dac1, 9924 .chained = true, 9925 .chain_id = ALC285_FIXUP_ASUS_GA403U, 9926 }, 9927 [ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = { 9928 .type = HDA_FIXUP_FUNC, 9929 .v.func = alc287_fixup_lenovo_thinkpad_with_alc1318, 9930 .chained = true, 9931 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 9932 }, 9933 [ALC256_FIXUP_CHROME_BOOK] = { 9934 .type = HDA_FIXUP_FUNC, 9935 .v.func = alc256_fixup_chromebook, 9936 .chained = true, 9937 .chain_id = ALC225_FIXUP_HEADSET_JACK 9938 }, 9939 [ALC287_FIXUP_LENOVO_SSID_17AA3820] = { 9940 .type = HDA_FIXUP_FUNC, 9941 .v.func = alc287_fixup_lenovo_ssid_17aa3820, 9942 }, 9943 [ALCXXX_FIXUP_CS35LXX] = { 9944 .type = HDA_FIXUP_FUNC, 9945 .v.func = cs35lxx_autodet_fixup, 9946 }, 9947 }; 9948 9949 static const struct snd_pci_quirk alc269_fixup_tbl[] = { 9950 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC), 9951 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), 9952 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), 9953 SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), 9954 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 9955 SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), 9956 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), 9957 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 9958 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 9959 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), 9960 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 9961 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF), 9962 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), 9963 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK), 9964 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE), 9965 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC), 9966 SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK), 9967 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), 9968 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9969 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9970 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK), 9971 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK), 9972 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), 9973 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 9974 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), 9975 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), 9976 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9977 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9978 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9979 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9980 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), 9981 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9982 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9983 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9984 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), 9985 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), 9986 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9987 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9988 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9989 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 9990 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9991 SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED), 9992 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 9993 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), 9994 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), 9995 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), 9996 SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X), 9997 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X), 9998 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X), 9999 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER), 10000 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10001 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10002 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10003 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10004 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10005 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X), 10006 SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X), 10007 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), 10008 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10009 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10010 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13), 10011 SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 10012 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK), 10013 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 10014 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10015 SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10016 SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10017 SND_PCI_QUIRK(0x1028, 0x06dd, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10018 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10019 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10020 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 10021 SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 10022 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), 10023 SND_PCI_QUIRK(0x1028, 0x0738, "Dell Precision 5820", ALC269_FIXUP_NO_SHUTUP), 10024 SND_PCI_QUIRK(0x1028, 0x075c, "Dell XPS 27 7760", ALC298_FIXUP_SPK_VOLUME), 10025 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), 10026 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 10027 SND_PCI_QUIRK(0x1028, 0x07b0, "Dell Precision 7520", ALC295_FIXUP_DISABLE_DAC3), 10028 SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE), 10029 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10030 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10031 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 10032 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 10033 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB), 10034 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE), 10035 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE), 10036 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 10037 SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 10038 SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 10039 SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 10040 SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), 10041 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 10042 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 10043 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET), 10044 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), 10045 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), 10046 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK), 10047 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10048 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10049 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), 10050 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), 10051 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 10052 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 10053 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10054 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10055 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10056 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10057 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10058 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10059 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10060 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10061 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10062 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10063 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10064 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10065 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10066 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10067 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4), 10068 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10069 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10070 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10071 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10072 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10073 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10074 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10075 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10076 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10077 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10078 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 10079 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 10080 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), 10081 SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), 10082 SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10083 SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10084 SND_PCI_QUIRK(0x103c, 0x2214, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10085 SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10086 SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC), 10087 SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10088 SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10089 SND_PCI_QUIRK(0x103c, 0x2236, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10090 SND_PCI_QUIRK(0x103c, 0x2237, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10091 SND_PCI_QUIRK(0x103c, 0x2238, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10092 SND_PCI_QUIRK(0x103c, 0x2239, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10093 SND_PCI_QUIRK(0x103c, 0x224b, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10094 SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10095 SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10096 SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10097 SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10098 SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10099 SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10100 SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED), 10101 SND_PCI_QUIRK(0x103c, 0x225f, "HP", ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY), 10102 SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10103 SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10104 SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10105 SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10106 SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10107 SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10108 SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10109 SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10110 SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED), 10111 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10112 SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC280_FIXUP_HP_DOCK_PINS), 10113 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10114 SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC280_FIXUP_HP_DOCK_PINS), 10115 SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10116 SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10117 SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10118 SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10119 SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10120 SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10121 SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10122 SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10123 SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10124 SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10125 SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10126 SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10127 SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10128 SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10129 SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M), 10130 SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10131 SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), 10132 SND_PCI_QUIRK(0x103c, 0x2334, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10133 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10134 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10135 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10136 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE), 10137 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10138 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10139 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 10140 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 10141 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360), 10142 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), 10143 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360), 10144 SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10145 SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10146 SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10147 SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10148 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10149 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10150 SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED), 10151 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10152 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN), 10153 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), 10154 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), 10155 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10156 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360), 10157 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10158 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10159 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 10160 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10161 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 10162 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10163 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10164 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), 10165 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10166 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10167 SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED), 10168 SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED), 10169 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED), 10170 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10171 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10172 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10173 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED), 10174 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10175 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), 10176 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), 10177 SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation", 10178 ALC285_FIXUP_HP_GPIO_AMP_INIT), 10179 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 10180 ALC285_FIXUP_HP_GPIO_AMP_INIT), 10181 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10182 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10183 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10184 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10185 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), 10186 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10187 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10188 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10189 SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10190 SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10191 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), 10192 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), 10193 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 10194 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 10195 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10196 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10197 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10198 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10199 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10200 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10201 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10202 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10203 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10204 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 10205 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10206 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10207 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10208 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10209 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10210 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10211 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10212 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), 10213 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), 10214 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), 10215 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10216 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED), 10217 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED), 10218 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10219 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED), 10220 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10221 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10222 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10223 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10224 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10225 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10226 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10227 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED), 10228 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4), 10229 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 10230 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 10231 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10232 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2), 10233 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10234 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2), 10235 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED), 10236 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED), 10237 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED), 10238 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED), 10239 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED), 10240 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10241 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10242 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10243 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10244 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10245 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10246 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED), 10247 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10248 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 10249 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2), 10250 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10251 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10252 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10253 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10254 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10255 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10256 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10257 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10258 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4), 10259 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 10260 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10261 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), 10262 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED), 10263 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED), 10264 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED), 10265 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED), 10266 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10267 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10268 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10269 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10270 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10271 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10272 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10273 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED), 10274 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10275 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10276 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10277 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10278 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10279 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10280 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10281 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10282 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10283 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10284 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10285 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10286 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10287 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10288 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10289 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2), 10290 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED), 10291 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED), 10292 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED), 10293 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED), 10294 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED), 10295 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED), 10296 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10297 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10298 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10299 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10300 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10301 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10302 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10303 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10304 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10305 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10306 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10307 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10308 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10309 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10310 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10311 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10312 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10313 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10314 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED), 10315 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10316 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2), 10317 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2), 10318 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10319 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10320 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10321 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10322 SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 10323 SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 10324 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 10325 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10326 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10327 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED), 10328 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED), 10329 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10330 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10331 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 10332 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 10333 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10334 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10335 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10336 SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10337 SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10338 SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10339 SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10340 SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10341 SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10342 SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10343 SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 10344 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED), 10345 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 10346 SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED), 10347 SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 10348 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED), 10349 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 10350 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10351 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10352 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 10353 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 10354 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10355 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10356 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 10357 SND_PCI_QUIRK(0x103c, 0x8cde, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 10358 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10359 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10360 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10361 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALCXXX_FIXUP_CS35LXX), 10362 SND_PCI_QUIRK(0x103c, 0x8d08, "HP EliteBook 1045 14 G12", ALCXXX_FIXUP_CS35LXX), 10363 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 1040 14 G12", ALCXXX_FIXUP_CS35LXX), 10364 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite x360 1040 14 G12", ALCXXX_FIXUP_CS35LXX), 10365 SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 830 13 G12", ALCXXX_FIXUP_CS35LXX), 10366 SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite x360 830 13 G12", ALCXXX_FIXUP_CS35LXX), 10367 SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 840 14 G12", ALCXXX_FIXUP_CS35LXX), 10368 SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 840 14 G12", ALCXXX_FIXUP_CS35LXX), 10369 SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 860 16 G12", ALCXXX_FIXUP_CS35LXX), 10370 SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALCXXX_FIXUP_CS35LXX), 10371 SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALCXXX_FIXUP_CS35LXX), 10372 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 10373 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), 10374 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10375 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK), 10376 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 10377 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10378 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK), 10379 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10380 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10381 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10382 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10383 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 10384 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 10385 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM), 10386 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10387 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 10388 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), 10389 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 10390 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 10391 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 10392 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10393 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10394 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC), 10395 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10396 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10397 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10398 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2), 10399 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2), 10400 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), 10401 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2), 10402 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC), 10403 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), 10404 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), 10405 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), 10406 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2), 10407 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 10408 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2), 10409 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 10410 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2), 10411 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), 10412 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 10413 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY), 10414 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2), 10415 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), 10416 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), 10417 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2), 10418 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), 10419 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE), 10420 SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401), 10421 SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE), 10422 SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), 10423 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), 10424 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 10425 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), 10426 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2), 10427 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), 10428 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10429 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), 10430 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), 10431 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 10432 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 10433 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2), 10434 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10435 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2), 10436 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2), 10437 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 10438 SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 10439 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 10440 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10441 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10442 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), 10443 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), 10444 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10445 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), 10446 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2), 10447 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), 10448 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), 10449 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2), 10450 SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606", ALC285_FIXUP_CS35L56_I2C_4), 10451 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2), 10452 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), 10453 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), 10454 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), 10455 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), 10456 SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_CS35L56_I2C_2), 10457 SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_CS35L56_I2C_2), 10458 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), 10459 SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2), 10460 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2), 10461 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), 10462 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 10463 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), 10464 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2), 10465 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), 10466 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), 10467 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), 10468 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10469 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10470 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10471 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10472 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10473 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), 10474 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), 10475 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 10476 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 10477 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), 10478 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), 10479 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 10480 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 10481 SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX), 10482 SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 10483 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 10484 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), 10485 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), 10486 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 10487 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), 10488 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 10489 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 10490 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), 10491 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), 10492 SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 10493 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10494 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10495 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10496 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10497 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10498 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10499 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10500 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 10501 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 10502 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 10503 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), 10504 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), 10505 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 10506 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP), 10507 SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP), 10508 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP), 10509 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), 10510 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), 10511 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), 10512 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 10513 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP), 10514 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP), 10515 SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG-KB1US)", ALC298_FIXUP_SAMSUNG_AMP2), 10516 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), 10517 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), 10518 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), 10519 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK), 10520 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC), 10521 SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10522 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10523 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10524 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10525 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10526 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10527 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10528 SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10529 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10530 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10531 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10532 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10533 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10534 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10535 SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10536 SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10537 SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10538 SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10539 SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10540 SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10541 SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10542 SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10543 SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10544 SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10545 SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10546 SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10547 SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10548 SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10549 SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10550 SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10551 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10552 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10553 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10554 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10555 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10556 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10557 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10558 SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10559 SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10560 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10561 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10562 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10563 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10564 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10565 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10566 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10567 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10568 SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10569 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10570 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10571 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10572 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10573 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 10574 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 10575 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC), 10576 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10577 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10578 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10579 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10580 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10581 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME), 10582 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10583 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10584 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10585 SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10586 SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10587 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10588 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10589 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10590 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10591 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10592 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10593 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10594 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10595 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10596 SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10597 SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10598 SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10599 SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10600 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), 10601 SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 10602 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), 10603 SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), 10604 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), 10605 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), 10606 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), 10607 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), 10608 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST), 10609 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), 10610 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), 10611 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 10612 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), 10613 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440), 10614 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), 10615 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK), 10616 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK), 10617 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK), 10618 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK), 10619 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10620 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK), 10621 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), 10622 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), 10623 SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10624 SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10625 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460), 10626 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 10627 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C), 10628 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK), 10629 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10630 SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10631 SND_PCI_QUIRK(0x17aa, 0x2249, "Thinkpad", ALC292_FIXUP_TPT460), 10632 SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10633 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10634 SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10635 SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10636 SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 10637 SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), 10638 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 10639 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 10640 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10641 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10642 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10643 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10644 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10645 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10646 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10647 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10648 SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 10649 SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 10650 SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C), 10651 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 10652 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 10653 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 10654 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 10655 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 10656 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 10657 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 10658 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10659 SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10660 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10661 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 10662 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC), 10663 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 10664 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL), 10665 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10666 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), 10667 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 10668 SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330 / Yoga Duet 7", ALC287_FIXUP_LENOVO_SSID_17AA3820), 10669 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10670 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), 10671 SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10672 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10673 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), 10674 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6), 10675 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10676 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10677 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10678 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), 10679 SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 10680 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 10681 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 10682 SND_PCI_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7 / Yoga Pro 7 14ARP8", ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7), 10683 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7/7i", ALC287_FIXUP_LENOVO_LEGION_7), 10684 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C), 10685 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 10686 SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 10687 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), 10688 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C), 10689 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C), 10690 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 10691 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 10692 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 10693 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 10694 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C), 10695 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C), 10696 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10697 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10698 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 10699 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 10700 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 10701 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 10702 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C), 10703 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C), 10704 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C), 10705 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C), 10706 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C), 10707 SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 10708 SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 10709 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 10710 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 10711 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 10712 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 10713 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), 10714 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), 10715 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 10716 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 10717 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 10718 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 10719 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10720 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), 10721 SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK), 10722 SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10723 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK), 10724 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK), 10725 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK), 10726 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK), 10727 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE), 10728 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460), 10729 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460), 10730 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460), 10731 SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10732 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10733 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10734 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10735 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10736 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10737 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10738 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 10739 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 10740 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), 10741 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), 10742 SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL), 10743 SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL), 10744 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), 10745 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10746 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20), 10747 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), 10748 SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), 10749 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ 10750 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), 10751 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 10752 SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10753 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE), 10754 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), 10755 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), 10756 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP), 10757 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10758 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10759 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10760 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 10761 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 10762 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), 10763 SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), 10764 SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 10765 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10766 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), 10767 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), 10768 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), 10769 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10770 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10771 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), 10772 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), 10773 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), 10774 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 10775 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 10776 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK), 10777 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 10778 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 10779 SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 10780 10781 #if 0 10782 /* Below is a quirk table taken from the old code. 10783 * Basically the device should work as is without the fixup table. 10784 * If BIOS doesn't give a proper info, enable the corresponding 10785 * fixup entry. 10786 */ 10787 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", 10788 ALC269_FIXUP_AMIC), 10789 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC), 10790 SND_PCI_QUIRK(0x1043, 0x1143, "ASUS B53f", ALC269_FIXUP_AMIC), 10791 SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_FIXUP_AMIC), 10792 SND_PCI_QUIRK(0x1043, 0x1183, "ASUS K72DR", ALC269_FIXUP_AMIC), 10793 SND_PCI_QUIRK(0x1043, 0x11b3, "ASUS K52DR", ALC269_FIXUP_AMIC), 10794 SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269_FIXUP_AMIC), 10795 SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269_FIXUP_AMIC), 10796 SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_FIXUP_AMIC), 10797 SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269_FIXUP_AMIC), 10798 SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_FIXUP_AMIC), 10799 SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_FIXUP_AMIC), 10800 SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_FIXUP_AMIC), 10801 SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_FIXUP_AMIC), 10802 SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_FIXUP_AMIC), 10803 SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_FIXUP_AMIC), 10804 SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_FIXUP_AMIC), 10805 SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_FIXUP_AMIC), 10806 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_FIXUP_AMIC), 10807 SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_FIXUP_AMIC), 10808 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_FIXUP_AMIC), 10809 SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_FIXUP_AMIC), 10810 SND_PCI_QUIRK(0x1043, 0x1593, "ASUS N51Vn", ALC269_FIXUP_AMIC), 10811 SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_FIXUP_AMIC), 10812 SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_FIXUP_AMIC), 10813 SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_FIXUP_AMIC), 10814 SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_FIXUP_AMIC), 10815 SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_FIXUP_AMIC), 10816 SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_FIXUP_AMIC), 10817 SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_FIXUP_AMIC), 10818 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_FIXUP_AMIC), 10819 SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_FIXUP_AMIC), 10820 SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_FIXUP_AMIC), 10821 SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_FIXUP_AMIC), 10822 SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_FIXUP_AMIC), 10823 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_FIXUP_DMIC), 10824 SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_FIXUP_AMIC), 10825 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_AMIC), 10826 SND_PCI_QUIRK(0x17ff, 0x059a, "Quanta EL3", ALC269_FIXUP_DMIC), 10827 SND_PCI_QUIRK(0x17ff, 0x059b, "Quanta JR1", ALC269_FIXUP_DMIC), 10828 #endif 10829 {} 10830 }; 10831 10832 static const struct snd_pci_quirk alc269_fixup_vendor_tbl[] = { 10833 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), 10834 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), 10835 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 10836 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), 10837 SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED), 10838 {} 10839 }; 10840 10841 static const struct hda_model_fixup alc269_fixup_models[] = { 10842 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"}, 10843 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"}, 10844 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, 10845 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, 10846 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, 10847 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, 10848 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"}, 10849 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"}, 10850 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, 10851 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"}, 10852 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 10853 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"}, 10854 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 10855 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, 10856 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"}, 10857 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"}, 10858 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"}, 10859 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, 10860 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, 10861 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, 10862 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"}, 10863 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"}, 10864 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"}, 10865 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 10866 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"}, 10867 {.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"}, 10868 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"}, 10869 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"}, 10870 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"}, 10871 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"}, 10872 {.id = ALC269_FIXUP_PCM_44K, .name = "pcm44k"}, 10873 {.id = ALC269_FIXUP_LIFEBOOK, .name = "lifebook"}, 10874 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"}, 10875 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"}, 10876 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"}, 10877 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"}, 10878 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"}, 10879 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"}, 10880 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"}, 10881 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"}, 10882 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"}, 10883 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"}, 10884 {.id = ALC269_FIXUP_NO_SHUTUP, .name = "noshutup"}, 10885 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"}, 10886 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"}, 10887 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"}, 10888 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"}, 10889 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"}, 10890 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"}, 10891 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"}, 10892 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"}, 10893 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"}, 10894 {.id = ALC269VB_FIXUP_ORDISSIMO_EVE2, .name = "ordissimo"}, 10895 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"}, 10896 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"}, 10897 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"}, 10898 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"}, 10899 {.id = ALC269_FIXUP_THINKPAD_ACPI, .name = "thinkpad"}, 10900 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"}, 10901 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"}, 10902 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"}, 10903 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"}, 10904 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"}, 10905 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"}, 10906 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"}, 10907 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"}, 10908 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"}, 10909 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"}, 10910 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"}, 10911 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 10912 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"}, 10913 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"}, 10914 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"}, 10915 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"}, 10916 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"}, 10917 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"}, 10918 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"}, 10919 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"}, 10920 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"}, 10921 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"}, 10922 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"}, 10923 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"}, 10924 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"}, 10925 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"}, 10926 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"}, 10927 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"}, 10928 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"}, 10929 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"}, 10930 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"}, 10931 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"}, 10932 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"}, 10933 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"}, 10934 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"}, 10935 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"}, 10936 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"}, 10937 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"}, 10938 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"}, 10939 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"}, 10940 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"}, 10941 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"}, 10942 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"}, 10943 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"}, 10944 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"}, 10945 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"}, 10946 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"}, 10947 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, 10948 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, 10949 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"}, 10950 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, 10951 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, 10952 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, 10953 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, 10954 {.id = ALC298_FIXUP_SAMSUNG_AMP2, .name = "alc298-samsung-amp2"}, 10955 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, 10956 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, 10957 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"}, 10958 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"}, 10959 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, 10960 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, 10961 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 10962 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"}, 10963 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, 10964 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"}, 10965 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, 10966 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, 10967 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, 10968 {} 10969 }; 10970 #define ALC225_STANDARD_PINS \ 10971 {0x21, 0x04211020} 10972 10973 #define ALC256_STANDARD_PINS \ 10974 {0x12, 0x90a60140}, \ 10975 {0x14, 0x90170110}, \ 10976 {0x21, 0x02211020} 10977 10978 #define ALC282_STANDARD_PINS \ 10979 {0x14, 0x90170110} 10980 10981 #define ALC290_STANDARD_PINS \ 10982 {0x12, 0x99a30130} 10983 10984 #define ALC292_STANDARD_PINS \ 10985 {0x14, 0x90170110}, \ 10986 {0x15, 0x0221401f} 10987 10988 #define ALC295_STANDARD_PINS \ 10989 {0x12, 0xb7a60130}, \ 10990 {0x14, 0x90170110}, \ 10991 {0x21, 0x04211020} 10992 10993 #define ALC298_STANDARD_PINS \ 10994 {0x12, 0x90a60130}, \ 10995 {0x21, 0x03211020} 10996 10997 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 10998 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC, 10999 {0x14, 0x01014020}, 11000 {0x17, 0x90170110}, 11001 {0x18, 0x02a11030}, 11002 {0x19, 0x0181303F}, 11003 {0x21, 0x0221102f}), 11004 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 11005 {0x12, 0x90a601c0}, 11006 {0x14, 0x90171120}, 11007 {0x21, 0x02211030}), 11008 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 11009 {0x14, 0x90170110}, 11010 {0x1b, 0x90a70130}, 11011 {0x21, 0x03211020}), 11012 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1043, "ASUS", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 11013 {0x1a, 0x90a70130}, 11014 {0x1b, 0x90170110}, 11015 {0x21, 0x03211020}), 11016 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11017 ALC225_STANDARD_PINS, 11018 {0x12, 0xb7a60130}, 11019 {0x14, 0x901701a0}), 11020 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11021 ALC225_STANDARD_PINS, 11022 {0x12, 0xb7a60130}, 11023 {0x14, 0x901701b0}), 11024 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11025 ALC225_STANDARD_PINS, 11026 {0x12, 0xb7a60150}, 11027 {0x14, 0x901701a0}), 11028 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11029 ALC225_STANDARD_PINS, 11030 {0x12, 0xb7a60150}, 11031 {0x14, 0x901701b0}), 11032 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 11033 ALC225_STANDARD_PINS, 11034 {0x12, 0xb7a60130}, 11035 {0x1b, 0x90170110}), 11036 SND_HDA_PIN_QUIRK(0x10ec0233, 0x8086, "Intel NUC Skull Canyon", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11037 {0x1b, 0x01111010}, 11038 {0x1e, 0x01451130}, 11039 {0x21, 0x02211020}), 11040 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 11041 {0x12, 0x90a60140}, 11042 {0x14, 0x90170110}, 11043 {0x19, 0x02a11030}, 11044 {0x21, 0x02211020}), 11045 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11046 {0x14, 0x90170110}, 11047 {0x19, 0x02a11030}, 11048 {0x1a, 0x02a11040}, 11049 {0x1b, 0x01014020}, 11050 {0x21, 0x0221101f}), 11051 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11052 {0x14, 0x90170110}, 11053 {0x19, 0x02a11030}, 11054 {0x1a, 0x02a11040}, 11055 {0x1b, 0x01011020}, 11056 {0x21, 0x0221101f}), 11057 SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, 11058 {0x14, 0x90170110}, 11059 {0x19, 0x02a11020}, 11060 {0x1a, 0x02a11030}, 11061 {0x21, 0x0221101f}), 11062 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC, 11063 {0x21, 0x02211010}), 11064 SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, 11065 {0x14, 0x90170110}, 11066 {0x19, 0x02a11020}, 11067 {0x21, 0x02211030}), 11068 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 11069 {0x14, 0x90170110}, 11070 {0x21, 0x02211020}), 11071 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11072 {0x14, 0x90170130}, 11073 {0x21, 0x02211040}), 11074 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11075 {0x12, 0x90a60140}, 11076 {0x14, 0x90170110}, 11077 {0x21, 0x02211020}), 11078 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11079 {0x12, 0x90a60160}, 11080 {0x14, 0x90170120}, 11081 {0x21, 0x02211030}), 11082 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11083 {0x14, 0x90170110}, 11084 {0x1b, 0x02011020}, 11085 {0x21, 0x0221101f}), 11086 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11087 {0x14, 0x90170110}, 11088 {0x1b, 0x01011020}, 11089 {0x21, 0x0221101f}), 11090 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11091 {0x14, 0x90170130}, 11092 {0x1b, 0x01014020}, 11093 {0x21, 0x0221103f}), 11094 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11095 {0x14, 0x90170130}, 11096 {0x1b, 0x01011020}, 11097 {0x21, 0x0221103f}), 11098 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11099 {0x14, 0x90170130}, 11100 {0x1b, 0x02011020}, 11101 {0x21, 0x0221103f}), 11102 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11103 {0x14, 0x90170150}, 11104 {0x1b, 0x02011020}, 11105 {0x21, 0x0221105f}), 11106 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11107 {0x14, 0x90170110}, 11108 {0x1b, 0x01014020}, 11109 {0x21, 0x0221101f}), 11110 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11111 {0x12, 0x90a60160}, 11112 {0x14, 0x90170120}, 11113 {0x17, 0x90170140}, 11114 {0x21, 0x0321102f}), 11115 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11116 {0x12, 0x90a60160}, 11117 {0x14, 0x90170130}, 11118 {0x21, 0x02211040}), 11119 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11120 {0x12, 0x90a60160}, 11121 {0x14, 0x90170140}, 11122 {0x21, 0x02211050}), 11123 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11124 {0x12, 0x90a60170}, 11125 {0x14, 0x90170120}, 11126 {0x21, 0x02211030}), 11127 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11128 {0x12, 0x90a60170}, 11129 {0x14, 0x90170130}, 11130 {0x21, 0x02211040}), 11131 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11132 {0x12, 0x90a60170}, 11133 {0x14, 0x90171130}, 11134 {0x21, 0x02211040}), 11135 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11136 {0x12, 0x90a60170}, 11137 {0x14, 0x90170140}, 11138 {0x21, 0x02211050}), 11139 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11140 {0x12, 0x90a60180}, 11141 {0x14, 0x90170130}, 11142 {0x21, 0x02211040}), 11143 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11144 {0x12, 0x90a60180}, 11145 {0x14, 0x90170120}, 11146 {0x21, 0x02211030}), 11147 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11148 {0x1b, 0x01011020}, 11149 {0x21, 0x02211010}), 11150 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, 11151 {0x14, 0x90170110}, 11152 {0x1b, 0x90a70130}, 11153 {0x21, 0x04211020}), 11154 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, 11155 {0x14, 0x90170110}, 11156 {0x1b, 0x90a70130}, 11157 {0x21, 0x03211020}), 11158 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11159 {0x12, 0x90a60130}, 11160 {0x14, 0x90170110}, 11161 {0x21, 0x03211020}), 11162 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11163 {0x12, 0x90a60130}, 11164 {0x14, 0x90170110}, 11165 {0x21, 0x04211020}), 11166 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 11167 {0x1a, 0x90a70130}, 11168 {0x1b, 0x90170110}, 11169 {0x21, 0x03211020}), 11170 SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, 11171 {0x14, 0x90170110}, 11172 {0x19, 0x02a11020}, 11173 {0x21, 0x0221101f}), 11174 SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC, 11175 {0x17, 0x90170110}, 11176 {0x19, 0x03a11030}, 11177 {0x21, 0x03211020}), 11178 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, 11179 {0x12, 0x90a60130}, 11180 {0x14, 0x90170110}, 11181 {0x15, 0x0421101f}, 11182 {0x1a, 0x04a11020}), 11183 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED, 11184 {0x12, 0x90a60140}, 11185 {0x14, 0x90170110}, 11186 {0x15, 0x0421101f}, 11187 {0x18, 0x02811030}, 11188 {0x1a, 0x04a1103f}, 11189 {0x1b, 0x02011020}), 11190 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP 15 Touchsmart", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11191 ALC282_STANDARD_PINS, 11192 {0x12, 0x99a30130}, 11193 {0x19, 0x03a11020}, 11194 {0x21, 0x0321101f}), 11195 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11196 ALC282_STANDARD_PINS, 11197 {0x12, 0x99a30130}, 11198 {0x19, 0x03a11020}, 11199 {0x21, 0x03211040}), 11200 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11201 ALC282_STANDARD_PINS, 11202 {0x12, 0x99a30130}, 11203 {0x19, 0x03a11030}, 11204 {0x21, 0x03211020}), 11205 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11206 ALC282_STANDARD_PINS, 11207 {0x12, 0x99a30130}, 11208 {0x19, 0x04a11020}, 11209 {0x21, 0x0421101f}), 11210 SND_HDA_PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED, 11211 ALC282_STANDARD_PINS, 11212 {0x12, 0x90a60140}, 11213 {0x19, 0x04a11030}, 11214 {0x21, 0x04211020}), 11215 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, 11216 ALC282_STANDARD_PINS, 11217 {0x12, 0x90a609c0}, 11218 {0x18, 0x03a11830}, 11219 {0x19, 0x04a19831}, 11220 {0x1a, 0x0481303f}, 11221 {0x1b, 0x04211020}, 11222 {0x21, 0x0321101f}), 11223 SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, 11224 ALC282_STANDARD_PINS, 11225 {0x12, 0x90a60940}, 11226 {0x18, 0x03a11830}, 11227 {0x19, 0x04a19831}, 11228 {0x1a, 0x0481303f}, 11229 {0x1b, 0x04211020}, 11230 {0x21, 0x0321101f}), 11231 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11232 ALC282_STANDARD_PINS, 11233 {0x12, 0x90a60130}, 11234 {0x21, 0x0321101f}), 11235 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11236 {0x12, 0x90a60160}, 11237 {0x14, 0x90170120}, 11238 {0x21, 0x02211030}), 11239 SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 11240 ALC282_STANDARD_PINS, 11241 {0x12, 0x90a60130}, 11242 {0x19, 0x03a11020}, 11243 {0x21, 0x0321101f}), 11244 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 11245 {0x12, 0x90a60130}, 11246 {0x14, 0x90170110}, 11247 {0x19, 0x04a11040}, 11248 {0x21, 0x04211020}), 11249 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, 11250 {0x14, 0x90170110}, 11251 {0x19, 0x04a11040}, 11252 {0x1d, 0x40600001}, 11253 {0x21, 0x04211020}), 11254 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 11255 {0x14, 0x90170110}, 11256 {0x19, 0x04a11040}, 11257 {0x21, 0x04211020}), 11258 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK, 11259 {0x14, 0x90170110}, 11260 {0x17, 0x90170111}, 11261 {0x19, 0x03a11030}, 11262 {0x21, 0x03211020}), 11263 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 11264 {0x17, 0x90170110}, 11265 {0x19, 0x03a11030}, 11266 {0x21, 0x03211020}), 11267 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 11268 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */ 11269 {0x19, 0x04a11040}, 11270 {0x21, 0x04211020}), 11271 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 11272 {0x12, 0x90a60130}, 11273 {0x17, 0x90170110}, 11274 {0x21, 0x02211020}), 11275 SND_HDA_PIN_QUIRK(0x10ec0288, 0x1028, "Dell", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, 11276 {0x12, 0x90a60120}, 11277 {0x14, 0x90170110}, 11278 {0x21, 0x0321101f}), 11279 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11280 ALC290_STANDARD_PINS, 11281 {0x15, 0x04211040}, 11282 {0x18, 0x90170112}, 11283 {0x1a, 0x04a11020}), 11284 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11285 ALC290_STANDARD_PINS, 11286 {0x15, 0x04211040}, 11287 {0x18, 0x90170110}, 11288 {0x1a, 0x04a11020}), 11289 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11290 ALC290_STANDARD_PINS, 11291 {0x15, 0x0421101f}, 11292 {0x1a, 0x04a11020}), 11293 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11294 ALC290_STANDARD_PINS, 11295 {0x15, 0x04211020}, 11296 {0x1a, 0x04a11040}), 11297 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11298 ALC290_STANDARD_PINS, 11299 {0x14, 0x90170110}, 11300 {0x15, 0x04211020}, 11301 {0x1a, 0x04a11040}), 11302 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11303 ALC290_STANDARD_PINS, 11304 {0x14, 0x90170110}, 11305 {0x15, 0x04211020}, 11306 {0x1a, 0x04a11020}), 11307 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 11308 ALC290_STANDARD_PINS, 11309 {0x14, 0x90170110}, 11310 {0x15, 0x0421101f}, 11311 {0x1a, 0x04a11020}), 11312 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 11313 ALC292_STANDARD_PINS, 11314 {0x12, 0x90a60140}, 11315 {0x16, 0x01014020}, 11316 {0x19, 0x01a19030}), 11317 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 11318 ALC292_STANDARD_PINS, 11319 {0x12, 0x90a60140}, 11320 {0x16, 0x01014020}, 11321 {0x18, 0x02a19031}, 11322 {0x19, 0x01a1903e}), 11323 SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 11324 ALC292_STANDARD_PINS, 11325 {0x12, 0x90a60140}), 11326 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 11327 ALC292_STANDARD_PINS, 11328 {0x13, 0x90a60140}, 11329 {0x16, 0x21014020}, 11330 {0x19, 0x21a19030}), 11331 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 11332 ALC292_STANDARD_PINS, 11333 {0x13, 0x90a60140}), 11334 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_HPE, 11335 {0x17, 0x90170110}, 11336 {0x21, 0x04211020}), 11337 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC, 11338 {0x14, 0x90170110}, 11339 {0x1b, 0x90a70130}, 11340 {0x21, 0x04211020}), 11341 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11342 {0x12, 0x90a60130}, 11343 {0x17, 0x90170110}, 11344 {0x21, 0x03211020}), 11345 SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11346 {0x12, 0x90a60130}, 11347 {0x17, 0x90170110}, 11348 {0x21, 0x04211020}), 11349 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK, 11350 {0x12, 0x90a60130}, 11351 {0x17, 0x90170110}, 11352 {0x21, 0x03211020}), 11353 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11354 {0x12, 0x90a60120}, 11355 {0x17, 0x90170110}, 11356 {0x21, 0x04211030}), 11357 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11358 {0x12, 0x90a60130}, 11359 {0x17, 0x90170110}, 11360 {0x21, 0x03211020}), 11361 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, 11362 {0x12, 0x90a60130}, 11363 {0x17, 0x90170110}, 11364 {0x21, 0x03211020}), 11365 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11366 ALC298_STANDARD_PINS, 11367 {0x17, 0x90170110}), 11368 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11369 ALC298_STANDARD_PINS, 11370 {0x17, 0x90170140}), 11371 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 11372 ALC298_STANDARD_PINS, 11373 {0x17, 0x90170150}), 11374 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_SPK_VOLUME, 11375 {0x12, 0xb7a60140}, 11376 {0x13, 0xb7a60150}, 11377 {0x17, 0x90170110}, 11378 {0x1a, 0x03011020}, 11379 {0x21, 0x03211030}), 11380 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, 11381 {0x12, 0xb7a60140}, 11382 {0x17, 0x90170110}, 11383 {0x1a, 0x03a11030}, 11384 {0x21, 0x03211020}), 11385 SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 11386 ALC225_STANDARD_PINS, 11387 {0x12, 0xb7a60130}, 11388 {0x17, 0x90170110}), 11389 SND_HDA_PIN_QUIRK(0x10ec0623, 0x17aa, "Lenovo", ALC283_FIXUP_HEADSET_MIC, 11390 {0x14, 0x01014010}, 11391 {0x17, 0x90170120}, 11392 {0x18, 0x02a11030}, 11393 {0x19, 0x02a1103f}, 11394 {0x21, 0x0221101f}), 11395 {} 11396 }; 11397 11398 /* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match 11399 * more machines, don't need to match all valid pins, just need to match 11400 * all the pins defined in the tbl. Just because of this reason, it is possible 11401 * that a single machine matches multiple tbls, so there is one limitation: 11402 * at most one tbl is allowed to define for the same vendor and same codec 11403 */ 11404 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { 11405 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC, 11406 {0x19, 0x40000000}), 11407 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 11408 {0x19, 0x40000000}, 11409 {0x1b, 0x40000000}), 11410 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 11411 {0x19, 0x40000000}, 11412 {0x1b, 0x40000000}), 11413 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11414 {0x19, 0x40000000}, 11415 {0x1a, 0x40000000}), 11416 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 11417 {0x19, 0x40000000}, 11418 {0x1a, 0x40000000}), 11419 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 11420 {0x19, 0x40000000}, 11421 {0x1a, 0x40000000}), 11422 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC, 11423 {0x19, 0x40000000}), 11424 {} 11425 }; 11426 11427 static void alc269_fill_coef(struct hda_codec *codec) 11428 { 11429 struct alc_spec *spec = codec->spec; 11430 int val; 11431 11432 if (spec->codec_variant != ALC269_TYPE_ALC269VB) 11433 return; 11434 11435 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) { 11436 alc_write_coef_idx(codec, 0xf, 0x960b); 11437 alc_write_coef_idx(codec, 0xe, 0x8817); 11438 } 11439 11440 if ((alc_get_coef0(codec) & 0x00ff) == 0x016) { 11441 alc_write_coef_idx(codec, 0xf, 0x960b); 11442 alc_write_coef_idx(codec, 0xe, 0x8814); 11443 } 11444 11445 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { 11446 /* Power up output pin */ 11447 alc_update_coef_idx(codec, 0x04, 0, 1<<11); 11448 } 11449 11450 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { 11451 val = alc_read_coef_idx(codec, 0xd); 11452 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { 11453 /* Capless ramp up clock control */ 11454 alc_write_coef_idx(codec, 0xd, val | (1<<10)); 11455 } 11456 val = alc_read_coef_idx(codec, 0x17); 11457 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { 11458 /* Class D power on reset */ 11459 alc_write_coef_idx(codec, 0x17, val | (1<<7)); 11460 } 11461 } 11462 11463 /* HP */ 11464 alc_update_coef_idx(codec, 0x4, 0, 1<<11); 11465 } 11466 11467 /* 11468 */ 11469 static int patch_alc269(struct hda_codec *codec) 11470 { 11471 struct alc_spec *spec; 11472 int err; 11473 11474 err = alc_alloc_spec(codec, 0x0b); 11475 if (err < 0) 11476 return err; 11477 11478 spec = codec->spec; 11479 spec->gen.shared_mic_vref_pin = 0x18; 11480 codec->power_save_node = 0; 11481 spec->en_3kpull_low = true; 11482 11483 codec->patch_ops.suspend = alc269_suspend; 11484 codec->patch_ops.resume = alc269_resume; 11485 spec->shutup = alc_default_shutup; 11486 spec->init_hook = alc_default_init; 11487 11488 switch (codec->core.vendor_id) { 11489 case 0x10ec0269: 11490 spec->codec_variant = ALC269_TYPE_ALC269VA; 11491 switch (alc_get_coef0(codec) & 0x00f0) { 11492 case 0x0010: 11493 if (codec->bus->pci && 11494 codec->bus->pci->subsystem_vendor == 0x1025 && 11495 spec->cdefine.platform_type == 1) 11496 err = alc_codec_rename(codec, "ALC271X"); 11497 spec->codec_variant = ALC269_TYPE_ALC269VB; 11498 break; 11499 case 0x0020: 11500 if (codec->bus->pci && 11501 codec->bus->pci->subsystem_vendor == 0x17aa && 11502 codec->bus->pci->subsystem_device == 0x21f3) 11503 err = alc_codec_rename(codec, "ALC3202"); 11504 spec->codec_variant = ALC269_TYPE_ALC269VC; 11505 break; 11506 case 0x0030: 11507 spec->codec_variant = ALC269_TYPE_ALC269VD; 11508 break; 11509 default: 11510 alc_fix_pll_init(codec, 0x20, 0x04, 15); 11511 } 11512 if (err < 0) 11513 goto error; 11514 spec->shutup = alc269_shutup; 11515 spec->init_hook = alc269_fill_coef; 11516 alc269_fill_coef(codec); 11517 break; 11518 11519 case 0x10ec0280: 11520 case 0x10ec0290: 11521 spec->codec_variant = ALC269_TYPE_ALC280; 11522 break; 11523 case 0x10ec0282: 11524 spec->codec_variant = ALC269_TYPE_ALC282; 11525 spec->shutup = alc282_shutup; 11526 spec->init_hook = alc282_init; 11527 break; 11528 case 0x10ec0233: 11529 case 0x10ec0283: 11530 spec->codec_variant = ALC269_TYPE_ALC283; 11531 spec->shutup = alc283_shutup; 11532 spec->init_hook = alc283_init; 11533 break; 11534 case 0x10ec0284: 11535 case 0x10ec0292: 11536 spec->codec_variant = ALC269_TYPE_ALC284; 11537 break; 11538 case 0x10ec0293: 11539 spec->codec_variant = ALC269_TYPE_ALC293; 11540 break; 11541 case 0x10ec0286: 11542 case 0x10ec0288: 11543 spec->codec_variant = ALC269_TYPE_ALC286; 11544 break; 11545 case 0x10ec0298: 11546 spec->codec_variant = ALC269_TYPE_ALC298; 11547 break; 11548 case 0x10ec0235: 11549 case 0x10ec0255: 11550 spec->codec_variant = ALC269_TYPE_ALC255; 11551 spec->shutup = alc256_shutup; 11552 spec->init_hook = alc256_init; 11553 break; 11554 case 0x10ec0230: 11555 case 0x10ec0236: 11556 case 0x10ec0256: 11557 case 0x19e58326: 11558 spec->codec_variant = ALC269_TYPE_ALC256; 11559 spec->shutup = alc256_shutup; 11560 spec->init_hook = alc256_init; 11561 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ 11562 if (codec->core.vendor_id == 0x10ec0236 && 11563 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) 11564 spec->en_3kpull_low = false; 11565 break; 11566 case 0x10ec0257: 11567 spec->codec_variant = ALC269_TYPE_ALC257; 11568 spec->shutup = alc256_shutup; 11569 spec->init_hook = alc256_init; 11570 spec->gen.mixer_nid = 0; 11571 spec->en_3kpull_low = false; 11572 break; 11573 case 0x10ec0215: 11574 case 0x10ec0245: 11575 case 0x10ec0285: 11576 case 0x10ec0289: 11577 if (alc_get_coef0(codec) & 0x0010) 11578 spec->codec_variant = ALC269_TYPE_ALC245; 11579 else 11580 spec->codec_variant = ALC269_TYPE_ALC215; 11581 spec->shutup = alc225_shutup; 11582 spec->init_hook = alc225_init; 11583 spec->gen.mixer_nid = 0; 11584 break; 11585 case 0x10ec0225: 11586 case 0x10ec0295: 11587 case 0x10ec0299: 11588 spec->codec_variant = ALC269_TYPE_ALC225; 11589 spec->shutup = alc225_shutup; 11590 spec->init_hook = alc225_init; 11591 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ 11592 break; 11593 case 0x10ec0287: 11594 spec->codec_variant = ALC269_TYPE_ALC287; 11595 spec->shutup = alc225_shutup; 11596 spec->init_hook = alc225_init; 11597 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */ 11598 break; 11599 case 0x10ec0234: 11600 case 0x10ec0274: 11601 case 0x10ec0294: 11602 spec->codec_variant = ALC269_TYPE_ALC294; 11603 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */ 11604 alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */ 11605 spec->init_hook = alc294_init; 11606 break; 11607 case 0x10ec0300: 11608 spec->codec_variant = ALC269_TYPE_ALC300; 11609 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ 11610 break; 11611 case 0x10ec0623: 11612 spec->codec_variant = ALC269_TYPE_ALC623; 11613 break; 11614 case 0x10ec0700: 11615 case 0x10ec0701: 11616 case 0x10ec0703: 11617 case 0x10ec0711: 11618 spec->codec_variant = ALC269_TYPE_ALC700; 11619 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */ 11620 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */ 11621 spec->init_hook = alc294_init; 11622 break; 11623 11624 } 11625 11626 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { 11627 spec->has_alc5505_dsp = 1; 11628 spec->init_hook = alc5505_dsp_init; 11629 } 11630 11631 alc_pre_init(codec); 11632 11633 snd_hda_pick_fixup(codec, alc269_fixup_models, 11634 alc269_fixup_tbl, alc269_fixups); 11635 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and 11636 * the quirk breaks the latter (bko#214101). 11637 * Clear the wrong entry. 11638 */ 11639 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && 11640 codec->core.vendor_id == 0x10ec0294) { 11641 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); 11642 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 11643 } 11644 11645 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); 11646 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); 11647 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, 11648 alc269_fixups); 11649 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 11650 11651 alc_auto_parse_customize_define(codec); 11652 11653 if (has_cdefine_beep(codec)) 11654 spec->gen.beep_nid = 0x01; 11655 11656 /* automatic parse from the BIOS config */ 11657 err = alc269_parse_auto_config(codec); 11658 if (err < 0) 11659 goto error; 11660 11661 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) { 11662 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); 11663 if (err < 0) 11664 goto error; 11665 } 11666 11667 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 11668 11669 return 0; 11670 11671 error: 11672 alc_free(codec); 11673 return err; 11674 } 11675 11676 /* 11677 * ALC861 11678 */ 11679 11680 static int alc861_parse_auto_config(struct hda_codec *codec) 11681 { 11682 static const hda_nid_t alc861_ignore[] = { 0x1d, 0 }; 11683 static const hda_nid_t alc861_ssids[] = { 0x0e, 0x0f, 0x0b, 0 }; 11684 return alc_parse_auto_config(codec, alc861_ignore, alc861_ssids); 11685 } 11686 11687 /* Pin config fixes */ 11688 enum { 11689 ALC861_FIXUP_FSC_AMILO_PI1505, 11690 ALC861_FIXUP_AMP_VREF_0F, 11691 ALC861_FIXUP_NO_JACK_DETECT, 11692 ALC861_FIXUP_ASUS_A6RP, 11693 ALC660_FIXUP_ASUS_W7J, 11694 }; 11695 11696 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ 11697 static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec, 11698 const struct hda_fixup *fix, int action) 11699 { 11700 struct alc_spec *spec = codec->spec; 11701 unsigned int val; 11702 11703 if (action != HDA_FIXUP_ACT_INIT) 11704 return; 11705 val = snd_hda_codec_get_pin_target(codec, 0x0f); 11706 if (!(val & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))) 11707 val |= AC_PINCTL_IN_EN; 11708 val |= AC_PINCTL_VREF_50; 11709 snd_hda_set_pin_ctl(codec, 0x0f, val); 11710 spec->gen.keep_vref_in_automute = 1; 11711 } 11712 11713 /* suppress the jack-detection */ 11714 static void alc_fixup_no_jack_detect(struct hda_codec *codec, 11715 const struct hda_fixup *fix, int action) 11716 { 11717 if (action == HDA_FIXUP_ACT_PRE_PROBE) 11718 codec->no_jack_detect = 1; 11719 } 11720 11721 static const struct hda_fixup alc861_fixups[] = { 11722 [ALC861_FIXUP_FSC_AMILO_PI1505] = { 11723 .type = HDA_FIXUP_PINS, 11724 .v.pins = (const struct hda_pintbl[]) { 11725 { 0x0b, 0x0221101f }, /* HP */ 11726 { 0x0f, 0x90170310 }, /* speaker */ 11727 { } 11728 } 11729 }, 11730 [ALC861_FIXUP_AMP_VREF_0F] = { 11731 .type = HDA_FIXUP_FUNC, 11732 .v.func = alc861_fixup_asus_amp_vref_0f, 11733 }, 11734 [ALC861_FIXUP_NO_JACK_DETECT] = { 11735 .type = HDA_FIXUP_FUNC, 11736 .v.func = alc_fixup_no_jack_detect, 11737 }, 11738 [ALC861_FIXUP_ASUS_A6RP] = { 11739 .type = HDA_FIXUP_FUNC, 11740 .v.func = alc861_fixup_asus_amp_vref_0f, 11741 .chained = true, 11742 .chain_id = ALC861_FIXUP_NO_JACK_DETECT, 11743 }, 11744 [ALC660_FIXUP_ASUS_W7J] = { 11745 .type = HDA_FIXUP_VERBS, 11746 .v.verbs = (const struct hda_verb[]) { 11747 /* ASUS W7J needs a magic pin setup on unused NID 0x10 11748 * for enabling outputs 11749 */ 11750 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 11751 { } 11752 }, 11753 } 11754 }; 11755 11756 static const struct snd_pci_quirk alc861_fixup_tbl[] = { 11757 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J), 11758 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J), 11759 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), 11760 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), 11761 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), 11762 SND_PCI_QUIRK_VENDOR(0x1584, "Haier/Uniwill", ALC861_FIXUP_AMP_VREF_0F), 11763 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505), 11764 {} 11765 }; 11766 11767 /* 11768 */ 11769 static int patch_alc861(struct hda_codec *codec) 11770 { 11771 struct alc_spec *spec; 11772 int err; 11773 11774 err = alc_alloc_spec(codec, 0x15); 11775 if (err < 0) 11776 return err; 11777 11778 spec = codec->spec; 11779 if (has_cdefine_beep(codec)) 11780 spec->gen.beep_nid = 0x23; 11781 11782 spec->power_hook = alc_power_eapd; 11783 11784 alc_pre_init(codec); 11785 11786 snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups); 11787 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 11788 11789 /* automatic parse from the BIOS config */ 11790 err = alc861_parse_auto_config(codec); 11791 if (err < 0) 11792 goto error; 11793 11794 if (!spec->gen.no_analog) { 11795 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); 11796 if (err < 0) 11797 goto error; 11798 } 11799 11800 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 11801 11802 return 0; 11803 11804 error: 11805 alc_free(codec); 11806 return err; 11807 } 11808 11809 /* 11810 * ALC861-VD support 11811 * 11812 * Based on ALC882 11813 * 11814 * In addition, an independent DAC 11815 */ 11816 static int alc861vd_parse_auto_config(struct hda_codec *codec) 11817 { 11818 static const hda_nid_t alc861vd_ignore[] = { 0x1d, 0 }; 11819 static const hda_nid_t alc861vd_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 11820 return alc_parse_auto_config(codec, alc861vd_ignore, alc861vd_ssids); 11821 } 11822 11823 enum { 11824 ALC660VD_FIX_ASUS_GPIO1, 11825 ALC861VD_FIX_DALLAS, 11826 }; 11827 11828 /* exclude VREF80 */ 11829 static void alc861vd_fixup_dallas(struct hda_codec *codec, 11830 const struct hda_fixup *fix, int action) 11831 { 11832 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 11833 snd_hda_override_pin_caps(codec, 0x18, 0x00000734); 11834 snd_hda_override_pin_caps(codec, 0x19, 0x0000073c); 11835 } 11836 } 11837 11838 /* reset GPIO1 */ 11839 static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec, 11840 const struct hda_fixup *fix, int action) 11841 { 11842 struct alc_spec *spec = codec->spec; 11843 11844 if (action == HDA_FIXUP_ACT_PRE_PROBE) 11845 spec->gpio_mask |= 0x02; 11846 alc_fixup_gpio(codec, action, 0x01); 11847 } 11848 11849 static const struct hda_fixup alc861vd_fixups[] = { 11850 [ALC660VD_FIX_ASUS_GPIO1] = { 11851 .type = HDA_FIXUP_FUNC, 11852 .v.func = alc660vd_fixup_asus_gpio1, 11853 }, 11854 [ALC861VD_FIX_DALLAS] = { 11855 .type = HDA_FIXUP_FUNC, 11856 .v.func = alc861vd_fixup_dallas, 11857 }, 11858 }; 11859 11860 static const struct snd_pci_quirk alc861vd_fixup_tbl[] = { 11861 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS), 11862 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1), 11863 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS), 11864 {} 11865 }; 11866 11867 /* 11868 */ 11869 static int patch_alc861vd(struct hda_codec *codec) 11870 { 11871 struct alc_spec *spec; 11872 int err; 11873 11874 err = alc_alloc_spec(codec, 0x0b); 11875 if (err < 0) 11876 return err; 11877 11878 spec = codec->spec; 11879 if (has_cdefine_beep(codec)) 11880 spec->gen.beep_nid = 0x23; 11881 11882 spec->shutup = alc_eapd_shutup; 11883 11884 alc_pre_init(codec); 11885 11886 snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups); 11887 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 11888 11889 /* automatic parse from the BIOS config */ 11890 err = alc861vd_parse_auto_config(codec); 11891 if (err < 0) 11892 goto error; 11893 11894 if (!spec->gen.no_analog) { 11895 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 11896 if (err < 0) 11897 goto error; 11898 } 11899 11900 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 11901 11902 return 0; 11903 11904 error: 11905 alc_free(codec); 11906 return err; 11907 } 11908 11909 /* 11910 * ALC662 support 11911 * 11912 * ALC662 is almost identical with ALC880 but has cleaner and more flexible 11913 * configuration. Each pin widget can choose any input DACs and a mixer. 11914 * Each ADC is connected from a mixer of all inputs. This makes possible 11915 * 6-channel independent captures. 11916 * 11917 * In addition, an independent DAC for the multi-playback (not used in this 11918 * driver yet). 11919 */ 11920 11921 /* 11922 * BIOS auto configuration 11923 */ 11924 11925 static int alc662_parse_auto_config(struct hda_codec *codec) 11926 { 11927 static const hda_nid_t alc662_ignore[] = { 0x1d, 0 }; 11928 static const hda_nid_t alc663_ssids[] = { 0x15, 0x1b, 0x14, 0x21 }; 11929 static const hda_nid_t alc662_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 11930 const hda_nid_t *ssids; 11931 11932 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 || 11933 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 || 11934 codec->core.vendor_id == 0x10ec0671) 11935 ssids = alc663_ssids; 11936 else 11937 ssids = alc662_ssids; 11938 return alc_parse_auto_config(codec, alc662_ignore, ssids); 11939 } 11940 11941 static void alc272_fixup_mario(struct hda_codec *codec, 11942 const struct hda_fixup *fix, int action) 11943 { 11944 if (action != HDA_FIXUP_ACT_PRE_PROBE) 11945 return; 11946 if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT, 11947 (0x3b << AC_AMPCAP_OFFSET_SHIFT) | 11948 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) | 11949 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) | 11950 (0 << AC_AMPCAP_MUTE_SHIFT))) 11951 codec_warn(codec, "failed to override amp caps for NID 0x2\n"); 11952 } 11953 11954 static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { 11955 { .channels = 2, 11956 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 11957 { .channels = 4, 11958 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR, 11959 SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } }, /* LFE only on right */ 11960 { } 11961 }; 11962 11963 /* override the 2.1 chmap */ 11964 static void alc_fixup_bass_chmap(struct hda_codec *codec, 11965 const struct hda_fixup *fix, int action) 11966 { 11967 if (action == HDA_FIXUP_ACT_BUILD) { 11968 struct alc_spec *spec = codec->spec; 11969 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps; 11970 } 11971 } 11972 11973 /* avoid D3 for keeping GPIO up */ 11974 static unsigned int gpio_led_power_filter(struct hda_codec *codec, 11975 hda_nid_t nid, 11976 unsigned int power_state) 11977 { 11978 struct alc_spec *spec = codec->spec; 11979 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data) 11980 return AC_PWRST_D0; 11981 return power_state; 11982 } 11983 11984 static void alc662_fixup_led_gpio1(struct hda_codec *codec, 11985 const struct hda_fixup *fix, int action) 11986 { 11987 struct alc_spec *spec = codec->spec; 11988 11989 alc_fixup_hp_gpio_led(codec, action, 0x01, 0); 11990 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 11991 spec->mute_led_polarity = 1; 11992 codec->power_filter = gpio_led_power_filter; 11993 } 11994 } 11995 11996 static void alc662_usi_automute_hook(struct hda_codec *codec, 11997 struct hda_jack_callback *jack) 11998 { 11999 struct alc_spec *spec = codec->spec; 12000 int vref; 12001 msleep(200); 12002 snd_hda_gen_hp_automute(codec, jack); 12003 12004 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0; 12005 msleep(100); 12006 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 12007 vref); 12008 } 12009 12010 static void alc662_fixup_usi_headset_mic(struct hda_codec *codec, 12011 const struct hda_fixup *fix, int action) 12012 { 12013 struct alc_spec *spec = codec->spec; 12014 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12015 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12016 spec->gen.hp_automute_hook = alc662_usi_automute_hook; 12017 } 12018 } 12019 12020 static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec, 12021 struct hda_jack_callback *cb) 12022 { 12023 /* surround speakers at 0x1b already get muted automatically when 12024 * headphones are plugged in, but we have to mute/unmute the remaining 12025 * channels manually: 12026 * 0x15 - front left/front right 12027 * 0x18 - front center/ LFE 12028 */ 12029 if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) { 12030 snd_hda_set_pin_ctl_cache(codec, 0x15, 0); 12031 snd_hda_set_pin_ctl_cache(codec, 0x18, 0); 12032 } else { 12033 snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT); 12034 snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT); 12035 } 12036 } 12037 12038 static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, 12039 const struct hda_fixup *fix, int action) 12040 { 12041 /* Pin 0x1b: shared headphones jack and surround speakers */ 12042 if (!is_jack_detectable(codec, 0x1b)) 12043 return; 12044 12045 switch (action) { 12046 case HDA_FIXUP_ACT_PRE_PROBE: 12047 snd_hda_jack_detect_enable_callback(codec, 0x1b, 12048 alc662_aspire_ethos_mute_speakers); 12049 /* subwoofer needs an extra GPIO setting to become audible */ 12050 alc_setup_gpio(codec, 0x02); 12051 break; 12052 case HDA_FIXUP_ACT_INIT: 12053 /* Make sure to start in a correct state, i.e. if 12054 * headphones have been plugged in before powering up the system 12055 */ 12056 alc662_aspire_ethos_mute_speakers(codec, NULL); 12057 break; 12058 } 12059 } 12060 12061 static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, 12062 const struct hda_fixup *fix, int action) 12063 { 12064 struct alc_spec *spec = codec->spec; 12065 12066 static const struct hda_pintbl pincfgs[] = { 12067 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ 12068 { 0x1b, 0x0181304f }, 12069 { } 12070 }; 12071 12072 switch (action) { 12073 case HDA_FIXUP_ACT_PRE_PROBE: 12074 spec->gen.mixer_nid = 0; 12075 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12076 snd_hda_apply_pincfgs(codec, pincfgs); 12077 break; 12078 case HDA_FIXUP_ACT_INIT: 12079 alc_write_coef_idx(codec, 0x19, 0xa054); 12080 break; 12081 } 12082 } 12083 12084 static void alc897_hp_automute_hook(struct hda_codec *codec, 12085 struct hda_jack_callback *jack) 12086 { 12087 struct alc_spec *spec = codec->spec; 12088 int vref; 12089 12090 snd_hda_gen_hp_automute(codec, jack); 12091 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; 12092 snd_hda_set_pin_ctl(codec, 0x1b, vref); 12093 } 12094 12095 static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, 12096 const struct hda_fixup *fix, int action) 12097 { 12098 struct alc_spec *spec = codec->spec; 12099 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12100 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 12101 spec->no_shutup_pins = 1; 12102 } 12103 if (action == HDA_FIXUP_ACT_PROBE) { 12104 snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100); 12105 } 12106 } 12107 12108 static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec, 12109 const struct hda_fixup *fix, int action) 12110 { 12111 struct alc_spec *spec = codec->spec; 12112 12113 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12114 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 12115 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 12116 } 12117 } 12118 12119 static const struct coef_fw alc668_coefs[] = { 12120 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), 12121 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), 12122 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), 12123 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f), 12124 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001), 12125 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940), 12126 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0), 12127 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418), 12128 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468), 12129 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418), 12130 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00), 12131 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000), 12132 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0), 12133 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480), 12134 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0), 12135 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040), 12136 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697), 12137 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab), 12138 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02), 12139 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6), 12140 {} 12141 }; 12142 12143 static void alc668_restore_default_value(struct hda_codec *codec) 12144 { 12145 alc_process_coef_fw(codec, alc668_coefs); 12146 } 12147 12148 enum { 12149 ALC662_FIXUP_ASPIRE, 12150 ALC662_FIXUP_LED_GPIO1, 12151 ALC662_FIXUP_IDEAPAD, 12152 ALC272_FIXUP_MARIO, 12153 ALC662_FIXUP_CZC_ET26, 12154 ALC662_FIXUP_CZC_P10T, 12155 ALC662_FIXUP_SKU_IGNORE, 12156 ALC662_FIXUP_HP_RP5800, 12157 ALC662_FIXUP_ASUS_MODE1, 12158 ALC662_FIXUP_ASUS_MODE2, 12159 ALC662_FIXUP_ASUS_MODE3, 12160 ALC662_FIXUP_ASUS_MODE4, 12161 ALC662_FIXUP_ASUS_MODE5, 12162 ALC662_FIXUP_ASUS_MODE6, 12163 ALC662_FIXUP_ASUS_MODE7, 12164 ALC662_FIXUP_ASUS_MODE8, 12165 ALC662_FIXUP_NO_JACK_DETECT, 12166 ALC662_FIXUP_ZOTAC_Z68, 12167 ALC662_FIXUP_INV_DMIC, 12168 ALC662_FIXUP_DELL_MIC_NO_PRESENCE, 12169 ALC668_FIXUP_DELL_MIC_NO_PRESENCE, 12170 ALC662_FIXUP_HEADSET_MODE, 12171 ALC668_FIXUP_HEADSET_MODE, 12172 ALC662_FIXUP_BASS_MODE4_CHMAP, 12173 ALC662_FIXUP_BASS_16, 12174 ALC662_FIXUP_BASS_1A, 12175 ALC662_FIXUP_BASS_CHMAP, 12176 ALC668_FIXUP_AUTO_MUTE, 12177 ALC668_FIXUP_DELL_DISABLE_AAMIX, 12178 ALC668_FIXUP_DELL_XPS13, 12179 ALC662_FIXUP_ASUS_Nx50, 12180 ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, 12181 ALC668_FIXUP_ASUS_Nx51, 12182 ALC668_FIXUP_MIC_COEF, 12183 ALC668_FIXUP_ASUS_G751, 12184 ALC891_FIXUP_HEADSET_MODE, 12185 ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 12186 ALC662_FIXUP_ACER_VERITON, 12187 ALC892_FIXUP_ASROCK_MOBO, 12188 ALC662_FIXUP_USI_FUNC, 12189 ALC662_FIXUP_USI_HEADSET_MODE, 12190 ALC662_FIXUP_LENOVO_MULTI_CODECS, 12191 ALC669_FIXUP_ACER_ASPIRE_ETHOS, 12192 ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, 12193 ALC671_FIXUP_HP_HEADSET_MIC2, 12194 ALC662_FIXUP_ACER_X2660G_HEADSET_MODE, 12195 ALC662_FIXUP_ACER_NITRO_HEADSET_MODE, 12196 ALC668_FIXUP_ASUS_NO_HEADSET_MIC, 12197 ALC668_FIXUP_HEADSET_MIC, 12198 ALC668_FIXUP_MIC_DET_COEF, 12199 ALC897_FIXUP_LENOVO_HEADSET_MIC, 12200 ALC897_FIXUP_HEADSET_MIC_PIN, 12201 ALC897_FIXUP_HP_HSMIC_VERB, 12202 ALC897_FIXUP_LENOVO_HEADSET_MODE, 12203 ALC897_FIXUP_HEADSET_MIC_PIN2, 12204 ALC897_FIXUP_UNIS_H3C_X500S, 12205 ALC897_FIXUP_HEADSET_MIC_PIN3, 12206 }; 12207 12208 static const struct hda_fixup alc662_fixups[] = { 12209 [ALC662_FIXUP_ASPIRE] = { 12210 .type = HDA_FIXUP_PINS, 12211 .v.pins = (const struct hda_pintbl[]) { 12212 { 0x15, 0x99130112 }, /* subwoofer */ 12213 { } 12214 } 12215 }, 12216 [ALC662_FIXUP_LED_GPIO1] = { 12217 .type = HDA_FIXUP_FUNC, 12218 .v.func = alc662_fixup_led_gpio1, 12219 }, 12220 [ALC662_FIXUP_IDEAPAD] = { 12221 .type = HDA_FIXUP_PINS, 12222 .v.pins = (const struct hda_pintbl[]) { 12223 { 0x17, 0x99130112 }, /* subwoofer */ 12224 { } 12225 }, 12226 .chained = true, 12227 .chain_id = ALC662_FIXUP_LED_GPIO1, 12228 }, 12229 [ALC272_FIXUP_MARIO] = { 12230 .type = HDA_FIXUP_FUNC, 12231 .v.func = alc272_fixup_mario, 12232 }, 12233 [ALC662_FIXUP_CZC_ET26] = { 12234 .type = HDA_FIXUP_PINS, 12235 .v.pins = (const struct hda_pintbl[]) { 12236 {0x12, 0x403cc000}, 12237 {0x14, 0x90170110}, /* speaker */ 12238 {0x15, 0x411111f0}, 12239 {0x16, 0x411111f0}, 12240 {0x18, 0x01a19030}, /* mic */ 12241 {0x19, 0x90a7013f}, /* int-mic */ 12242 {0x1a, 0x01014020}, 12243 {0x1b, 0x0121401f}, 12244 {0x1c, 0x411111f0}, 12245 {0x1d, 0x411111f0}, 12246 {0x1e, 0x40478e35}, 12247 {} 12248 }, 12249 .chained = true, 12250 .chain_id = ALC662_FIXUP_SKU_IGNORE 12251 }, 12252 [ALC662_FIXUP_CZC_P10T] = { 12253 .type = HDA_FIXUP_VERBS, 12254 .v.verbs = (const struct hda_verb[]) { 12255 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, 12256 {} 12257 } 12258 }, 12259 [ALC662_FIXUP_SKU_IGNORE] = { 12260 .type = HDA_FIXUP_FUNC, 12261 .v.func = alc_fixup_sku_ignore, 12262 }, 12263 [ALC662_FIXUP_HP_RP5800] = { 12264 .type = HDA_FIXUP_PINS, 12265 .v.pins = (const struct hda_pintbl[]) { 12266 { 0x14, 0x0221201f }, /* HP out */ 12267 { } 12268 }, 12269 .chained = true, 12270 .chain_id = ALC662_FIXUP_SKU_IGNORE 12271 }, 12272 [ALC662_FIXUP_ASUS_MODE1] = { 12273 .type = HDA_FIXUP_PINS, 12274 .v.pins = (const struct hda_pintbl[]) { 12275 { 0x14, 0x99130110 }, /* speaker */ 12276 { 0x18, 0x01a19c20 }, /* mic */ 12277 { 0x19, 0x99a3092f }, /* int-mic */ 12278 { 0x21, 0x0121401f }, /* HP out */ 12279 { } 12280 }, 12281 .chained = true, 12282 .chain_id = ALC662_FIXUP_SKU_IGNORE 12283 }, 12284 [ALC662_FIXUP_ASUS_MODE2] = { 12285 .type = HDA_FIXUP_PINS, 12286 .v.pins = (const struct hda_pintbl[]) { 12287 { 0x14, 0x99130110 }, /* speaker */ 12288 { 0x18, 0x01a19820 }, /* mic */ 12289 { 0x19, 0x99a3092f }, /* int-mic */ 12290 { 0x1b, 0x0121401f }, /* HP out */ 12291 { } 12292 }, 12293 .chained = true, 12294 .chain_id = ALC662_FIXUP_SKU_IGNORE 12295 }, 12296 [ALC662_FIXUP_ASUS_MODE3] = { 12297 .type = HDA_FIXUP_PINS, 12298 .v.pins = (const struct hda_pintbl[]) { 12299 { 0x14, 0x99130110 }, /* speaker */ 12300 { 0x15, 0x0121441f }, /* HP */ 12301 { 0x18, 0x01a19840 }, /* mic */ 12302 { 0x19, 0x99a3094f }, /* int-mic */ 12303 { 0x21, 0x01211420 }, /* HP2 */ 12304 { } 12305 }, 12306 .chained = true, 12307 .chain_id = ALC662_FIXUP_SKU_IGNORE 12308 }, 12309 [ALC662_FIXUP_ASUS_MODE4] = { 12310 .type = HDA_FIXUP_PINS, 12311 .v.pins = (const struct hda_pintbl[]) { 12312 { 0x14, 0x99130110 }, /* speaker */ 12313 { 0x16, 0x99130111 }, /* speaker */ 12314 { 0x18, 0x01a19840 }, /* mic */ 12315 { 0x19, 0x99a3094f }, /* int-mic */ 12316 { 0x21, 0x0121441f }, /* HP */ 12317 { } 12318 }, 12319 .chained = true, 12320 .chain_id = ALC662_FIXUP_SKU_IGNORE 12321 }, 12322 [ALC662_FIXUP_ASUS_MODE5] = { 12323 .type = HDA_FIXUP_PINS, 12324 .v.pins = (const struct hda_pintbl[]) { 12325 { 0x14, 0x99130110 }, /* speaker */ 12326 { 0x15, 0x0121441f }, /* HP */ 12327 { 0x16, 0x99130111 }, /* speaker */ 12328 { 0x18, 0x01a19840 }, /* mic */ 12329 { 0x19, 0x99a3094f }, /* int-mic */ 12330 { } 12331 }, 12332 .chained = true, 12333 .chain_id = ALC662_FIXUP_SKU_IGNORE 12334 }, 12335 [ALC662_FIXUP_ASUS_MODE6] = { 12336 .type = HDA_FIXUP_PINS, 12337 .v.pins = (const struct hda_pintbl[]) { 12338 { 0x14, 0x99130110 }, /* speaker */ 12339 { 0x15, 0x01211420 }, /* HP2 */ 12340 { 0x18, 0x01a19840 }, /* mic */ 12341 { 0x19, 0x99a3094f }, /* int-mic */ 12342 { 0x1b, 0x0121441f }, /* HP */ 12343 { } 12344 }, 12345 .chained = true, 12346 .chain_id = ALC662_FIXUP_SKU_IGNORE 12347 }, 12348 [ALC662_FIXUP_ASUS_MODE7] = { 12349 .type = HDA_FIXUP_PINS, 12350 .v.pins = (const struct hda_pintbl[]) { 12351 { 0x14, 0x99130110 }, /* speaker */ 12352 { 0x17, 0x99130111 }, /* speaker */ 12353 { 0x18, 0x01a19840 }, /* mic */ 12354 { 0x19, 0x99a3094f }, /* int-mic */ 12355 { 0x1b, 0x01214020 }, /* HP */ 12356 { 0x21, 0x0121401f }, /* HP */ 12357 { } 12358 }, 12359 .chained = true, 12360 .chain_id = ALC662_FIXUP_SKU_IGNORE 12361 }, 12362 [ALC662_FIXUP_ASUS_MODE8] = { 12363 .type = HDA_FIXUP_PINS, 12364 .v.pins = (const struct hda_pintbl[]) { 12365 { 0x14, 0x99130110 }, /* speaker */ 12366 { 0x12, 0x99a30970 }, /* int-mic */ 12367 { 0x15, 0x01214020 }, /* HP */ 12368 { 0x17, 0x99130111 }, /* speaker */ 12369 { 0x18, 0x01a19840 }, /* mic */ 12370 { 0x21, 0x0121401f }, /* HP */ 12371 { } 12372 }, 12373 .chained = true, 12374 .chain_id = ALC662_FIXUP_SKU_IGNORE 12375 }, 12376 [ALC662_FIXUP_NO_JACK_DETECT] = { 12377 .type = HDA_FIXUP_FUNC, 12378 .v.func = alc_fixup_no_jack_detect, 12379 }, 12380 [ALC662_FIXUP_ZOTAC_Z68] = { 12381 .type = HDA_FIXUP_PINS, 12382 .v.pins = (const struct hda_pintbl[]) { 12383 { 0x1b, 0x02214020 }, /* Front HP */ 12384 { } 12385 } 12386 }, 12387 [ALC662_FIXUP_INV_DMIC] = { 12388 .type = HDA_FIXUP_FUNC, 12389 .v.func = alc_fixup_inv_dmic, 12390 }, 12391 [ALC668_FIXUP_DELL_XPS13] = { 12392 .type = HDA_FIXUP_FUNC, 12393 .v.func = alc_fixup_dell_xps13, 12394 .chained = true, 12395 .chain_id = ALC668_FIXUP_DELL_DISABLE_AAMIX 12396 }, 12397 [ALC668_FIXUP_DELL_DISABLE_AAMIX] = { 12398 .type = HDA_FIXUP_FUNC, 12399 .v.func = alc_fixup_disable_aamix, 12400 .chained = true, 12401 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE 12402 }, 12403 [ALC668_FIXUP_AUTO_MUTE] = { 12404 .type = HDA_FIXUP_FUNC, 12405 .v.func = alc_fixup_auto_mute_via_amp, 12406 .chained = true, 12407 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE 12408 }, 12409 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = { 12410 .type = HDA_FIXUP_PINS, 12411 .v.pins = (const struct hda_pintbl[]) { 12412 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 12413 /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */ 12414 { } 12415 }, 12416 .chained = true, 12417 .chain_id = ALC662_FIXUP_HEADSET_MODE 12418 }, 12419 [ALC662_FIXUP_HEADSET_MODE] = { 12420 .type = HDA_FIXUP_FUNC, 12421 .v.func = alc_fixup_headset_mode_alc662, 12422 }, 12423 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = { 12424 .type = HDA_FIXUP_PINS, 12425 .v.pins = (const struct hda_pintbl[]) { 12426 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 12427 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 12428 { } 12429 }, 12430 .chained = true, 12431 .chain_id = ALC668_FIXUP_HEADSET_MODE 12432 }, 12433 [ALC668_FIXUP_HEADSET_MODE] = { 12434 .type = HDA_FIXUP_FUNC, 12435 .v.func = alc_fixup_headset_mode_alc668, 12436 }, 12437 [ALC662_FIXUP_BASS_MODE4_CHMAP] = { 12438 .type = HDA_FIXUP_FUNC, 12439 .v.func = alc_fixup_bass_chmap, 12440 .chained = true, 12441 .chain_id = ALC662_FIXUP_ASUS_MODE4 12442 }, 12443 [ALC662_FIXUP_BASS_16] = { 12444 .type = HDA_FIXUP_PINS, 12445 .v.pins = (const struct hda_pintbl[]) { 12446 {0x16, 0x80106111}, /* bass speaker */ 12447 {} 12448 }, 12449 .chained = true, 12450 .chain_id = ALC662_FIXUP_BASS_CHMAP, 12451 }, 12452 [ALC662_FIXUP_BASS_1A] = { 12453 .type = HDA_FIXUP_PINS, 12454 .v.pins = (const struct hda_pintbl[]) { 12455 {0x1a, 0x80106111}, /* bass speaker */ 12456 {} 12457 }, 12458 .chained = true, 12459 .chain_id = ALC662_FIXUP_BASS_CHMAP, 12460 }, 12461 [ALC662_FIXUP_BASS_CHMAP] = { 12462 .type = HDA_FIXUP_FUNC, 12463 .v.func = alc_fixup_bass_chmap, 12464 }, 12465 [ALC662_FIXUP_ASUS_Nx50] = { 12466 .type = HDA_FIXUP_FUNC, 12467 .v.func = alc_fixup_auto_mute_via_amp, 12468 .chained = true, 12469 .chain_id = ALC662_FIXUP_BASS_1A 12470 }, 12471 [ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE] = { 12472 .type = HDA_FIXUP_FUNC, 12473 .v.func = alc_fixup_headset_mode_alc668, 12474 .chain_id = ALC662_FIXUP_BASS_CHMAP 12475 }, 12476 [ALC668_FIXUP_ASUS_Nx51] = { 12477 .type = HDA_FIXUP_PINS, 12478 .v.pins = (const struct hda_pintbl[]) { 12479 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 12480 { 0x1a, 0x90170151 }, /* bass speaker */ 12481 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 12482 {} 12483 }, 12484 .chained = true, 12485 .chain_id = ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, 12486 }, 12487 [ALC668_FIXUP_MIC_COEF] = { 12488 .type = HDA_FIXUP_VERBS, 12489 .v.verbs = (const struct hda_verb[]) { 12490 { 0x20, AC_VERB_SET_COEF_INDEX, 0xc3 }, 12491 { 0x20, AC_VERB_SET_PROC_COEF, 0x4000 }, 12492 {} 12493 }, 12494 }, 12495 [ALC668_FIXUP_ASUS_G751] = { 12496 .type = HDA_FIXUP_PINS, 12497 .v.pins = (const struct hda_pintbl[]) { 12498 { 0x16, 0x0421101f }, /* HP */ 12499 {} 12500 }, 12501 .chained = true, 12502 .chain_id = ALC668_FIXUP_MIC_COEF 12503 }, 12504 [ALC891_FIXUP_HEADSET_MODE] = { 12505 .type = HDA_FIXUP_FUNC, 12506 .v.func = alc_fixup_headset_mode, 12507 }, 12508 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE] = { 12509 .type = HDA_FIXUP_PINS, 12510 .v.pins = (const struct hda_pintbl[]) { 12511 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */ 12512 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 12513 { } 12514 }, 12515 .chained = true, 12516 .chain_id = ALC891_FIXUP_HEADSET_MODE 12517 }, 12518 [ALC662_FIXUP_ACER_VERITON] = { 12519 .type = HDA_FIXUP_PINS, 12520 .v.pins = (const struct hda_pintbl[]) { 12521 { 0x15, 0x50170120 }, /* no internal speaker */ 12522 { } 12523 } 12524 }, 12525 [ALC892_FIXUP_ASROCK_MOBO] = { 12526 .type = HDA_FIXUP_PINS, 12527 .v.pins = (const struct hda_pintbl[]) { 12528 { 0x15, 0x40f000f0 }, /* disabled */ 12529 { 0x16, 0x40f000f0 }, /* disabled */ 12530 { } 12531 } 12532 }, 12533 [ALC662_FIXUP_USI_FUNC] = { 12534 .type = HDA_FIXUP_FUNC, 12535 .v.func = alc662_fixup_usi_headset_mic, 12536 }, 12537 [ALC662_FIXUP_USI_HEADSET_MODE] = { 12538 .type = HDA_FIXUP_PINS, 12539 .v.pins = (const struct hda_pintbl[]) { 12540 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */ 12541 { 0x18, 0x01a1903d }, 12542 { } 12543 }, 12544 .chained = true, 12545 .chain_id = ALC662_FIXUP_USI_FUNC 12546 }, 12547 [ALC662_FIXUP_LENOVO_MULTI_CODECS] = { 12548 .type = HDA_FIXUP_FUNC, 12549 .v.func = alc233_alc662_fixup_lenovo_dual_codecs, 12550 }, 12551 [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = { 12552 .type = HDA_FIXUP_FUNC, 12553 .v.func = alc662_fixup_aspire_ethos_hp, 12554 }, 12555 [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { 12556 .type = HDA_FIXUP_PINS, 12557 .v.pins = (const struct hda_pintbl[]) { 12558 { 0x15, 0x92130110 }, /* front speakers */ 12559 { 0x18, 0x99130111 }, /* center/subwoofer */ 12560 { 0x1b, 0x11130012 }, /* surround plus jack for HP */ 12561 { } 12562 }, 12563 .chained = true, 12564 .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET 12565 }, 12566 [ALC671_FIXUP_HP_HEADSET_MIC2] = { 12567 .type = HDA_FIXUP_FUNC, 12568 .v.func = alc671_fixup_hp_headset_mic2, 12569 }, 12570 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = { 12571 .type = HDA_FIXUP_PINS, 12572 .v.pins = (const struct hda_pintbl[]) { 12573 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 12574 { } 12575 }, 12576 .chained = true, 12577 .chain_id = ALC662_FIXUP_USI_FUNC 12578 }, 12579 [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = { 12580 .type = HDA_FIXUP_PINS, 12581 .v.pins = (const struct hda_pintbl[]) { 12582 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ 12583 { 0x1b, 0x0221144f }, 12584 { } 12585 }, 12586 .chained = true, 12587 .chain_id = ALC662_FIXUP_USI_FUNC 12588 }, 12589 [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = { 12590 .type = HDA_FIXUP_PINS, 12591 .v.pins = (const struct hda_pintbl[]) { 12592 { 0x1b, 0x04a1112c }, 12593 { } 12594 }, 12595 .chained = true, 12596 .chain_id = ALC668_FIXUP_HEADSET_MIC 12597 }, 12598 [ALC668_FIXUP_HEADSET_MIC] = { 12599 .type = HDA_FIXUP_FUNC, 12600 .v.func = alc269_fixup_headset_mic, 12601 .chained = true, 12602 .chain_id = ALC668_FIXUP_MIC_DET_COEF 12603 }, 12604 [ALC668_FIXUP_MIC_DET_COEF] = { 12605 .type = HDA_FIXUP_VERBS, 12606 .v.verbs = (const struct hda_verb[]) { 12607 { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 }, 12608 { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 }, 12609 {} 12610 }, 12611 }, 12612 [ALC897_FIXUP_LENOVO_HEADSET_MIC] = { 12613 .type = HDA_FIXUP_FUNC, 12614 .v.func = alc897_fixup_lenovo_headset_mic, 12615 }, 12616 [ALC897_FIXUP_HEADSET_MIC_PIN] = { 12617 .type = HDA_FIXUP_PINS, 12618 .v.pins = (const struct hda_pintbl[]) { 12619 { 0x1a, 0x03a11050 }, 12620 { } 12621 }, 12622 .chained = true, 12623 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC 12624 }, 12625 [ALC897_FIXUP_HP_HSMIC_VERB] = { 12626 .type = HDA_FIXUP_PINS, 12627 .v.pins = (const struct hda_pintbl[]) { 12628 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 12629 { } 12630 }, 12631 }, 12632 [ALC897_FIXUP_LENOVO_HEADSET_MODE] = { 12633 .type = HDA_FIXUP_FUNC, 12634 .v.func = alc897_fixup_lenovo_headset_mode, 12635 }, 12636 [ALC897_FIXUP_HEADSET_MIC_PIN2] = { 12637 .type = HDA_FIXUP_PINS, 12638 .v.pins = (const struct hda_pintbl[]) { 12639 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ 12640 { } 12641 }, 12642 .chained = true, 12643 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE 12644 }, 12645 [ALC897_FIXUP_UNIS_H3C_X500S] = { 12646 .type = HDA_FIXUP_VERBS, 12647 .v.verbs = (const struct hda_verb[]) { 12648 { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, 12649 {} 12650 }, 12651 }, 12652 [ALC897_FIXUP_HEADSET_MIC_PIN3] = { 12653 .type = HDA_FIXUP_PINS, 12654 .v.pins = (const struct hda_pintbl[]) { 12655 { 0x19, 0x03a11050 }, /* use as headset mic */ 12656 { } 12657 }, 12658 }, 12659 }; 12660 12661 static const struct snd_pci_quirk alc662_fixup_tbl[] = { 12662 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), 12663 SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3), 12664 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), 12665 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC), 12666 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), 12667 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), 12668 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), 12669 SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC), 12670 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 12671 SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS), 12672 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE), 12673 SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE), 12674 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12675 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12676 SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13), 12677 SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13), 12678 SND_PCI_QUIRK(0x1028, 0x060d, "Dell M3800", ALC668_FIXUP_DELL_XPS13), 12679 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12680 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12681 SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12682 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12683 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12684 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 12685 SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12686 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12687 SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12688 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), 12689 SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2), 12690 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), 12691 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), 12692 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), 12693 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50), 12694 SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50), 12695 SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751), 12696 SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), 12697 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), 12698 SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16), 12699 SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51), 12700 SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51), 12701 SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC), 12702 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8), 12703 SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16), 12704 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), 12705 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 12706 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), 12707 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 12708 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), 12709 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), 12710 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), 12711 SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN), 12712 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), 12713 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), 12714 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), 12715 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN), 12716 SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 12717 SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 12718 SND_PCI_QUIRK(0x17aa, 0x3364, "Lenovo ThinkCentre M90 Gen5", ALC897_FIXUP_HEADSET_MIC_PIN), 12719 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2), 12720 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), 12721 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), 12722 SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO), 12723 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), 12724 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON), 12725 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), 12726 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), 12727 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB), 12728 12729 #if 0 12730 /* Below is a quirk table taken from the old code. 12731 * Basically the device should work as is without the fixup table. 12732 * If BIOS doesn't give a proper info, enable the corresponding 12733 * fixup entry. 12734 */ 12735 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1), 12736 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3), 12737 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1), 12738 SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC662_FIXUP_ASUS_MODE3), 12739 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 12740 SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12741 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 12742 SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC662_FIXUP_ASUS_MODE1), 12743 SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC662_FIXUP_ASUS_MODE1), 12744 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12745 SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC662_FIXUP_ASUS_MODE7), 12746 SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC662_FIXUP_ASUS_MODE7), 12747 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC662_FIXUP_ASUS_MODE8), 12748 SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC662_FIXUP_ASUS_MODE3), 12749 SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC662_FIXUP_ASUS_MODE1), 12750 SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12751 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_FIXUP_ASUS_MODE2), 12752 SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC662_FIXUP_ASUS_MODE1), 12753 SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12754 SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 12755 SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 12756 SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12757 SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC662_FIXUP_ASUS_MODE1), 12758 SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC662_FIXUP_ASUS_MODE3), 12759 SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_FIXUP_ASUS_MODE2), 12760 SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12761 SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC662_FIXUP_ASUS_MODE5), 12762 SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC662_FIXUP_ASUS_MODE6), 12763 SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12764 SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC662_FIXUP_ASUS_MODE1), 12765 SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12766 SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12767 SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC662_FIXUP_ASUS_MODE3), 12768 SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC662_FIXUP_ASUS_MODE3), 12769 SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC662_FIXUP_ASUS_MODE1), 12770 SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC662_FIXUP_ASUS_MODE1), 12771 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC662_FIXUP_ASUS_MODE1), 12772 SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC662_FIXUP_ASUS_MODE1), 12773 SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC662_FIXUP_ASUS_MODE1), 12774 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_FIXUP_ASUS_MODE2), 12775 SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_FIXUP_ASUS_MODE2), 12776 SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC662_FIXUP_ASUS_MODE1), 12777 SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 12778 SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC662_FIXUP_ASUS_MODE3), 12779 SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC662_FIXUP_ASUS_MODE1), 12780 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC662_FIXUP_ASUS_MODE1), 12781 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC662_FIXUP_ASUS_MODE1), 12782 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_FIXUP_ASUS_MODE2), 12783 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC662_FIXUP_ASUS_MODE1), 12784 SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC662_FIXUP_ASUS_MODE4), 12785 #endif 12786 {} 12787 }; 12788 12789 static const struct hda_model_fixup alc662_fixup_models[] = { 12790 {.id = ALC662_FIXUP_ASPIRE, .name = "aspire"}, 12791 {.id = ALC662_FIXUP_IDEAPAD, .name = "ideapad"}, 12792 {.id = ALC272_FIXUP_MARIO, .name = "mario"}, 12793 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"}, 12794 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"}, 12795 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"}, 12796 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"}, 12797 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"}, 12798 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"}, 12799 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"}, 12800 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"}, 12801 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"}, 12802 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"}, 12803 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"}, 12804 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"}, 12805 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 12806 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"}, 12807 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"}, 12808 {.id = ALC662_FIXUP_BASS_16, .name = "bass16"}, 12809 {.id = ALC662_FIXUP_BASS_1A, .name = "bass1a"}, 12810 {.id = ALC668_FIXUP_AUTO_MUTE, .name = "automute"}, 12811 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"}, 12812 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"}, 12813 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"}, 12814 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"}, 12815 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"}, 12816 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"}, 12817 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"}, 12818 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"}, 12819 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"}, 12820 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 12821 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, 12822 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"}, 12823 {} 12824 }; 12825 12826 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { 12827 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 12828 {0x17, 0x02211010}, 12829 {0x18, 0x01a19030}, 12830 {0x1a, 0x01813040}, 12831 {0x21, 0x01014020}), 12832 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 12833 {0x16, 0x01813030}, 12834 {0x17, 0x02211010}, 12835 {0x18, 0x01a19040}, 12836 {0x21, 0x01014020}), 12837 SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE, 12838 {0x14, 0x01014010}, 12839 {0x18, 0x01a19020}, 12840 {0x1a, 0x0181302f}, 12841 {0x1b, 0x0221401f}), 12842 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 12843 {0x12, 0x99a30130}, 12844 {0x14, 0x90170110}, 12845 {0x15, 0x0321101f}, 12846 {0x16, 0x03011020}), 12847 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 12848 {0x12, 0x99a30140}, 12849 {0x14, 0x90170110}, 12850 {0x15, 0x0321101f}, 12851 {0x16, 0x03011020}), 12852 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 12853 {0x12, 0x99a30150}, 12854 {0x14, 0x90170110}, 12855 {0x15, 0x0321101f}, 12856 {0x16, 0x03011020}), 12857 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, 12858 {0x14, 0x90170110}, 12859 {0x15, 0x0321101f}, 12860 {0x16, 0x03011020}), 12861 SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE, 12862 {0x12, 0x90a60130}, 12863 {0x14, 0x90170110}, 12864 {0x15, 0x0321101f}), 12865 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 12866 {0x14, 0x01014010}, 12867 {0x17, 0x90170150}, 12868 {0x19, 0x02a11060}, 12869 {0x1b, 0x01813030}, 12870 {0x21, 0x02211020}), 12871 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 12872 {0x14, 0x01014010}, 12873 {0x18, 0x01a19040}, 12874 {0x1b, 0x01813030}, 12875 {0x21, 0x02211020}), 12876 SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, 12877 {0x14, 0x01014020}, 12878 {0x17, 0x90170110}, 12879 {0x18, 0x01a19050}, 12880 {0x1b, 0x01813040}, 12881 {0x21, 0x02211030}), 12882 {} 12883 }; 12884 12885 /* 12886 */ 12887 static int patch_alc662(struct hda_codec *codec) 12888 { 12889 struct alc_spec *spec; 12890 int err; 12891 12892 err = alc_alloc_spec(codec, 0x0b); 12893 if (err < 0) 12894 return err; 12895 12896 spec = codec->spec; 12897 12898 spec->shutup = alc_eapd_shutup; 12899 12900 /* handle multiple HPs as is */ 12901 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 12902 12903 alc_fix_pll_init(codec, 0x20, 0x04, 15); 12904 12905 switch (codec->core.vendor_id) { 12906 case 0x10ec0668: 12907 spec->init_hook = alc668_restore_default_value; 12908 break; 12909 } 12910 12911 alc_pre_init(codec); 12912 12913 snd_hda_pick_fixup(codec, alc662_fixup_models, 12914 alc662_fixup_tbl, alc662_fixups); 12915 snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true); 12916 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 12917 12918 alc_auto_parse_customize_define(codec); 12919 12920 if (has_cdefine_beep(codec)) 12921 spec->gen.beep_nid = 0x01; 12922 12923 if ((alc_get_coef0(codec) & (1 << 14)) && 12924 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 && 12925 spec->cdefine.platform_type == 1) { 12926 err = alc_codec_rename(codec, "ALC272X"); 12927 if (err < 0) 12928 goto error; 12929 } 12930 12931 /* automatic parse from the BIOS config */ 12932 err = alc662_parse_auto_config(codec); 12933 if (err < 0) 12934 goto error; 12935 12936 if (!spec->gen.no_analog && spec->gen.beep_nid) { 12937 switch (codec->core.vendor_id) { 12938 case 0x10ec0662: 12939 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 12940 break; 12941 case 0x10ec0272: 12942 case 0x10ec0663: 12943 case 0x10ec0665: 12944 case 0x10ec0668: 12945 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 12946 break; 12947 case 0x10ec0273: 12948 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT); 12949 break; 12950 } 12951 if (err < 0) 12952 goto error; 12953 } 12954 12955 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 12956 12957 return 0; 12958 12959 error: 12960 alc_free(codec); 12961 return err; 12962 } 12963 12964 /* 12965 * ALC680 support 12966 */ 12967 12968 static int alc680_parse_auto_config(struct hda_codec *codec) 12969 { 12970 return alc_parse_auto_config(codec, NULL, NULL); 12971 } 12972 12973 /* 12974 */ 12975 static int patch_alc680(struct hda_codec *codec) 12976 { 12977 int err; 12978 12979 /* ALC680 has no aa-loopback mixer */ 12980 err = alc_alloc_spec(codec, 0); 12981 if (err < 0) 12982 return err; 12983 12984 /* automatic parse from the BIOS config */ 12985 err = alc680_parse_auto_config(codec); 12986 if (err < 0) { 12987 alc_free(codec); 12988 return err; 12989 } 12990 12991 return 0; 12992 } 12993 12994 /* 12995 * patch entries 12996 */ 12997 static const struct hda_device_id snd_hda_id_realtek[] = { 12998 HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269), 12999 HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), 13000 HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), 13001 HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), 13002 HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269), 13003 HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), 13004 HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), 13005 HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269), 13006 HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269), 13007 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269), 13008 HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269), 13009 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269), 13010 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269), 13011 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269), 13012 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260), 13013 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262), 13014 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268), 13015 HDA_CODEC_ENTRY(0x10ec0268, "ALC268", patch_alc268), 13016 HDA_CODEC_ENTRY(0x10ec0269, "ALC269", patch_alc269), 13017 HDA_CODEC_ENTRY(0x10ec0270, "ALC270", patch_alc269), 13018 HDA_CODEC_ENTRY(0x10ec0272, "ALC272", patch_alc662), 13019 HDA_CODEC_ENTRY(0x10ec0274, "ALC274", patch_alc269), 13020 HDA_CODEC_ENTRY(0x10ec0275, "ALC275", patch_alc269), 13021 HDA_CODEC_ENTRY(0x10ec0276, "ALC276", patch_alc269), 13022 HDA_CODEC_ENTRY(0x10ec0280, "ALC280", patch_alc269), 13023 HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269), 13024 HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269), 13025 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269), 13026 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269), 13027 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269), 13028 HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269), 13029 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269), 13030 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269), 13031 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269), 13032 HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269), 13033 HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269), 13034 HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269), 13035 HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269), 13036 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269), 13037 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269), 13038 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269), 13039 HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269), 13040 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861), 13041 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd), 13042 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861), 13043 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd), 13044 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100002, "ALC662 rev2", patch_alc882), 13045 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100101, "ALC662 rev1", patch_alc662), 13046 HDA_CODEC_REV_ENTRY(0x10ec0662, 0x100300, "ALC662 rev3", patch_alc662), 13047 HDA_CODEC_ENTRY(0x10ec0663, "ALC663", patch_alc662), 13048 HDA_CODEC_ENTRY(0x10ec0665, "ALC665", patch_alc662), 13049 HDA_CODEC_ENTRY(0x10ec0667, "ALC667", patch_alc662), 13050 HDA_CODEC_ENTRY(0x10ec0668, "ALC668", patch_alc662), 13051 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662), 13052 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662), 13053 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680), 13054 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269), 13055 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269), 13056 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269), 13057 HDA_CODEC_ENTRY(0x10ec0711, "ALC711", patch_alc269), 13058 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc662), 13059 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880), 13060 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882), 13061 HDA_CODEC_ENTRY(0x10ec0883, "ALC883", patch_alc882), 13062 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100101, "ALC889A", patch_alc882), 13063 HDA_CODEC_REV_ENTRY(0x10ec0885, 0x100103, "ALC889A", patch_alc882), 13064 HDA_CODEC_ENTRY(0x10ec0885, "ALC885", patch_alc882), 13065 HDA_CODEC_ENTRY(0x10ec0887, "ALC887", patch_alc882), 13066 HDA_CODEC_REV_ENTRY(0x10ec0888, 0x100101, "ALC1200", patch_alc882), 13067 HDA_CODEC_ENTRY(0x10ec0888, "ALC888", patch_alc882), 13068 HDA_CODEC_ENTRY(0x10ec0889, "ALC889", patch_alc882), 13069 HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662), 13070 HDA_CODEC_ENTRY(0x10ec0897, "ALC897", patch_alc662), 13071 HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882), 13072 HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882), 13073 HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882), 13074 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), 13075 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), 13076 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269), 13077 {} /* terminator */ 13078 }; 13079 MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek); 13080 13081 MODULE_LICENSE("GPL"); 13082 MODULE_DESCRIPTION("Realtek HD-audio codec"); 13083 MODULE_IMPORT_NS(SND_HDA_SCODEC_COMPONENT); 13084 13085 static struct hda_codec_driver realtek_driver = { 13086 .id = snd_hda_id_realtek, 13087 }; 13088 13089 module_hda_codec_driver(realtek_driver); 13090