Lines Matching +full:jack +full:- +full:pol

1 // SPDX-License-Identifier: GPL-2.0-or-later
23 #include <sound/jack.h>
34 /* extra amp-initialization sequence types */
145 struct alc_spec *spec = codec->spec;
148 mutex_lock(&spec->coef_mutex);
153 struct alc_spec *spec = codec->spec;
155 mutex_unlock(&spec->coef_mutex);
207 if (val != -1)
227 struct alc_spec *spec = codec->spec;
229 if (!spec->coef0)
230 spec->coef0 = alc_read_coef_idx(codec, 0);
231 return spec->coef0;
244 #define WRITE_COEFEX(_nid, _idx, _val) UPDATE_COEFEX(_nid, _idx, -1, _val)
252 for (; fw->nid; fw++) {
253 if (fw->mask == (unsigned short)-1)
254 __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val);
256 __alc_update_coefex_idx(codec, fw->nid, fw->idx,
257 fw->mask, fw->val);
269 struct alc_spec *spec = codec->spec;
271 spec->gpio_mask |= mask;
272 spec->gpio_dir |= mask;
273 spec->gpio_data |= mask;
278 struct alc_spec *spec = codec->spec;
281 spec->gpio_data);
287 struct alc_spec *spec = codec->spec;
288 unsigned int oldval = spec->gpio_data;
291 spec->gpio_data |= mask;
293 spec->gpio_data &= ~mask;
294 if (oldval != spec->gpio_data)
300 struct alc_spec *spec = codec->spec;
302 if (!spec->gpio_mask)
305 snd_hda_codec_write(codec, codec->core.afg, 0,
306 AC_VERB_SET_GPIO_MASK, spec->gpio_mask);
307 snd_hda_codec_write(codec, codec->core.afg, 0,
308 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir);
309 if (spec->gpio_write_delay)
359 struct alc_spec *spec = codec->spec;
361 if (spec->pll_nid)
362 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx,
363 1 << spec->pll_coef_bit, 0);
369 struct alc_spec *spec = codec->spec;
370 spec->pll_nid = nid;
371 spec->pll_coef_idx = coef_idx;
372 spec->pll_coef_bit = coef_bit;
376 /* update the master volume per volume-knob's unsol event */
378 struct hda_jack_callback *jack)
390 val = snd_hda_codec_read(codec, jack->nid, 0,
393 uctl->value.integer.value[0] = val;
394 uctl->value.integer.value[1] = val;
395 kctl->put(kctl, uctl);
413 switch (codec->core.vendor_id) {
528 /* alc888-VA */
530 /* alc888-VB */
570 if (codec->bus->shutdown)
573 snd_array_for_each(&codec->init_pins, i, pin) {
575 if (pin->nid != mic_pin)
576 snd_hda_codec_read(codec, pin->nid, 0,
580 codec->pins_shutup = 1;
585 struct alc_spec *spec = codec->spec;
587 switch (codec->core.vendor_id) {
602 if (!spec->no_shutup_pins)
609 * just turning off EAPD and a little pause for avoiding pop-noise
613 struct alc_spec *spec = codec->spec;
616 if (!spec->no_depop_delay)
628 switch (codec->core.vendor_id) {
649 if (spec->gen.autocfg.hp_pins[0])
650 return spec->gen.autocfg.hp_pins[0];
651 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
652 return spec->gen.autocfg.line_out_pins[0];
660 /* Could be any non-zero and even value. When used as fixup, tells
668 struct alc_spec *spec = codec->spec;
670 spec->cdefine.fixup = 1;
671 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE;
678 struct alc_spec *spec = codec->spec;
681 spec->no_depop_delay = 1;
682 codec->depop_delay = 0;
690 struct alc_spec *spec = codec->spec;
692 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */
694 if (spec->cdefine.fixup) {
695 ass = spec->cdefine.sku_cfg;
697 return -1;
701 if (!codec->bus->pci)
702 return -1;
703 ass = codec->core.subsystem_id & 0xffff;
704 if (ass != codec->bus->pci->subsystem_device && (ass & 1))
708 if (codec->core.vendor_id == 0x10ec0260)
714 codec->core.chip_name, ass);
715 return -1;
725 return -1;
727 spec->cdefine.port_connectivity = ass >> 30;
728 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20;
729 spec->cdefine.check_sum = (ass >> 16) & 0xf;
730 spec->cdefine.customization = ass >> 8;
732 spec->cdefine.sku_cfg = ass;
733 spec->cdefine.external_amp = (ass & 0x38) >> 3;
734 spec->cdefine.platform_type = (ass & 0x4) >> 2;
735 spec->cdefine.swap = (ass & 0x2) >> 1;
736 spec->cdefine.override = ass & 0x1;
739 nid, spec->cdefine.sku_cfg);
741 spec->cdefine.port_connectivity);
742 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep);
743 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum);
744 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization);
745 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp);
746 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type);
747 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap);
748 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override);
753 /* return the position of NID in the list, or -1 if not found */
760 return -1;
768 /* check subsystem ID and set up device-specific initialization;
771 /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
775 * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36
781 struct alc_spec *spec = codec->spec;
783 if (spec->cdefine.fixup) {
784 ass = spec->cdefine.sku_cfg;
790 ass = codec->core.subsystem_id & 0xffff;
791 if (codec->bus->pci &&
792 ass != codec->bus->pci->subsystem_device && (ass & 1))
805 if (codec->core.vendor_id == 0x10ec0260)
826 ass & 0xffff, codec->core.vendor_id);
829 * 1 : Swap Jack
830 * 2 : 0 --> Desktop, 1 --> Laptop
835 if (spec->init_amp == ALC_INIT_UNDEFINED) {
848 spec->init_amp = ALC_INIT_DEFAULT;
854 * when the external headphone out jack is plugged"
859 * 10~8 : Jack location
860 * 12~11: Headphone out -> 00: PortA, 01: PortE, 02: PortD, 03: Resvered
862 * 15 : 1 --> enable the function "Mute internal speaker
863 * when the external headphone out jack is plugged"
869 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins,
870 spec->gen.autocfg.line_outs))
872 spec->gen.autocfg.hp_pins[0] = nid;
877 /* Check the validity of ALC subsystem-id
878 * ports contains an array of 4 pin NIDs for port-A, E, D and I */
882 struct alc_spec *spec = codec->spec;
883 if (spec->init_amp == ALC_INIT_UNDEFINED) {
886 spec->init_amp = ALC_INIT_DEFAULT;
897 struct alc_spec *spec = codec->spec;
899 spec->gen.inv_dmic_split = 1;
926 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME)
928 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE)
932 struct alc_spec *spec = codec->spec;
938 if (spec->init_hook)
939 spec->init_hook(codec);
941 spec->gen.skip_verbs = 1; /* applied in below */
944 alc_auto_init_amp(codec, spec->init_amp);
957 struct alc_spec *spec = codec->spec;
962 if (spec && spec->shutup)
963 spec->shutup(codec);
975 struct alc_spec *spec = codec->spec;
977 if (spec && spec->power_hook)
978 spec->power_hook(codec);
984 struct alc_spec *spec = codec->spec;
986 if (!spec->no_depop_delay)
988 codec->patch_ops.init(codec);
1041 { 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
1042 { 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
1087 for (p = rename_tbl; p->vendor_id; p++) {
1088 if (p->vendor_id != codec->core.vendor_id)
1090 if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits)
1091 return alc_codec_rename(codec, p->name);
1094 if (!codec->bus->pci)
1096 for (q = rename_pci_tbl; q->codec_vendor_id; q++) {
1097 if (q->codec_vendor_id != codec->core.vendor_id)
1099 if (q->pci_subvendor != codec->bus->pci->subsystem_vendor)
1101 if (!q->pci_subdevice ||
1102 q->pci_subdevice == codec->bus->pci->subsystem_device)
1103 return alc_codec_rename(codec, q->name);
1111 * Digital-beep handlers
1130 knew = snd_hda_gen_add_kctl(&spec->gen, NULL,
1133 return -ENOMEM;
1134 knew->private_value = beep_amp;
1147 SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1),
1149 /* denylist -- no beep available */
1157 struct alc_spec *spec = codec->spec;
1159 q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list);
1161 return q->value;
1162 return spec->cdefine.enable_pcbeep;
1177 struct alc_spec *spec = codec->spec;
1178 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
1182 spec->parse_flags);
1203 return -ENOMEM;
1204 codec->spec = spec;
1205 snd_hda_gen_spec_init(&spec->gen);
1206 spec->gen.mixer_nid = mixer_nid;
1207 spec->gen.own_eapd_ctl = 1;
1208 codec->single_adc_amp = 1;
1210 codec->spdif_status_reset = 1;
1211 codec->forced_resume = 1;
1212 codec->patch_ops = alc_patch_ops;
1213 mutex_init(&spec->coef_mutex);
1231 * ALC880 fix-ups
1261 /* enable the volume-knob widget support on NID 0x21 */
1302 { 0x1a, 0x0181344f }, /* line-in */
1350 { 0x19, 0x01a19950 }, /* mic-in */
1370 { 0x19, 0x01a19950 }, /* mic-in */
1410 { 0x18, 0x01a19950 }, /* mic-in */
1412 { 0x1a, 0x01813031 }, /* line-in */
1443 { 0x14, 0x01014010 }, /* line-out */
1447 { 0x18, 0x01a19c30 }, /* mic-in */
1449 { 0x1a, 0x01813031 }, /* line-in */
1450 { 0x1b, 0x02a19c40 }, /* front-mic */
1483 { 0x18, 0x01a19c30 }, /* mic-in */
1485 { 0x1a, 0x01813031 }, /* line-in */
1486 { 0x1b, 0x02a19c40 }, /* front-mic */
1519 { 0x18, 0x01a19c30 }, /* mic-in */
1520 { 0x19, 0x02a19c40 }, /* front-mic */
1521 { 0x1a, 0x01813031 }, /* line-in */
1551 { 0x1b, 0x0121401f }, /* HP with jack detect */
1585 * It's not quite sure whether BIOS sets the correct pin-config table
1610 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_FIXUP_5ST_DIG),
1625 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_FIXUP_5ST_DIG),
1632 {.id = ALC880_FIXUP_3ST_DIG, .name = "3stack-digout"},
1634 {.id = ALC880_FIXUP_5ST_DIG, .name = "5stack-digout"},
1636 {.id = ALC880_FIXUP_6ST_DIG, .name = "6stack-digout"},
1637 {.id = ALC880_FIXUP_6ST_AUTOMUTE, .name = "6stack-automute"},
1654 spec = codec->spec;
1655 spec->gen.need_dac_fix = 1;
1656 spec->gen.beep_nid = 0x01;
1658 codec->patch_ops.unsol_event = alc880_unsol_event;
1671 if (!spec->gen.no_analog) {
1716 struct alc_spec *spec = codec->spec;
1718 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present);
1724 struct alc_spec *spec = codec->spec;
1727 * toggle GPIO1 according to the jack state
1729 spec->gen.automute_hook = alc260_gpio1_automute;
1730 spec->gen.detect_hp = 1;
1731 spec->gen.automute_speaker = 1;
1732 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */
1742 struct alc_spec *spec = codec->spec;
1762 spec->init_amp = ALC_INIT_NONE;
1770 struct alc_spec *spec = codec->spec;
1772 spec->init_amp = ALC_INIT_NONE;
1778 struct alc_spec *spec = codec->spec;
1780 spec->gen.add_jack_modes = 1;
1781 spec->gen.hp_mic = 1;
1888 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1903 spec = codec->spec;
1908 spec->gen.prefer_hp_amp = 1;
1909 spec->gen.beep_nid = 0x01;
1911 spec->shutup = alc_eapd_shutup;
1924 if (!spec->gen.no_analog) {
1946 * 6-channel independent captures.
1948 * In addition, an independent DAC for the multi-playback (not used in this
2012 struct alc_spec *spec = codec->spec;
2014 spec->gpio_write_delay = true;
2048 struct alc_spec *spec = codec->spec;
2060 spec->gen.keep_vref_in_automute = 1;
2068 struct alc_spec *spec = codec->spec;
2077 spec->gen.keep_vref_in_automute = 1;
2112 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2117 struct alc_spec *spec = codec->spec;
2119 spec->gen.no_primary_hp = 1;
2120 spec->gen.no_multi_io = 1;
2127 /* For dual-codec configuration, we need to disable some features to avoid
2133 struct alc_spec *spec = codec->spec;
2138 spec->gen.suppress_vmaster = 1;
2139 /* auto-mute and auto-mic switch don't work with multiple codecs */
2140 spec->gen.suppress_auto_mute = 1;
2141 spec->gen.suppress_auto_mic = 1;
2143 spec->gen.mixer_nid = 0;
2145 codec->force_pin_prefix = 1;
2155 snd_ctl_rename(codec->card, kctl, newname);
2166 strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs");
2171 codec->addr == 0 ?
2172 "Rear-Panel Capture Volume" :
2173 "Front-Panel Capture Volume");
2175 codec->addr == 0 ?
2176 "Rear-Panel Capture Switch" :
2177 "Front-Panel Capture Switch");
2235 struct hda_jack_callback *jack)
2237 struct alc_spec *spec = codec->spec;
2240 snd_hda_gen_hp_automute(codec, jack);
2242 if (spec->gen.hp_jack_present)
2252 struct alc_spec *spec = codec->spec;
2256 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook;
2305 { 0x1b, 0x02214120 }, /* Front HP jack is flaky, disable jack detect */
2410 /* setting bits 1-5 disables DAC nids 0x02-0x06
2523 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2532 { 0x15, 0x02a14150 }, /* use as headset mic, without its own jack detect */
2578 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
2595 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
2596 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
2628 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
2629 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
2630 SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2634 SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
2635 SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
2636 SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
2637 SND_PCI_QUIRK(0x1462, 0x1275, "MSI-GL63", ALC1220_FIXUP_CLEVO_P950),
2638 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
2639 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
2640 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
2642 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
2644 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2650 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2654 SND_PCI_QUIRK(0x1558, 0x66a6, "Clevo PE60SN[CDE]-[GS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2657 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2662 SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
2672 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2674 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2684 {.id = ALC882_FIXUP_ABIT_AW9D_MAX, .name = "abit-aw9d"},
2685 {.id = ALC882_FIXUP_LENOVO_Y530, .name = "lenovo-y530"},
2686 {.id = ALC882_FIXUP_ACER_ASPIRE_7736, .name = "acer-aspire-7736"},
2687 {.id = ALC882_FIXUP_ASUS_W90V, .name = "asus-w90v"},
2689 {.id = ALC889_FIXUP_FRONT_HP_NO_PRESENCE, .name = "no-front-hp"},
2690 {.id = ALC889_FIXUP_VAIO_TT, .name = "vaio-tt"},
2692 {.id = ALC882_FIXUP_EAPD, .name = "alc882-eapd"},
2693 {.id = ALC883_FIXUP_EAPD, .name = "alc883-eapd"},
2697 {.id = ALC889_FIXUP_COEF, .name = "alc889-coef"},
2698 {.id = ALC882_FIXUP_ASUS_W2JC, .name = "asus-w2jc"},
2699 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
2700 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
2701 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
2702 {.id = ALC885_FIXUP_MACPRO_GPIO, .name = "macpro-gpio"},
2703 {.id = ALC889_FIXUP_DAC_ROUTE, .name = "dac-route"},
2704 {.id = ALC889_FIXUP_MBP_VREF, .name = "mbp-vref"},
2705 {.id = ALC889_FIXUP_IMAC91_VREF, .name = "imac91-vref"},
2706 {.id = ALC889_FIXUP_MBA11_VREF, .name = "mba11-vref"},
2707 {.id = ALC889_FIXUP_MBA21_VREF, .name = "mba21-vref"},
2708 {.id = ALC889_FIXUP_MP11_VREF, .name = "mp11-vref"},
2709 {.id = ALC889_FIXUP_MP41_VREF, .name = "mp41-vref"},
2710 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
2711 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
2712 {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"},
2713 {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"},
2714 {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"},
2715 {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"},
2729 SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
2763 spec = codec->spec;
2765 switch (codec->core.vendor_id) {
2788 spec->gen.beep_nid = 0x01;
2795 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2913 SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_FIXUP_BENQ_T31),
2919 {.id = ALC262_FIXUP_INV_DMIC, .name = "inv-dmic"},
2920 {.id = ALC262_FIXUP_FSC_H270, .name = "fsc-h270"},
2921 {.id = ALC262_FIXUP_FSC_S7110, .name = "fsc-s7110"},
2922 {.id = ALC262_FIXUP_HP_Z200, .name = "hp-z200"},
2924 {.id = ALC262_FIXUP_LENOVO_3000, .name = "lenovo-3000"},
2926 {.id = ALC262_FIXUP_BENQ_T31, .name = "benq-t31"},
2942 spec = codec->spec;
2943 spec->gen.shared_mic_vref_pin = 0x18;
2945 spec->shutup = alc_eapd_shutup;
2949 * under-run
2964 spec->gen.beep_nid = 0x01;
2971 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2997 mutex_lock(&codec->control_mutex);
2998 pval = kcontrol->private_value;
2999 kcontrol->private_value = (pval & ~0xff) | 0x0f;
3002 kcontrol->private_value = (pval & ~0xff) | 0x10;
3005 kcontrol->private_value = pval;
3006 mutex_unlock(&codec->control_mutex);
3059 {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"},
3060 {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
3091 /* ALC268 has no aa-loopback mixer */
3096 spec = codec->spec;
3098 spec->gen.beep_nid = 0x01;
3100 spec->shutup = alc_eapd_shutup;
3112 if (err > 0 && !spec->gen.no_analog &&
3113 spec->gen.autocfg.speaker_pins[0] != 0x1d) {
3115 if (!snd_hda_gen_add_kctl(&spec->gen, NULL,
3117 err = -ENOMEM;
3152 /* different alc269-variants */
3186 struct alc_spec *spec = codec->spec;
3189 switch (spec->codec_variant) {
3233 struct hda_jack_callback *jack)
3237 if (jack->unsol_res & (7 << 13))
3240 if (jack->unsol_res & (1 << 16 | 3 << 8))
3244 if (jack->unsol_res & (7 << 23))
3248 if (jack->unsol_res & (7 << 10))
3251 snd_hda_jack_set_button_state(codec, jack->nid, report);
3256 struct alc_spec *spec = codec->spec;
3258 if (!spec->has_hs_key)
3261 switch (codec->core.vendor_id) {
3286 struct alc_spec *spec = codec->spec;
3288 if (!spec->has_hs_key)
3291 switch (codec->core.vendor_id) {
3317 struct alc_spec *spec = codec->spec;
3322 spec->has_hs_key = 1;
3331 snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack",
3347 struct alc_spec *spec = codec->spec;
3349 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
3351 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
3398 struct alc_spec *spec = codec->spec;
3435 struct alc_spec *spec = codec->spec;
3458 if (!spec->no_shutup_pins)
3514 struct alc_spec *spec = codec->spec;
3541 /* Index 0x46 Combo jack auto switch control 2 */
3542 /* 3k pull low control for Headset jack. */
3550 struct alc_spec *spec = codec->spec;
3572 if (!spec->no_shutup_pins)
3587 struct alc_spec *spec = codec->spec;
3591 if (spec->ultra_low_power) {
3628 * Documentation/sound/hd-audio/realtek-pc-beep.rst for details of
3636 struct alc_spec *spec = codec->spec;
3654 /* 3k pull low control for Headset jack. */
3659 if (spec->en_3kpull_low)
3662 if (!spec->no_shutup_pins)
3671 if (spec->ultra_low_power) {
3684 struct alc_spec *spec = codec->spec;
3734 struct alc_spec *spec = codec->spec;
3738 if (spec->ultra_low_power) {
3745 if (spec->codec_variant != ALC269_TYPE_ALC287 &&
3746 spec->codec_variant != ALC269_TYPE_ALC245)
3748 if (!spec->done_hp_init ||
3752 spec->done_hp_init = true;
3789 struct alc_spec *spec = codec->spec;
3801 /* 3k pull low control for Headset jack. */
3827 if (spec->ultra_low_power) {
3839 struct alc_spec *spec = codec->spec;
3875 struct alc_spec *spec = codec->spec;
3912 struct alc_spec *spec = codec->spec;
3939 struct alc_spec *spec = codec->spec;
3958 if (!spec->no_shutup_pins)
3970 struct alc_spec *spec = codec->spec;
3982 if (!spec->no_shutup_pins)
4002 struct alc_spec *spec = codec->spec;
4005 if (!spec->done_hp_init ||
4006 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) {
4008 spec->done_hp_init = true;
4108 struct alc_spec *spec = codec->spec;
4110 if (spec->has_alc5505_dsp)
4118 struct alc_spec *spec = codec->spec;
4120 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4122 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4127 codec->patch_ops.init(codec);
4129 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4131 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4143 if (spec->gpio_data)
4146 if (spec->has_alc5505_dsp)
4156 struct alc_spec *spec = codec->spec;
4159 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
4185 struct alc_spec *spec = codec->spec;
4188 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4201 if (strcmp(codec->core.chip_name, "ALC271X") &&
4202 strcmp(codec->core.chip_name, "ALC269VB"))
4221 struct alc_spec *spec = codec->spec;
4229 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
4230 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
4236 /* The digital-mic unit sends PDM (differential signal) instead of
4256 struct alc_spec *spec = codec->spec;
4259 spec->gen.automute_hook = alc269_quanta_automute;
4263 struct hda_jack_callback *jack)
4265 struct alc_spec *spec = codec->spec;
4268 snd_hda_gen_hp_automute(codec, jack);
4270 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
4299 alc_write_coef_idx(codec, 0x23, initval->value_0x23);
4301 if (initval->value_0x23 != 0x1e)
4302 alc_write_coef_idx(codec, 0x25, initval->value_0x25);
4341 for (seq = dac_init; seq->value_0x23; seq++)
4348 struct alc_spec *spec = codec->spec;
4350 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4351 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
4373 /* update mute-LED according to the speaker mute state via mic VREF pin */
4377 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4378 struct alc_spec *spec = codec->spec;
4380 alc_update_vref_led(codec, spec->mute_led_nid,
4381 spec->mute_led_polarity, brightness);
4390 struct alc_spec *spec = codec->spec;
4393 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
4406 struct alc_spec *spec = codec->spec;
4413 int pol, pin;
4414 if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2)
4418 spec->mute_led_polarity = pol;
4419 spec->mute_led_nid = pin - 0x0a + 0x18;
4421 codec->power_filter = led_power_filter;
4423 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
4424 spec->mute_led_polarity);
4433 struct alc_spec *spec = codec->spec;
4436 spec->mute_led_polarity = 0;
4437 spec->mute_led_nid = pin;
4439 codec->power_filter = led_power_filter;
4467 alc_update_gpio_data(codec, mask, !enabled); /* muted -> LED on */
4474 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4475 struct alc_spec *spec = codec->spec;
4477 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
4478 spec->mute_led_polarity, !brightness);
4482 /* turn on/off mic-mute LED via GPIO per capture hook */
4486 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4487 struct alc_spec *spec = codec->spec;
4489 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4490 spec->micmute_led_polarity, !brightness);
4494 /* setup mute and mic-mute GPIO bits, add hooks appropriately */
4500 struct alc_spec *spec = codec->spec;
4507 spec->gpio_mute_led_mask = mute_mask;
4511 spec->gpio_mic_led_mask = micmute_mask;
4549 struct alc_spec *spec = codec->spec;
4552 spec->micmute_led_polarity = 1;
4556 /* turn on/off mic-mute LED per capture hook via VREF change */
4560 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4561 struct alc_spec *spec = codec->spec;
4563 alc_update_vref_led(codec, spec->cap_mute_led_nid,
4564 spec->micmute_led_polarity, brightness);
4571 struct alc_spec *spec = codec->spec;
4578 spec->gpio_mask |= 0x10;
4579 spec->gpio_dir |= 0x10;
4580 spec->cap_mute_led_nid = 0x18;
4582 codec->power_filter = led_power_filter;
4589 struct alc_spec *spec = codec->spec;
4593 spec->cap_mute_led_nid = 0x18;
4595 codec->power_filter = led_power_filter;
4605 struct alc_spec *spec = codec->spec;
4609 spec->gpio_mask |= 0x01;
4610 spec->gpio_dir |= 0x01;
4641 struct alc_spec *spec = codec->spec;
4644 spec->gpio_mask |= 0x04;
4645 spec->gpio_dir |= 0x04;
4646 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4657 alc_update_coef_idx(codec, led->idx, led->mask,
4658 on ? led->on : led->off);
4661 /* update mute-LED according to the speaker mute state via COEF bit */
4665 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4666 struct alc_spec *spec = codec->spec;
4668 alc_update_coef_led(codec, &spec->mute_led_coef,
4669 spec->mute_led_polarity, brightness);
4677 struct alc_spec *spec = codec->spec;
4680 spec->mute_led_polarity = 0;
4681 spec->mute_led_coef.idx = 0x0b;
4682 spec->mute_led_coef.mask = 1 << 3;
4683 spec->mute_led_coef.on = 1 << 3;
4684 spec->mute_led_coef.off = 0;
4693 struct alc_spec *spec = codec->spec;
4696 spec->mute_led_polarity = 0;
4697 spec->mute_led_coef.idx = 0x34;
4698 spec->mute_led_coef.mask = 1 << 5;
4699 spec->mute_led_coef.on = 0;
4700 spec->mute_led_coef.off = 1 << 5;
4708 struct alc_spec *spec = codec->spec;
4711 spec->mute_led_polarity = 0;
4712 spec->mute_led_coef.idx = 0x07;
4713 spec->mute_led_coef.mask = 1;
4714 spec->mute_led_coef.on = 1;
4715 spec->mute_led_coef.off = 0;
4724 struct alc_spec *spec = codec->spec;
4727 spec->mute_led_polarity = 0;
4728 spec->mute_led_coef.idx = 0x0b;
4729 spec->mute_led_coef.mask = 3 << 2;
4730 spec->mute_led_coef.on = 2 << 2;
4731 spec->mute_led_coef.off = 1 << 2;
4736 /* turn on/off mic-mute LED per capture hook by coef bit */
4740 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
4741 struct alc_spec *spec = codec->spec;
4743 alc_update_coef_led(codec, &spec->mic_led_coef,
4744 spec->micmute_led_polarity, brightness);
4751 struct alc_spec *spec = codec->spec;
4754 spec->mic_led_coef.idx = 0x19;
4755 spec->mic_led_coef.mask = 1 << 13;
4756 spec->mic_led_coef.on = 1 << 13;
4757 spec->mic_led_coef.off = 0;
4765 struct alc_spec *spec = codec->spec;
4768 spec->micmute_led_polarity = 1;
4775 struct alc_spec *spec = codec->spec;
4778 spec->mic_led_coef.idx = 0x35;
4779 spec->mic_led_coef.mask = 3 << 2;
4780 spec->mic_led_coef.on = 2 << 2;
4781 spec->mic_led_coef.off = 1 << 2;
4810 struct alc_spec *spec = codec->spec;
4813 spec->cap_mute_led_nid = 0x1a;
4815 codec->power_filter = led_power_filter;
4871 struct alc_spec *spec = codec->spec;
4875 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
4876 input_sync(spec->kb_dev);
4877 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
4878 input_sync(spec->kb_dev);
4883 struct alc_spec *spec = codec->spec;
4886 spec->kb_dev = input_allocate_device();
4887 if (!spec->kb_dev) {
4889 return -ENOMEM;
4892 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
4894 spec->kb_dev->name = "Microphone Mute Button";
4895 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
4896 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
4897 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
4898 spec->kb_dev->keycode = spec->alc_mute_keycode_map;
4899 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
4900 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
4902 if (input_register_device(spec->kb_dev)) {
4904 input_free_device(spec->kb_dev);
4905 spec->kb_dev = NULL;
4906 return -ENOMEM;
4920 struct alc_spec *spec = codec->spec;
4924 spec->init_amp = ALC_INIT_DEFAULT;
4928 spec->gpio_mask |= 0x06;
4929 spec->gpio_dir |= 0x02;
4930 spec->gpio_data |= 0x02;
4931 snd_hda_codec_write_cache(codec, codec->core.afg, 0,
4933 snd_hda_jack_detect_enable_callback(codec, codec->core.afg,
4938 if (!spec->kb_dev)
4943 input_unregister_device(spec->kb_dev);
4944 spec->kb_dev = NULL;
4954 struct alc_spec *spec = codec->spec;
4958 spec->init_amp = ALC_INIT_DEFAULT;
4967 if (!spec->kb_dev)
4972 input_unregister_device(spec->kb_dev);
4973 spec->kb_dev = NULL;
4980 struct alc_spec *spec = codec->spec;
4984 spec->cap_mute_led_nid = 0x18;
4992 struct alc_spec *spec = codec->spec;
4995 spec->micmute_led_polarity = 1;
5036 struct alc_spec *spec = codec->spec;
5086 UPDATE_COEF(0x1a, 1<<3, 1<<3), /* Combo JD gating with LINE1-VREFO */
5088 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5111 if (spec->no_internal_mic_pin) {
5116 switch (codec->core.vendor_id) {
5167 codec_dbg(codec, "Headset jack set to unplugged mode.\n");
5209 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5231 switch (codec->core.vendor_id) {
5307 codec_dbg(codec, "Headset jack set to mic-in mode.\n");
5357 UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
5359 UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
5376 switch (codec->core.vendor_id) {
5427 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n");
5487 switch (codec->core.vendor_id) {
5551 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n");
5604 switch (codec->core.vendor_id) {
5654 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n");
5661 struct alc_spec *spec = codec->spec;
5663 WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
5664 WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
5681 UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
5700 if (spec->no_internal_mic_pin) {
5705 switch (codec->core.vendor_id) {
5846 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n",
5848 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP;
5853 struct alc_spec *spec = codec->spec;
5855 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
5862 else if (mux_pin == spec->headset_mic_pin)
5864 else if (mux_pin == spec->headphone_mic_pin)
5869 if (new_headset_mode == spec->current_headset_mode) {
5877 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5878 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5879 spec->gen.hp_jack_present = false;
5882 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN)
5884 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA)
5886 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP)
5888 spec->gen.hp_jack_present = true;
5891 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin);
5892 spec->gen.hp_jack_present = false;
5896 spec->gen.hp_jack_present = true;
5902 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin)
5903 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin,
5906 spec->current_headset_mode = new_headset_mode;
5919 struct hda_jack_callback *jack)
5921 snd_hda_gen_hp_automute(codec, jack);
5928 struct alc_spec *spec = codec->spec;
5929 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
5932 for (i = 0; i < cfg->num_inputs; i++) {
5933 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin)
5934 spec->headset_mic_pin = cfg->inputs[i].pin;
5935 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin)
5936 spec->headphone_mic_pin = cfg->inputs[i].pin;
5939 WARN_ON(spec->gen.cap_sync_hook);
5940 spec->gen.cap_sync_hook = alc_update_headset_mode_hook;
5941 spec->gen.automute_hook = alc_update_headset_mode;
5942 spec->gen.hp_automute_hook = alc_update_headset_jack_cb;
5948 struct alc_spec *spec = codec->spec;
5952 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC;
5959 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5960 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5971 struct alc_spec *spec = codec->spec;
5972 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5997 switch (codec->core.vendor_id) {
6024 struct alc_spec *spec = codec->spec;
6025 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6033 struct hda_jack_callback *jack)
6035 struct alc_spec *spec = codec->spec;
6037 alc_update_headset_jack_cb(codec, jack);
6039 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
6047 struct alc_spec *spec = codec->spec;
6049 spec->gpio_mask |= 0x40;
6050 spec->gpio_dir |= 0x40;
6051 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
6059 struct alc_spec *spec = codec->spec;
6060 spec->gen.auto_mute_via_amp = 1;
6068 struct alc_spec *spec = codec->spec;
6069 spec->no_shutup_pins = 1;
6077 struct alc_spec *spec = codec->spec;
6078 /* Disable AA-loopback as it causes white noise */
6079 spec->gen.mixer_nid = 0;
6092 struct alc_spec *spec = codec->spec;
6095 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6096 codec->power_save_node = 0; /* avoid click noises */
6109 struct alc_spec *spec = codec->spec;
6112 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
6135 struct alc_spec *spec = codec->spec;
6138 spec->gen.preferred_dacs = preferred_pairs;
6147 struct alc_spec *spec = codec->spec;
6150 spec->gen.preferred_dacs = preferred_pairs;
6155 struct alc_spec *spec = codec->spec;
6167 struct alc_spec *spec = codec->spec;
6168 struct hda_input_mux *imux = &spec->gen.input_mux;
6173 /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise
6177 spec->shutup = alc_shutup_dell_xps13;
6181 for (i = 0; i < imux->num_items; i++) {
6182 if (spec->gen.imux_pins[i] == 0x12) {
6183 spec->gen.cur_mux[0] = i;
6194 struct alc_spec *spec = codec->spec;
6197 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6198 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
6200 /* Disable boost for mic-in permanently. (This code is only called
6222 struct alc_spec *spec = codec->spec;
6223 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6228 for (i = 0; i < cfg->num_inputs; i++) {
6229 if (cfg->inputs[i].type != AUTO_PIN_MIC)
6231 nid = cfg->inputs[i].pin;
6245 struct alc_spec *spec = codec->spec;
6261 struct alc_spec *spec = codec->spec;
6262 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6272 for (i = 0; i < cfg->num_inputs; i++) {
6273 hda_nid_t nid = cfg->inputs[i].pin;
6275 if (cfg->inputs[i].type != AUTO_PIN_MIC)
6290 struct hda_jack_callback *jack)
6292 struct alc_spec *spec = codec->spec;
6296 snd_hda_gen_hp_automute(codec, jack);
6298 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
6308 struct alc_spec *spec = codec->spec;
6313 /* Disable AA-loopback as it causes white noise */
6314 spec->gen.mixer_nid = 0;
6317 /* MIC2-VREF control */
6329 struct alc_spec *spec = codec->spec;
6333 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
6336 /* MIC2-VREF control */
6346 struct alc_spec *spec = codec->spec;
6349 spec->gen.mute_bits |= (1ULL << 0x14);
6355 struct alc_spec *spec = codec->spec;
6363 spec->init_amp = ALC_INIT_DEFAULT;
6367 spec->gen.auto_mute_via_amp = 1;
6368 spec->gen.automute_hook = asus_tx300_automute;
6373 spec->init_amp = ALC_INIT_DEFAULT;
6406 Amp-out capability. we change the speaker's route to:
6407 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
6408 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
6438 struct hda_jack_callback *jack)
6440 struct alc_spec *spec = codec->spec;
6442 snd_hda_gen_hp_automute(codec, jack);
6444 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
6445 !spec->gen.hp_jack_present);
6458 struct alc_spec *spec = codec->spec;
6463 spec->gpio_mask |= 0x10;
6464 spec->gpio_dir |= 0x10;
6465 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
6473 struct alc_spec *spec = codec->spec;
6476 spec->gpio_mask |= 0x04;
6477 spec->gpio_dir |= 0x04;
6484 * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly
6485 * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC
6486 * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp
6495 struct alc_spec *spec = codec->spec;
6500 spec->gen.preferred_dacs = preferred_pairs;
6523 strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs");
6528 codec->addr == 0 ?
6529 "Rear-Panel Capture Volume" :
6530 "Front-Panel Capture Volume");
6532 codec->addr == 0 ?
6533 "Rear-Panel Capture Switch" :
6534 "Front-Panel Capture Switch");
6545 codec->power_save_node = 1;
6552 struct alc_spec *spec = codec->spec;
6561 spec->gen.preferred_dacs = preferred_pairs;
6562 spec->gen.auto_mute_via_amp = 1;
6563 codec->power_save_node = 0;
6573 struct alc_spec *spec = codec->spec;
6576 spec->gen.preferred_dacs = preferred_pairs;
6577 spec->gen.obey_preferred_dacs = 1;
6593 switch (codec->core.vendor_id) {
6618 struct alc_spec *spec = codec->spec;
6622 spec->ultra_low_power = true;
6723 struct alc_spec *spec = codec->spec;
6727 /* Mic RING SLEEVE swap for combo jack */
6729 spec->no_internal_mic_pin = true;
6745 struct alc_spec *spec = codec->spec;
6757 spec->micmute_led_polarity = 1;
6759 spec->gpio_mask |= 0x01;
6760 spec->gpio_dir |= 0x01;
6825 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0);
6827 /* Auto-enable headset mic when plugged */
6838 "B&O-Tuned Playback Volume");
6862 struct alc_spec *spec = codec->spec;
6866 spec->gen.suppress_auto_mute = 1;
6874 struct alc_spec *spec = cdc->spec;
6876 return component_bind_all(dev, spec->comps);
6882 struct alc_spec *spec = cdc->spec;
6884 component_unbind_all(dev, spec->comps);
6895 struct alc_spec *spec = cdc->spec;
6899 if (spec->comps[i].dev && spec->comps[i].pre_playback_hook)
6900 spec->comps[i].pre_playback_hook(spec->comps[i].dev, action);
6903 if (spec->comps[i].dev && spec->comps[i].playback_hook)
6904 spec->comps[i].playback_hook(spec->comps[i].dev, action);
6907 if (spec->comps[i].dev && spec->comps[i].post_playback_hook)
6908 spec->comps[i].post_playback_hook(spec->comps[i].dev, action);
6923 int n = strlen(p->bus);
6927 if (strncmp(d, p->bus, n))
6933 snprintf(tmp, sizeof(tmp), "-%s:00-cs35l41-hda.%d", p->hid, p->index);
6942 int n = strlen(p->bus);
6946 if (strncmp(d, p->bus, n))
6952 snprintf(tmp, sizeof(tmp), "-%s:00", p->hid);
6961 struct alc_spec *spec = cdc->spec;
6971 rec->bus = bus;
6972 rec->hid = hid;
6973 rec->index = i;
6974 spec->comps[i].codec = cdc;
6975 component_match_add(dev, &spec->match,
6978 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
6982 spec->gen.pcm_playback_hook = comp_generic_playback_hook;
6994 struct alc_spec *spec = cdc->spec;
7003 rec->bus = bus;
7004 rec->hid = hid;
7005 rec->index = 0;
7006 spec->comps[0].codec = cdc;
7007 component_match_add(dev, &spec->match,
7010 spec->match);
7016 spec->gen.pcm_playback_hook =
7080 * plugged-in state, while the internal microphone is always in an
7098 * The audio jack input and output is not detected on the ASRock NUC Box
7116 if (codec->core.vendor_id == 0x10ec0256) {
7128 struct alc_spec *spec = codec->spec;
7129 struct hda_input_mux *imux = &spec->gen.input_mux;
7138 * to Hi-Z to avoid pop noises at startup and when plugging and
7149 for (i = 0; i < imux->num_items; i++) {
7150 if (spec->gen.imux_pins[i] == 0x12) {
7151 spec->gen.cur_mux[0] = i;
7185 struct alc_spec *spec = codec->spec;
7191 spec->gen.preferred_dacs = preferred_pairs;
7211 struct alc_spec *spec = codec->spec;
7219 spec->gen.preferred_dacs = preferred_pairs;
7228 struct alc_spec *spec = codec->spec;
7238 spec->gen.preferred_dacs = preferred_pairs;
7239 spec->gen.auto_mute_via_amp = 1;
7240 if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
7249 struct alc_spec *spec = codec->spec;
7259 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
7557 if (codec->core.vendor_id == 0x10ec0298)
7577 if (codec->core.subsystem_id == 0x17aa3802)
7689 { 0x1a, 0x2101103f }, /* dock line-out */
7690 { 0x1b, 0x23a11040 }, /* dock mic-in */
7699 { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
7751 { 0x19, 0x99a3092f }, /* int-mic */
7758 { 0x12, 0x99a3092f }, /* int-mic */
7770 { 0x19, 0x99a3092f }, /* int-mic */
7778 { 0x12, 0x99a3092f }, /* int-mic */
7848 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7849 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7866 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7875 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7884 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7885 { 0x1b, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
7904 { 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
7913 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7972 { 0x1b, 0x99a7012f }, /* int-mic */
7992 { 0x12, 0x99a3092f }, /* int-mic */
8017 /* class-D output amp +5dB */
8043 { 0x12, 0x99a3092f }, /* int-mic */
8116 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8125 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8134 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8135 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8150 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8169 { 0x18, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8170 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8234 { 0x1b, 0x21011020 }, /* line-out */
8236 { 0x18, 0x2181103f }, /* line-in */
8245 { 0x1b, 0x21011020 }, /* line-out */
8246 { 0x18, 0x2181103f }, /* line-in */
8271 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8272 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8318 { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
8327 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8328 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8337 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8393 /* Disable pass-through path for FRONT 14h */
8499 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8500 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
8509 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8510 { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */
8524 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8538 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8587 { 0x19, 0x02a1913c }, /* use as Front headset mic, without its own jack detect */
8655 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8689 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8699 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8740 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
8749 /* Disable PCBEEP-IN passthrough */
8771 { 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
8802 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
8811 { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
8827 { 0x21, 0x90170150 }, /* use as headset mic, without its own jack detect */
8962 /* set 0x15 to HP-OUT ctrl */
8989 /* set 0x15 to HP-OUT ctrl */
8993 /* set 0x1b to HP-OUT */
9019 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */
9095 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9105 { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */
9124 { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */
9139 { 0x19, 0x03a11020 }, /* headset mic with jack detect */
9146 { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
9244 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9253 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9322 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
9337 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
9559 { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
9628 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
9779 SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9782 SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9783 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
9784 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
9785 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
9787 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
9789 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
9790 SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
9792 SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
9793 SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9794 SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9797 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
9798 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
9802 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
9803 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9807 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
9808 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9809 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9810 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
9811 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
9812 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
9814 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9815 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9816 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
9817 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
9818 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9878 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9882 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK),
9891 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9892 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9893 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9895 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9896 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9897 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9898 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
9971 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
9974 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9975 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
9977 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
9979 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
9983 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9985 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9986 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9987 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
9997 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
10007 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10009 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10019 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10020 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10023 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10024 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
10035 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10036 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10037 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
10042 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
10043 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED),
10046 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
10072 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
10073 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
10074 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
10118 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
10262 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10268 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10270 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
10271 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
10272 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
10273 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
10274 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
10278 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
10279 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
10284 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
10285 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
10286 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
10288 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC),
10330 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10340 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10341 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10342 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10343 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC),
10344 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
10351 SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10352 SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10353 SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
10396 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C),
10437 SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10451 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
10452 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
10460 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
10461 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C),
10462 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C),
10463 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C),
10472 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
10475 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
10501 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
10502 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
10503 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC),
10507 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
10511 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE),
10531 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
10536 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
10607 {.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
10608 {.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
10609 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
10610 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
10611 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
10612 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
10613 {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"},
10614 {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"},
10615 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
10616 {.id = ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST, .name = "lenovo-dock-limit-boost"},
10617 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
10618 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic1-led"},
10619 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
10620 {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
10621 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
10622 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
10623 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
10624 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
10625 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
10626 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
10629 {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
10630 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
10631 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
10632 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
10634 {.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
10635 {.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
10636 {.id = ALC269_FIXUP_LENOVO_EAPD, .name = "lenovo-eapd"},
10637 {.id = ALC275_FIXUP_SONY_HWEQ, .name = "sony-hweq"},
10640 {.id = ALC269_FIXUP_LIFEBOOK_EXTMIC, .name = "lifebook-extmic"},
10641 {.id = ALC269_FIXUP_LIFEBOOK_HP_PIN, .name = "lifebook-hp-pin"},
10642 {.id = ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, .name = "lifebook-u7x7"},
10643 {.id = ALC269VB_FIXUP_AMIC, .name = "alc269vb-amic"},
10644 {.id = ALC269VB_FIXUP_DMIC, .name = "alc269vb-dmic"},
10645 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC1, .name = "hp-mute-led-mic1"},
10646 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC2, .name = "hp-mute-led-mic2"},
10647 {.id = ALC269_FIXUP_HP_MUTE_LED_MIC3, .name = "hp-mute-led-mic3"},
10648 {.id = ALC269_FIXUP_HP_GPIO_MIC1_LED, .name = "hp-gpio-mic1"},
10649 {.id = ALC269_FIXUP_HP_LINE1_MIC1_LED, .name = "hp-line1-mic1"},
10651 {.id = ALC286_FIXUP_SONY_MIC_NO_PRESENCE, .name = "sony-nomic"},
10652 {.id = ALC269_FIXUP_ASPIRE_HEADSET_MIC, .name = "aspire-headset-mic"},
10653 {.id = ALC269_FIXUP_ASUS_X101, .name = "asus-x101"},
10654 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK, .name = "acer-ao7xx"},
10655 {.id = ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, .name = "acer-aspire-e1"},
10656 {.id = ALC269_FIXUP_ACER_AC700, .name = "acer-ac700"},
10657 {.id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST, .name = "limit-mic-boost"},
10658 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK, .name = "asus-zenbook"},
10659 {.id = ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, .name = "asus-zenbook-ux31a"},
10661 {.id = ALC282_FIXUP_ASUS_TX300, .name = "asus-tx300"},
10662 {.id = ALC283_FIXUP_INT_MIC, .name = "alc283-int-mic"},
10663 {.id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK, .name = "mono-speakers"},
10664 {.id = ALC290_FIXUP_SUBWOOFER_HSJACK, .name = "alc290-subwoofer"},
10666 {.id = ALC269_FIXUP_DMIC_THINKPAD_ACPI, .name = "dmic-thinkpad"},
10667 {.id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .name = "alc255-acer"},
10668 {.id = ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc255-asus"},
10669 {.id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc255-dell1"},
10670 {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"},
10671 {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"},
10672 {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"},
10673 {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"},
10674 {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"},
10675 {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"},
10676 {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"},
10677 {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
10678 {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"},
10679 {.id = ALC280_FIXUP_HP_DOCK_PINS, .name = "hp-dock-pins"},
10680 {.id = ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, .name = "hp-dock-gpio-mic"},
10681 {.id = ALC280_FIXUP_HP_9480M, .name = "hp-9480m"},
10682 {.id = ALC288_FIXUP_DELL_HEADSET_MODE, .name = "alc288-dell-headset"},
10683 {.id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc288-dell1"},
10684 {.id = ALC288_FIXUP_DELL_XPS_13, .name = "alc288-dell-xps13"},
10685 {.id = ALC292_FIXUP_DELL_E7X, .name = "dell-e7x"},
10686 {.id = ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, .name = "alc293-dell"},
10687 {.id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc298-dell1"},
10688 {.id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, .name = "alc298-dell-aio"},
10689 {.id = ALC275_FIXUP_DELL_XPS, .name = "alc275-dell-xps"},
10690 {.id = ALC293_FIXUP_LENOVO_SPK_NOISE, .name = "lenovo-spk-noise"},
10691 {.id = ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, .name = "lenovo-hotkey"},
10692 {.id = ALC255_FIXUP_DELL_SPK_NOISE, .name = "dell-spk-noise"},
10693 {.id = ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc225-dell1"},
10694 {.id = ALC295_FIXUP_DISABLE_DAC3, .name = "alc295-disable-dac3"},
10695 {.id = ALC285_FIXUP_SPEAKER2_TO_DAC1, .name = "alc285-speaker2-to-dac1"},
10696 {.id = ALC280_FIXUP_HP_HEADSET_MIC, .name = "alc280-hp-headset"},
10697 {.id = ALC221_FIXUP_HP_FRONT_MIC, .name = "alc221-hp-mic"},
10698 {.id = ALC298_FIXUP_SPK_VOLUME, .name = "alc298-spk-volume"},
10699 {.id = ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, .name = "dell-inspiron-7559"},
10700 {.id = ALC269_FIXUP_ATIV_BOOK_8, .name = "ativ-book"},
10701 {.id = ALC221_FIXUP_HP_MIC_NO_PRESENCE, .name = "alc221-hp-mic"},
10702 {.id = ALC256_FIXUP_ASUS_HEADSET_MODE, .name = "alc256-asus-headset"},
10703 {.id = ALC256_FIXUP_ASUS_MIC, .name = "alc256-asus-mic"},
10704 {.id = ALC256_FIXUP_ASUS_AIO_GPIO2, .name = "alc256-asus-aio"},
10705 {.id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, .name = "alc233-asus"},
10706 {.id = ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, .name = "alc233-eapd"},
10707 {.id = ALC294_FIXUP_LENOVO_MIC_LOCATION, .name = "alc294-lenovo-mic"},
10708 {.id = ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, .name = "alc225-wyse"},
10709 {.id = ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, .name = "alc274-dell-aio"},
10710 {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
10711 {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
10712 {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
10713 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
10714 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
10715 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
10716 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
10717 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
10718 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
10719 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
10720 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
10721 {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
10722 {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
10723 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
10724 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
10725 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
10726 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
10727 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
10728 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
10729 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
10730 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
10731 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"},
10732 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"},
10733 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"},
11197 struct alc_spec *spec = codec->spec;
11200 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
11220 if (val != -1 && (val & 0x0c00) >> 10 != 0x1) {
11225 if (val != -1 && (val & 0x01c0) >> 6 != 0x4) {
11246 spec = codec->spec;
11247 spec->gen.shared_mic_vref_pin = 0x18;
11248 codec->power_save_node = 0;
11249 spec->en_3kpull_low = true;
11252 codec->patch_ops.suspend = alc269_suspend;
11253 codec->patch_ops.resume = alc269_resume;
11255 spec->shutup = alc_default_shutup;
11256 spec->init_hook = alc_default_init;
11258 switch (codec->core.vendor_id) {
11260 spec->codec_variant = ALC269_TYPE_ALC269VA;
11263 if (codec->bus->pci &&
11264 codec->bus->pci->subsystem_vendor == 0x1025 &&
11265 spec->cdefine.platform_type == 1)
11267 spec->codec_variant = ALC269_TYPE_ALC269VB;
11270 if (codec->bus->pci &&
11271 codec->bus->pci->subsystem_vendor == 0x17aa &&
11272 codec->bus->pci->subsystem_device == 0x21f3)
11274 spec->codec_variant = ALC269_TYPE_ALC269VC;
11277 spec->codec_variant = ALC269_TYPE_ALC269VD;
11284 spec->shutup = alc269_shutup;
11285 spec->init_hook = alc269_fill_coef;
11291 spec->codec_variant = ALC269_TYPE_ALC280;
11294 spec->codec_variant = ALC269_TYPE_ALC282;
11295 spec->shutup = alc282_shutup;
11296 spec->init_hook = alc282_init;
11300 spec->codec_variant = ALC269_TYPE_ALC283;
11301 spec->shutup = alc283_shutup;
11302 spec->init_hook = alc283_init;
11306 spec->codec_variant = ALC269_TYPE_ALC284;
11309 spec->codec_variant = ALC269_TYPE_ALC293;
11313 spec->codec_variant = ALC269_TYPE_ALC286;
11316 spec->codec_variant = ALC269_TYPE_ALC298;
11320 spec->codec_variant = ALC269_TYPE_ALC255;
11321 spec->shutup = alc256_shutup;
11322 spec->init_hook = alc256_init;
11328 spec->codec_variant = ALC269_TYPE_ALC256;
11329 spec->shutup = alc256_shutup;
11330 spec->init_hook = alc256_init;
11331 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
11332 if (codec->core.vendor_id == 0x10ec0236 &&
11333 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
11334 spec->en_3kpull_low = false;
11337 spec->codec_variant = ALC269_TYPE_ALC257;
11338 spec->shutup = alc256_shutup;
11339 spec->init_hook = alc256_init;
11340 spec->gen.mixer_nid = 0;
11341 spec->en_3kpull_low = false;
11348 spec->codec_variant = ALC269_TYPE_ALC245;
11350 spec->codec_variant = ALC269_TYPE_ALC215;
11351 spec->shutup = alc225_shutup;
11352 spec->init_hook = alc225_init;
11353 spec->gen.mixer_nid = 0;
11358 spec->codec_variant = ALC269_TYPE_ALC225;
11359 spec->shutup = alc225_shutup;
11360 spec->init_hook = alc225_init;
11361 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
11364 spec->codec_variant = ALC269_TYPE_ALC287;
11365 spec->shutup = alc225_shutup;
11366 spec->init_hook = alc225_init;
11367 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */
11372 spec->codec_variant = ALC269_TYPE_ALC294;
11373 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
11375 spec->init_hook = alc294_init;
11378 spec->codec_variant = ALC269_TYPE_ALC300;
11379 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
11383 spec->codec_variant = ALC269_TYPE_ALC623;
11384 spec->shutup = alc222_shutup;
11385 spec->init_hook = alc222_init;
11391 spec->codec_variant = ALC269_TYPE_ALC700;
11392 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
11393 alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
11394 spec->init_hook = alc294_init;
11400 spec->has_alc5505_dsp = 1;
11401 spec->init_hook = alc5505_dsp_init;
11412 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
11413 codec->core.vendor_id == 0x10ec0294) {
11415 codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
11427 spec->gen.beep_nid = 0x01;
11434 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
11435 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
11473 struct alc_spec *spec = codec->spec;
11483 spec->gen.keep_vref_in_automute = 1;
11486 /* suppress the jack-detection */
11491 codec->no_jack_detect = 1;
11551 spec = codec->spec;
11553 spec->gen.beep_nid = 0x23;
11556 spec->power_hook = alc_power_eapd;
11569 if (!spec->gen.no_analog) {
11585 * ALC861-VD support
11617 struct alc_spec *spec = codec->spec;
11620 spec->gpio_mask |= 0x02;
11637 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
11638 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
11653 spec = codec->spec;
11655 spec->gen.beep_nid = 0x23;
11657 spec->shutup = alc_eapd_shutup;
11669 if (!spec->gen.no_analog) {
11690 * 6-channel independent captures.
11692 * In addition, an independent DAC for the multi-playback (not used in this
11707 if (codec->core.vendor_id == 0x10ec0272 || codec->core.vendor_id == 0x10ec0663 ||
11708 codec->core.vendor_id == 0x10ec0665 || codec->core.vendor_id == 0x10ec0670 ||
11709 codec->core.vendor_id == 0x10ec0671)
11743 struct alc_spec *spec = codec->spec;
11744 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps;
11753 struct alc_spec *spec = codec->spec;
11754 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data)
11762 struct alc_spec *spec = codec->spec;
11766 spec->mute_led_polarity = 1;
11767 codec->power_filter = gpio_led_power_filter;
11772 struct hda_jack_callback *jack)
11774 struct alc_spec *spec = codec->spec;
11777 snd_hda_gen_hp_automute(codec, jack);
11779 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
11788 struct alc_spec *spec = codec->spec;
11790 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11791 spec->gen.hp_automute_hook = alc662_usi_automute_hook;
11801 * 0x15 - front left/front right
11802 * 0x18 - front center/ LFE
11816 /* Pin 0x1b: shared headphones jack and surround speakers */
11839 struct alc_spec *spec = codec->spec;
11842 { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
11849 spec->gen.mixer_nid = 0;
11850 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11860 struct hda_jack_callback *jack)
11862 struct alc_spec *spec = codec->spec;
11865 snd_hda_gen_hp_automute(codec, jack);
11866 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
11873 struct alc_spec *spec = codec->spec;
11875 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11876 spec->no_shutup_pins = 1;
11886 struct alc_spec *spec = codec->spec;
11889 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11890 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
12016 {0x19, 0x90a7013f}, /* int-mic */
12052 { 0x19, 0x99a3092f }, /* int-mic */
12064 { 0x19, 0x99a3092f }, /* int-mic */
12077 { 0x19, 0x99a3094f }, /* int-mic */
12090 { 0x19, 0x99a3094f }, /* int-mic */
12104 { 0x19, 0x99a3094f }, /* int-mic */
12116 { 0x19, 0x99a3094f }, /* int-mic */
12129 { 0x19, 0x99a3094f }, /* int-mic */
12141 { 0x12, 0x99a30970 }, /* int-mic */
12187 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12201 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12202 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12254 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12256 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12286 { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
12287 { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
12315 { 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
12335 { 0x1b, 0x11130012 }, /* surround plus jack for HP */
12348 { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */
12357 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
12403 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
12414 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
12438 SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3),
12447 SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE),
12494 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
12502 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB),
12568 {.id = ALC662_FIXUP_HP_RP5800, .name = "hp-rp5800"},
12569 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
12570 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
12571 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
12572 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
12573 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
12574 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
12575 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
12576 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
12577 {.id = ALC662_FIXUP_ZOTAC_Z68, .name = "zotac-z68"},
12578 {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
12579 {.id = ALC662_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc662-headset-multi"},
12580 {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
12581 {.id = ALC662_FIXUP_HEADSET_MODE, .name = "alc662-headset"},
12582 {.id = ALC668_FIXUP_HEADSET_MODE, .name = "alc668-headset"},
12586 {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"},
12587 {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"},
12588 {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"},
12589 {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"},
12590 {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"},
12591 {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"},
12592 {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"},
12593 {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"},
12594 {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
12595 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
12596 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
12597 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
12671 spec = codec->spec;
12673 spec->shutup = alc_eapd_shutup;
12676 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
12680 switch (codec->core.vendor_id) {
12682 spec->init_hook = alc668_restore_default_value;
12696 spec->gen.beep_nid = 0x01;
12699 codec->bus->pci && codec->bus->pci->subsystem_vendor == 0x1025 &&
12700 spec->cdefine.platform_type == 1) {
12711 if (!spec->gen.no_analog && spec->gen.beep_nid) {
12712 switch (codec->core.vendor_id) {
12754 /* ALC680 has no aa-loopback mixer */
12816 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
12818 HDA_CODEC_ENTRY(0x10ec0862, "ALC861-VD", patch_alc861vd),
12857 MODULE_DESCRIPTION("Realtek HD-audio codec");