Lines Matching refs:spec
141 struct alc_spec *spec = codec->spec;
144 mutex_lock(&spec->coef_mutex);
149 struct alc_spec *spec = codec->spec;
151 mutex_unlock(&spec->coef_mutex);
223 struct alc_spec *spec = codec->spec;
225 if (!spec->coef0)
226 spec->coef0 = alc_read_coef_idx(codec, 0);
227 return spec->coef0;
265 struct alc_spec *spec = codec->spec;
267 spec->gpio_mask |= mask;
268 spec->gpio_dir |= mask;
269 spec->gpio_data |= mask;
274 struct alc_spec *spec = codec->spec;
277 spec->gpio_data);
283 struct alc_spec *spec = codec->spec;
284 unsigned int oldval = spec->gpio_data;
287 spec->gpio_data |= mask;
289 spec->gpio_data &= ~mask;
290 if (oldval != spec->gpio_data)
296 struct alc_spec *spec = codec->spec;
298 if (!spec->gpio_mask)
302 AC_VERB_SET_GPIO_MASK, spec->gpio_mask);
304 AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir);
305 if (spec->gpio_write_delay)
362 struct alc_spec *spec = codec->spec;
364 if (spec->pll_nid)
365 alc_update_coefex_idx(codec, spec->pll_nid, spec->pll_coef_idx,
366 1 << spec->pll_coef_bit, 0);
372 struct alc_spec *spec = codec->spec;
373 spec->pll_nid = nid;
374 spec->pll_coef_idx = coef_idx;
375 spec->pll_coef_bit = coef_bit;
584 struct alc_spec *spec = codec->spec;
597 if (!spec->no_shutup_pins)
608 struct alc_spec *spec = codec->spec;
611 if (!spec->no_depop_delay)
642 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
644 if (spec->gen.autocfg.hp_pins[0])
645 return spec->gen.autocfg.hp_pins[0];
646 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
647 return spec->gen.autocfg.line_out_pins[0];
663 struct alc_spec *spec = codec->spec;
665 spec->cdefine.fixup = 1;
666 spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE;
673 struct alc_spec *spec = codec->spec;
676 spec->no_depop_delay = 1;
685 struct alc_spec *spec = codec->spec;
687 spec->cdefine.enable_pcbeep = 1; /* assume always enabled */
689 if (spec->cdefine.fixup) {
690 ass = spec->cdefine.sku_cfg;
722 spec->cdefine.port_connectivity = ass >> 30;
723 spec->cdefine.enable_pcbeep = (ass & 0x100000) >> 20;
724 spec->cdefine.check_sum = (ass >> 16) & 0xf;
725 spec->cdefine.customization = ass >> 8;
727 spec->cdefine.sku_cfg = ass;
728 spec->cdefine.external_amp = (ass & 0x38) >> 3;
729 spec->cdefine.platform_type = (ass & 0x4) >> 2;
730 spec->cdefine.swap = (ass & 0x2) >> 1;
731 spec->cdefine.override = ass & 0x1;
734 nid, spec->cdefine.sku_cfg);
736 spec->cdefine.port_connectivity);
737 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep);
738 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum);
739 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization);
740 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp);
741 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type);
742 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap);
743 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override);
776 struct alc_spec *spec = codec->spec;
778 if (spec->cdefine.fixup) {
779 ass = spec->cdefine.sku_cfg;
830 if (spec->init_amp == ALC_INIT_UNDEFINED) {
843 spec->init_amp = ALC_INIT_DEFAULT;
860 if (!alc_get_hp_pin(spec)) {
864 if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins,
865 spec->gen.autocfg.line_outs))
867 spec->gen.autocfg.hp_pins[0] = nid;
877 struct alc_spec *spec = codec->spec;
878 if (spec->init_amp == ALC_INIT_UNDEFINED) {
881 spec->init_amp = ALC_INIT_DEFAULT;
892 struct alc_spec *spec = codec->spec;
894 spec->gen.inv_dmic_split = 1;
927 struct alc_spec *spec = codec->spec;
933 if (spec->init_hook)
934 spec->init_hook(codec);
936 spec->gen.skip_verbs = 1; /* applied in below */
939 alc_auto_init_amp(codec, spec->init_amp);
949 struct alc_spec *spec = codec->spec;
954 if (spec && spec->shutup)
955 spec->shutup(codec);
962 struct alc_spec *spec = codec->spec;
964 if (spec && spec->reboot_notify)
965 spec->reboot_notify(codec);
980 struct alc_spec *spec = codec->spec;
982 if (spec && spec->power_hook)
983 spec->power_hook(codec);
991 struct alc_spec *spec = codec->spec;
993 if (!spec->no_depop_delay)
1130 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid,
1138 knew = snd_hda_gen_add_kctl(&spec->gen, NULL,
1165 struct alc_spec *spec = codec->spec;
1170 return spec->cdefine.enable_pcbeep;
1173 #define set_beep_amp(spec, nid, idx, dir) 0
1185 struct alc_spec *spec = codec->spec;
1186 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
1190 spec->parse_flags);
1207 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1210 if (!spec)
1212 codec->spec = spec;
1213 snd_hda_gen_spec_init(&spec->gen);
1214 spec->gen.mixer_nid = mixer_nid;
1215 spec->gen.own_eapd_ctl = 1;
1221 mutex_init(&spec->coef_mutex);
1225 kfree(spec);
1655 struct alc_spec *spec;
1662 spec = codec->spec;
1663 spec->gen.need_dac_fix = 1;
1664 spec->gen.beep_nid = 0x01;
1679 if (!spec->gen.no_analog) {
1680 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
1724 struct alc_spec *spec = codec->spec;
1726 alc_update_gpio_data(codec, 0x01, spec->gen.hp_jack_present);
1732 struct alc_spec *spec = codec->spec;
1737 spec->gen.automute_hook = alc260_gpio1_automute;
1738 spec->gen.detect_hp = 1;
1739 spec->gen.automute_speaker = 1;
1740 spec->gen.autocfg.hp_pins[0] = 0x0f; /* copy it for automute */
1750 struct alc_spec *spec = codec->spec;
1770 spec->init_amp = ALC_INIT_NONE;
1778 struct alc_spec *spec = codec->spec;
1780 spec->init_amp = ALC_INIT_NONE;
1786 struct alc_spec *spec = codec->spec;
1788 spec->gen.add_jack_modes = 1;
1789 spec->gen.hp_mic = 1;
1904 struct alc_spec *spec;
1911 spec = codec->spec;
1916 spec->gen.prefer_hp_amp = 1;
1917 spec->gen.beep_nid = 0x01;
1919 spec->shutup = alc_eapd_shutup;
1932 if (!spec->gen.no_analog) {
1933 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT);
2020 struct alc_spec *spec = codec->spec;
2022 spec->gpio_write_delay = true;
2056 struct alc_spec *spec = codec->spec;
2068 spec->gen.keep_vref_in_automute = 1;
2076 struct alc_spec *spec = codec->spec;
2085 spec->gen.keep_vref_in_automute = 1;
2125 struct alc_spec *spec = codec->spec;
2127 spec->gen.no_primary_hp = 1;
2128 spec->gen.no_multi_io = 1;
2141 struct alc_spec *spec = codec->spec;
2146 spec->gen.suppress_vmaster = 1;
2148 spec->gen.suppress_auto_mute = 1;
2149 spec->gen.suppress_auto_mic = 1;
2151 spec->gen.mixer_nid = 0;
2245 struct alc_spec *spec = codec->spec;
2250 if (spec->gen.hp_jack_present)
2260 struct alc_spec *spec = codec->spec;
2264 spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook;
2761 struct alc_spec *spec;
2768 spec = codec->spec;
2793 spec->gen.beep_nid = 0x01;
2800 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2801 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
2940 struct alc_spec *spec;
2947 spec = codec->spec;
2948 spec->gen.shared_mic_vref_pin = 0x18;
2950 spec->shutup = alc_eapd_shutup;
2969 spec->gen.beep_nid = 0x01;
2976 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2977 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
3093 struct alc_spec *spec;
3101 spec = codec->spec;
3103 spec->gen.beep_nid = 0x01;
3105 spec->shutup = alc_eapd_shutup;
3117 if (err > 0 && !spec->gen.no_analog &&
3118 spec->gen.autocfg.speaker_pins[0] != 0x1d) {
3120 if (!snd_hda_gen_add_kctl(&spec->gen, NULL,
3189 struct alc_spec *spec = codec->spec;
3192 switch (spec->codec_variant) {
3257 struct alc_spec *spec = codec->spec;
3259 if (!spec->has_hs_key)
3287 struct alc_spec *spec = codec->spec;
3289 if (!spec->has_hs_key)
3318 struct alc_spec *spec = codec->spec;
3322 spec->has_hs_key = 1;
3341 struct alc_spec *spec = codec->spec;
3343 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
3345 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
3392 struct alc_spec *spec = codec->spec;
3393 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3429 struct alc_spec *spec = codec->spec;
3430 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3452 if (!spec->no_shutup_pins)
3508 struct alc_spec *spec = codec->spec;
3509 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3544 struct alc_spec *spec = codec->spec;
3545 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3566 if (!spec->no_shutup_pins)
3581 struct alc_spec *spec = codec->spec;
3582 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3585 if (spec->ultra_low_power) {
3609 if (hp_pin_sense || spec->ultra_low_power)
3615 if (hp_pin_sense || spec->ultra_low_power)
3633 struct alc_spec *spec = codec->spec;
3634 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3649 if (hp_pin_sense || spec->ultra_low_power)
3657 if (spec->en_3kpull_low)
3660 if (!spec->no_shutup_pins)
3664 if (hp_pin_sense || spec->ultra_low_power)
3669 if (spec->ultra_low_power) {
3682 struct alc_spec *spec = codec->spec;
3683 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3686 if (spec->ultra_low_power) {
3705 if (hp1_pin_sense || spec->ultra_low_power)
3712 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3715 if (hp1_pin_sense || spec->ultra_low_power)
3722 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3731 struct alc_spec *spec = codec->spec;
3732 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3748 if (hp1_pin_sense || spec->ultra_low_power)
3755 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3758 if (hp1_pin_sense || spec->ultra_low_power)
3765 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)
3770 if (spec->ultra_low_power) {
3785 struct alc_spec *spec = codec->spec;
3786 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3814 struct alc_spec *spec = codec->spec;
3815 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3834 if (!spec->no_shutup_pins)
3847 struct alc_spec *spec = codec->spec;
3848 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3859 if (!spec->no_shutup_pins)
3879 struct alc_spec *spec = codec->spec;
3882 if (!spec->done_hp_init ||
3885 spec->done_hp_init = true;
3985 struct alc_spec *spec = codec->spec;
3987 if (spec->has_alc5505_dsp)
3994 struct alc_spec *spec = codec->spec;
3996 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
3998 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4005 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
4007 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
4019 if (spec->gpio_data)
4022 if (spec->has_alc5505_dsp)
4032 struct alc_spec *spec = codec->spec;
4035 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
4061 struct alc_spec *spec = codec->spec;
4064 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4097 struct alc_spec *spec = codec->spec;
4105 spec->gen.stream_analog_playback = &alc269_44k_pcm_analog_playback;
4106 spec->gen.stream_analog_capture = &alc269_44k_pcm_analog_capture;
4132 struct alc_spec *spec = codec->spec;
4135 spec->gen.automute_hook = alc269_quanta_automute;
4141 struct alc_spec *spec = codec->spec;
4146 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
4224 struct alc_spec *spec = codec->spec;
4226 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
4227 spec->gen.hp_automute_hook = alc269_x101_hp_automute_hook;
4254 struct alc_spec *spec = codec->spec;
4256 alc_update_vref_led(codec, spec->mute_led_nid,
4257 spec->mute_led_polarity, brightness);
4266 struct alc_spec *spec = codec->spec;
4269 (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
4282 struct alc_spec *spec = codec->spec;
4294 spec->mute_led_polarity = pol;
4295 spec->mute_led_nid = pin - 0x0a + 0x18;
4299 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
4300 spec->mute_led_polarity);
4309 struct alc_spec *spec = codec->spec;
4312 spec->mute_led_polarity = 0;
4313 spec->mute_led_nid = pin;
4351 struct alc_spec *spec = codec->spec;
4353 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
4354 spec->mute_led_polarity, !brightness);
4363 struct alc_spec *spec = codec->spec;
4365 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4366 spec->micmute_led_polarity, !brightness);
4376 struct alc_spec *spec = codec->spec;
4383 spec->gpio_mute_led_mask = mute_mask;
4387 spec->gpio_mic_led_mask = micmute_mask;
4425 struct alc_spec *spec = codec->spec;
4428 spec->micmute_led_polarity = 1;
4437 struct alc_spec *spec = codec->spec;
4439 alc_update_vref_led(codec, spec->cap_mute_led_nid,
4440 spec->micmute_led_polarity, brightness);
4447 struct alc_spec *spec = codec->spec;
4454 spec->gpio_mask |= 0x10;
4455 spec->gpio_dir |= 0x10;
4456 spec->cap_mute_led_nid = 0x18;
4465 struct alc_spec *spec = codec->spec;
4469 spec->cap_mute_led_nid = 0x18;
4481 struct alc_spec *spec = codec->spec;
4485 spec->gpio_mask |= 0x01;
4486 spec->gpio_dir |= 0x01;
4517 struct alc_spec *spec = codec->spec;
4520 spec->gpio_mask |= 0x04;
4521 spec->gpio_dir |= 0x04;
4522 spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4542 struct alc_spec *spec = codec->spec;
4544 alc_update_coef_led(codec, &spec->mute_led_coef,
4545 spec->mute_led_polarity, brightness);
4553 struct alc_spec *spec = codec->spec;
4556 spec->mute_led_polarity = 0;
4557 spec->mute_led_coef.idx = 0x0b;
4558 spec->mute_led_coef.mask = 1 << 3;
4559 spec->mute_led_coef.on = 1 << 3;
4560 spec->mute_led_coef.off = 0;
4569 struct alc_spec *spec = codec->spec;
4572 spec->mute_led_polarity = 0;
4573 spec->mute_led_coef.idx = 0x34;
4574 spec->mute_led_coef.mask = 1 << 5;
4575 spec->mute_led_coef.on = 0;
4576 spec->mute_led_coef.off = 1 << 5;
4584 struct alc_spec *spec = codec->spec;
4587 spec->mute_led_polarity = 0;
4588 spec->mute_led_coef.idx = 0x07;
4589 spec->mute_led_coef.mask = 1;
4590 spec->mute_led_coef.on = 1;
4591 spec->mute_led_coef.off = 0;
4601 struct alc_spec *spec = codec->spec;
4603 alc_update_coef_led(codec, &spec->mic_led_coef,
4604 spec->micmute_led_polarity, brightness);
4611 struct alc_spec *spec = codec->spec;
4614 spec->mic_led_coef.idx = 0x19;
4615 spec->mic_led_coef.mask = 1 << 13;
4616 spec->mic_led_coef.on = 1 << 13;
4617 spec->mic_led_coef.off = 0;
4625 struct alc_spec *spec = codec->spec;
4628 spec->micmute_led_polarity = 1;
4635 struct alc_spec *spec = codec->spec;
4638 spec->mic_led_coef.idx = 0x35;
4639 spec->mic_led_coef.mask = 3 << 2;
4640 spec->mic_led_coef.on = 2 << 2;
4641 spec->mic_led_coef.off = 1 << 2;
4670 struct alc_spec *spec = codec->spec;
4673 spec->cap_mute_led_nid = 0x1a;
4732 struct alc_spec *spec = codec->spec;
4736 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 1);
4737 input_sync(spec->kb_dev);
4738 input_report_key(spec->kb_dev, spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX], 0);
4739 input_sync(spec->kb_dev);
4744 struct alc_spec *spec = codec->spec;
4747 spec->kb_dev = input_allocate_device();
4748 if (!spec->kb_dev) {
4753 spec->alc_mute_keycode_map[ALC_KEY_MICMUTE_INDEX] = KEY_MICMUTE;
4755 spec->kb_dev->name = "Microphone Mute Button";
4756 spec->kb_dev->evbit[0] = BIT_MASK(EV_KEY);
4757 spec->kb_dev->keycodesize = sizeof(spec->alc_mute_keycode_map[0]);
4758 spec->kb_dev->keycodemax = ARRAY_SIZE(spec->alc_mute_keycode_map);
4759 spec->kb_dev->keycode = spec->alc_mute_keycode_map;
4760 for (i = 0; i < ARRAY_SIZE(spec->alc_mute_keycode_map); i++)
4761 set_bit(spec->alc_mute_keycode_map[i], spec->kb_dev->keybit);
4763 if (input_register_device(spec->kb_dev)) {
4765 input_free_device(spec->kb_dev);
4766 spec->kb_dev = NULL;
4781 struct alc_spec *spec = codec->spec;
4785 spec->init_amp = ALC_INIT_DEFAULT;
4789 spec->gpio_mask |= 0x06;
4790 spec->gpio_dir |= 0x02;
4791 spec->gpio_data |= 0x02;
4799 if (!spec->kb_dev)
4804 input_unregister_device(spec->kb_dev);
4805 spec->kb_dev = NULL;
4815 struct alc_spec *spec = codec->spec;
4819 spec->init_amp = ALC_INIT_DEFAULT;
4828 if (!spec->kb_dev)
4833 input_unregister_device(spec->kb_dev);
4834 spec->kb_dev = NULL;
4845 struct alc_spec *spec = codec->spec;
4849 spec->cap_mute_led_nid = 0x18;
4867 struct alc_spec *spec = codec->spec;
4942 if (spec->no_internal_mic_pin) {
5484 struct alc_spec *spec = codec->spec;
5523 if (spec->no_internal_mic_pin) {
5677 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP;
5682 struct alc_spec *spec = codec->spec;
5684 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
5685 hda_nid_t hp_pin = alc_get_hp_pin(spec);
5691 else if (mux_pin == spec->headset_mic_pin)
5693 else if (mux_pin == spec->headphone_mic_pin)
5698 if (new_headset_mode == spec->current_headset_mode) {
5706 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5707 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5708 spec->gen.hp_jack_present = false;
5711 if (spec->current_headset_type == ALC_HEADSET_TYPE_UNKNOWN)
5713 if (spec->current_headset_type == ALC_HEADSET_TYPE_CTIA)
5715 else if (spec->current_headset_type == ALC_HEADSET_TYPE_OMTP)
5717 spec->gen.hp_jack_present = true;
5720 alc_headset_mode_mic_in(codec, hp_pin, spec->headphone_mic_pin);
5721 spec->gen.hp_jack_present = false;
5725 spec->gen.hp_jack_present = true;
5731 if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin)
5732 snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin,
5735 spec->current_headset_mode = new_headset_mode;
5757 struct alc_spec *spec = codec->spec;
5758 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
5762 if (cfg->inputs[i].is_headset_mic && !spec->headset_mic_pin)
5763 spec->headset_mic_pin = cfg->inputs[i].pin;
5764 if (cfg->inputs[i].is_headphone_mic && !spec->headphone_mic_pin)
5765 spec->headphone_mic_pin = cfg->inputs[i].pin;
5768 WARN_ON(spec->gen.cap_sync_hook);
5769 spec->gen.cap_sync_hook = alc_update_headset_mode_hook;
5770 spec->gen.automute_hook = alc_update_headset_mode;
5771 spec->gen.hp_automute_hook = alc_update_headset_jack_cb;
5777 struct alc_spec *spec = codec->spec;
5781 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC;
5788 spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN;
5789 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
5800 struct alc_spec *spec = codec->spec;
5801 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5853 struct alc_spec *spec = codec->spec;
5854 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
5864 struct alc_spec *spec = codec->spec;
5868 alc_update_gpio_data(codec, 0x40, spec->gen.hp_jack_present);
5876 struct alc_spec *spec = codec->spec;
5878 spec->gpio_mask |= 0x40;
5879 spec->gpio_dir |= 0x40;
5880 spec->gen.hp_automute_hook = alc288_update_headset_jack_cb;
5888 struct alc_spec *spec = codec->spec;
5889 spec->gen.auto_mute_via_amp = 1;
5897 struct alc_spec *spec = codec->spec;
5898 spec->no_shutup_pins = 1;
5906 struct alc_spec *spec = codec->spec;
5908 spec->gen.mixer_nid = 0;
5921 struct alc_spec *spec = codec->spec;
5924 spec->reboot_notify = snd_hda_gen_reboot_notify; /* reduce noise */
5925 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
5939 struct alc_spec *spec = codec->spec;
5942 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
5965 struct alc_spec *spec = codec->spec;
5968 spec->gen.preferred_dacs = preferred_pairs;
5977 struct alc_spec *spec = codec->spec;
5980 spec->gen.preferred_dacs = preferred_pairs;
5985 struct alc_spec *spec = codec->spec;
5986 int hp_pin = alc_get_hp_pin(spec);
5997 struct alc_spec *spec = codec->spec;
5998 struct hda_input_mux *imux = &spec->gen.input_mux;
6007 spec->shutup = alc_shutup_dell_xps13;
6012 if (spec->gen.imux_pins[i] == 0x12) {
6013 spec->gen.cur_mux[0] = i;
6024 struct alc_spec *spec = codec->spec;
6027 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6028 spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
6052 struct alc_spec *spec = codec->spec;
6053 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6075 struct alc_spec *spec = codec->spec;
6079 int hp_pin = alc_get_hp_pin(spec);
6091 struct alc_spec *spec = codec->spec;
6092 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6122 struct alc_spec *spec = codec->spec;
6128 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
6138 struct alc_spec *spec = codec->spec;
6144 spec->gen.mixer_nid = 0;
6159 struct alc_spec *spec = codec->spec;
6163 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
6176 struct alc_spec *spec = codec->spec;
6179 spec->gen.mute_bits |= (1ULL << 0x14);
6185 struct alc_spec *spec = codec->spec;
6193 spec->init_amp = ALC_INIT_DEFAULT;
6197 spec->gen.auto_mute_via_amp = 1;
6198 spec->gen.automute_hook = asus_tx300_automute;
6203 spec->init_amp = ALC_INIT_DEFAULT;
6270 struct alc_spec *spec = codec->spec;
6274 alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
6275 !spec->gen.hp_jack_present);
6288 struct alc_spec *spec = codec->spec;
6293 spec->gpio_mask |= 0x10;
6294 spec->gpio_dir |= 0x10;
6295 spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook;
6303 struct alc_spec *spec = codec->spec;
6306 spec->gpio_mask |= 0x04;
6307 spec->gpio_dir |= 0x04;
6325 struct alc_spec *spec = codec->spec;
6330 spec->gen.preferred_dacs = preferred_pairs;
6382 struct alc_spec *spec = codec->spec;
6391 spec->gen.preferred_dacs = preferred_pairs;
6392 spec->gen.auto_mute_via_amp = 1;
6403 struct alc_spec *spec = codec->spec;
6406 spec->gen.preferred_dacs = preferred_pairs;
6407 spec->gen.obey_preferred_dacs = 1;
6448 struct alc_spec *spec = codec->spec;
6452 spec->ultra_low_power = true;
6553 struct alc_spec *spec = codec->spec;
6559 spec->no_internal_mic_pin = true;
6575 struct alc_spec *spec = codec->spec;
6587 spec->micmute_led_polarity = 1;
6589 spec->gpio_mask |= 0x01;
6590 spec->gpio_dir |= 0x01;
6638 struct alc_spec *spec = codec->spec;
6642 spec->gen.suppress_auto_mute = 1;
6728 struct alc_spec *spec = codec->spec;
6736 spec->gen.preferred_dacs = preferred_pairs;
9981 struct alc_spec *spec = codec->spec;
9984 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
10023 struct alc_spec *spec;
10030 spec = codec->spec;
10031 spec->gen.shared_mic_vref_pin = 0x18;
10033 spec->en_3kpull_low = true;
10039 spec->shutup = alc_default_shutup;
10040 spec->init_hook = alc_default_init;
10044 spec->codec_variant = ALC269_TYPE_ALC269VA;
10049 spec->cdefine.platform_type == 1)
10051 spec->codec_variant = ALC269_TYPE_ALC269VB;
10058 spec->codec_variant = ALC269_TYPE_ALC269VC;
10061 spec->codec_variant = ALC269_TYPE_ALC269VD;
10068 spec->shutup = alc269_shutup;
10069 spec->init_hook = alc269_fill_coef;
10075 spec->codec_variant = ALC269_TYPE_ALC280;
10078 spec->codec_variant = ALC269_TYPE_ALC282;
10079 spec->shutup = alc282_shutup;
10080 spec->init_hook = alc282_init;
10084 spec->codec_variant = ALC269_TYPE_ALC283;
10085 spec->shutup = alc283_shutup;
10086 spec->init_hook = alc283_init;
10090 spec->codec_variant = ALC269_TYPE_ALC284;
10093 spec->codec_variant = ALC269_TYPE_ALC293;
10097 spec->codec_variant = ALC269_TYPE_ALC286;
10100 spec->codec_variant = ALC269_TYPE_ALC298;
10104 spec->codec_variant = ALC269_TYPE_ALC255;
10105 spec->shutup = alc256_shutup;
10106 spec->init_hook = alc256_init;
10112 spec->codec_variant = ALC269_TYPE_ALC256;
10113 spec->shutup = alc256_shutup;
10114 spec->init_hook = alc256_init;
10115 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
10118 spec->en_3kpull_low = false;
10121 spec->codec_variant = ALC269_TYPE_ALC257;
10122 spec->shutup = alc256_shutup;
10123 spec->init_hook = alc256_init;
10124 spec->gen.mixer_nid = 0;
10125 spec->en_3kpull_low = false;
10132 spec->codec_variant = ALC269_TYPE_ALC215;
10133 spec->shutup = alc225_shutup;
10134 spec->init_hook = alc225_init;
10135 spec->gen.mixer_nid = 0;
10140 spec->codec_variant = ALC269_TYPE_ALC225;
10141 spec->shutup = alc225_shutup;
10142 spec->init_hook = alc225_init;
10143 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */
10148 spec->codec_variant = ALC269_TYPE_ALC294;
10149 spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
10151 spec->init_hook = alc294_init;
10154 spec->codec_variant = ALC269_TYPE_ALC300;
10155 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */
10158 spec->codec_variant = ALC269_TYPE_ALC623;
10164 spec->codec_variant = ALC269_TYPE_ALC700;
10165 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
10167 spec->init_hook = alc294_init;
10173 spec->has_alc5505_dsp = 1;
10174 spec->init_hook = alc5505_dsp_init;
10200 spec->gen.beep_nid = 0x01;
10207 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
10208 err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
10246 struct alc_spec *spec = codec->spec;
10256 spec->gen.keep_vref_in_automute = 1;
10317 struct alc_spec *spec;
10324 spec = codec->spec;
10326 spec->gen.beep_nid = 0x23;
10329 spec->power_hook = alc_power_eapd;
10342 if (!spec->gen.no_analog) {
10343 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT);
10390 struct alc_spec *spec = codec->spec;
10393 spec->gpio_mask |= 0x02;
10419 struct alc_spec *spec;
10426 spec = codec->spec;
10428 spec->gen.beep_nid = 0x23;
10430 spec->shutup = alc_eapd_shutup;
10442 if (!spec->gen.no_analog) {
10443 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
10516 struct alc_spec *spec = codec->spec;
10517 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps;
10526 struct alc_spec *spec = codec->spec;
10527 if (nid == codec->core.afg && power_state == AC_PWRST_D3 && spec->gpio_data)
10535 struct alc_spec *spec = codec->spec;
10539 spec->mute_led_polarity = 1;
10547 struct alc_spec *spec = codec->spec;
10552 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
10561 struct alc_spec *spec = codec->spec;
10563 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10564 spec->gen.hp_automute_hook = alc662_usi_automute_hook;
10612 struct alc_spec *spec = codec->spec;
10622 spec->gen.mixer_nid = 0;
10623 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10635 struct alc_spec *spec = codec->spec;
10639 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
10647 struct alc_spec *spec = codec->spec;
10649 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
10656 struct alc_spec *spec = codec->spec;
10659 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
10660 spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11425 struct alc_spec *spec;
11432 spec = codec->spec;
11434 spec->shutup = alc_eapd_shutup;
11437 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
11443 spec->init_hook = alc668_restore_default_value;
11457 spec->gen.beep_nid = 0x01;
11461 spec->cdefine.platform_type == 1) {
11472 if (!spec->gen.no_analog && spec->gen.beep_nid) {
11475 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
11481 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
11484 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT);