Lines Matching refs:spec
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);
227 struct alc_spec *spec = codec->spec;
229 if (!spec->coef0)
230 spec->coef0 = alc_read_coef_idx(codec, 0);
231 return spec->coef0;
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)
306 AC_VERB_SET_GPIO_MASK, spec->gpio_mask);
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;
585 struct alc_spec *spec = codec->spec;
602 if (!spec->no_shutup_pins)
613 struct alc_spec *spec = codec->spec;
616 if (!spec->no_depop_delay)
647 static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
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];
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;
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;
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);
781 struct alc_spec *spec = codec->spec;
783 if (spec->cdefine.fixup) {
784 ass = spec->cdefine.sku_cfg;
835 if (spec->init_amp == ALC_INIT_UNDEFINED) {
848 spec->init_amp = ALC_INIT_DEFAULT;
865 if (!alc_get_hp_pin(spec)) {
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;
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;
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)
1122 static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid,
1130 knew = snd_hda_gen_add_kctl(&spec->gen, NULL,
1157 struct alc_spec *spec = codec->spec;
1162 return spec->cdefine.enable_pcbeep;
1165 #define set_beep_amp(spec, nid, idx, dir) 0
1177 struct alc_spec *spec = codec->spec;
1178 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
1182 spec->parse_flags);
1199 struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1202 if (!spec)
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;
1213 mutex_init(&spec->coef_mutex);
1217 kfree(spec);
1647 struct alc_spec *spec;
1654 spec = codec->spec;
1655 spec->gen.need_dac_fix = 1;
1656 spec->gen.beep_nid = 0x01;
1671 if (!spec->gen.no_analog) {
1672 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
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;
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;
1896 struct alc_spec *spec;
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) {
1925 err = set_beep_amp(spec, 0x07, 0x05, HDA_INPUT);
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;
2117 struct alc_spec *spec = codec->spec;
2119 spec->gen.no_primary_hp = 1;
2120 spec->gen.no_multi_io = 1;
2133 struct alc_spec *spec = codec->spec;
2138 spec->gen.suppress_vmaster = 1;
2140 spec->gen.suppress_auto_mute = 1;
2141 spec->gen.suppress_auto_mic = 1;
2143 spec->gen.mixer_nid = 0;
2237 struct alc_spec *spec = codec->spec;
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;
2756 struct alc_spec *spec;
2763 spec = codec->spec;
2788 spec->gen.beep_nid = 0x01;
2795 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2796 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
2935 struct alc_spec *spec;
2942 spec = codec->spec;
2943 spec->gen.shared_mic_vref_pin = 0x18;
2945 spec->shutup = alc_eapd_shutup;
2964 spec->gen.beep_nid = 0x01;
2971 if (!spec->gen.no_analog && spec->gen.beep_nid) {
2972 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
3088 struct alc_spec *spec;
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,
3186 struct alc_spec *spec = codec->spec;
3189 switch (spec->codec_variant) {
3256 struct alc_spec *spec = codec->spec;
3258 if (!spec->has_hs_key)
3286 struct alc_spec *spec = codec->spec;
3288 if (!spec->has_hs_key)
3317 struct alc_spec *spec = codec->spec;
3322 spec->has_hs_key = 1;
3327 hp_pin = alc_get_hp_pin(spec);
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;
3399 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3435 struct alc_spec *spec = codec->spec;
3436 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3458 if (!spec->no_shutup_pins)
3514 struct alc_spec *spec = codec->spec;
3515 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3550 struct alc_spec *spec = codec->spec;
3551 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3572 if (!spec->no_shutup_pins)
3587 struct alc_spec *spec = codec->spec;
3588 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3591 if (spec->ultra_low_power) {
3636 struct alc_spec *spec = codec->spec;
3637 hda_nid_t hp_pin = alc_get_hp_pin(spec);
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;
3685 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3734 struct alc_spec *spec = codec->spec;
3735 hda_nid_t hp_pin = alc_get_hp_pin(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;
3790 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3827 if (spec->ultra_low_power) {
3839 struct alc_spec *spec = codec->spec;
3840 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3875 struct alc_spec *spec = codec->spec;
3876 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3912 struct alc_spec *spec = codec->spec;
3913 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3939 struct alc_spec *spec = codec->spec;
3940 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3958 if (!spec->no_shutup_pins)
3970 struct alc_spec *spec = codec->spec;
3971 hda_nid_t hp_pin = alc_get_hp_pin(spec);
3982 if (!spec->no_shutup_pins)
4002 struct alc_spec *spec = codec->spec;
4005 if (!spec->done_hp_init ||
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 &&
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;
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;
4256 struct alc_spec *spec = codec->spec;
4259 spec->gen.automute_hook = alc269_quanta_automute;
4265 struct alc_spec *spec = codec->spec;
4270 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
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;
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;
4418 spec->mute_led_polarity = pol;
4419 spec->mute_led_nid = pin - 0x0a + 0x18;
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;
4475 struct alc_spec *spec = codec->spec;
4477 alc_update_gpio_led(codec, spec->gpio_mute_led_mask,
4478 spec->mute_led_polarity, !brightness);
4487 struct alc_spec *spec = codec->spec;
4489 alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4490 spec->micmute_led_polarity, !brightness);
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;
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;
4589 struct alc_spec *spec = codec->spec;
4593 spec->cap_mute_led_nid = 0x18;
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;
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;
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;
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) {
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;
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;
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;
5111 if (spec->no_internal_mic_pin) {
5661 struct alc_spec *spec = codec->spec;
5700 if (spec->no_internal_mic_pin) {
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]];
5856 hda_nid_t hp_pin = alc_get_hp_pin(spec);
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;
5928 struct alc_spec *spec = codec->spec;
5929 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
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;
6024 struct alc_spec *spec = codec->spec;
6025 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
6035 struct alc_spec *spec = codec->spec;
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;
6079 spec->gen.mixer_nid = 0;
6092 struct alc_spec *spec = codec->spec;
6095 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
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;
6156 int hp_pin = alc_get_hp_pin(spec);
6167 struct alc_spec *spec = codec->spec;
6168 struct hda_input_mux *imux = &spec->gen.input_mux;
6177 spec->shutup = alc_shutup_dell_xps13;
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 */
6222 struct alc_spec *spec = codec->spec;
6223 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6245 struct alc_spec *spec = codec->spec;
6249 int hp_pin = alc_get_hp_pin(spec);
6261 struct alc_spec *spec = codec->spec;
6262 struct auto_pin_cfg *cfg = &spec->gen.autocfg;
6292 struct alc_spec *spec = codec->spec;
6298 vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
6308 struct alc_spec *spec = codec->spec;
6314 spec->gen.mixer_nid = 0;
6329 struct alc_spec *spec = codec->spec;
6333 spec->gen.hp_automute_hook = alc283_hp_automute_hook;
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;
6440 struct alc_spec *spec = codec->spec;
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;
6495 struct alc_spec *spec = codec->spec;
6500 spec->gen.preferred_dacs = preferred_pairs;
6552 struct alc_spec *spec = codec->spec;
6561 spec->gen.preferred_dacs = preferred_pairs;
6562 spec->gen.auto_mute_via_amp = 1;
6573 struct alc_spec *spec = codec->spec;
6576 spec->gen.preferred_dacs = preferred_pairs;
6577 spec->gen.obey_preferred_dacs = 1;
6618 struct alc_spec *spec = codec->spec;
6622 spec->ultra_low_power = true;
6723 struct alc_spec *spec = codec->spec;
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;
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);
6961 struct alc_spec *spec = cdc->spec;
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;
7006 spec->comps[0].codec = cdc;
7007 component_match_add(dev, &spec->match,
7010 spec->match);
7016 spec->gen.pcm_playback_hook =
7128 struct alc_spec *spec = codec->spec;
7129 struct hda_input_mux *imux = &spec->gen.input_mux;
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;
11197 struct alc_spec *spec = codec->spec;
11200 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
11239 struct alc_spec *spec;
11246 spec = codec->spec;
11247 spec->gen.shared_mic_vref_pin = 0x18;
11249 spec->en_3kpull_low = true;
11255 spec->shutup = alc_default_shutup;
11256 spec->init_hook = alc_default_init;
11260 spec->codec_variant = ALC269_TYPE_ALC269VA;
11265 spec->cdefine.platform_type == 1)
11267 spec->codec_variant = ALC269_TYPE_ALC269VB;
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 */
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 */
11394 spec->init_hook = alc294_init;
11400 spec->has_alc5505_dsp = 1;
11401 spec->init_hook = alc5505_dsp_init;
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;
11544 struct alc_spec *spec;
11551 spec = codec->spec;
11553 spec->gen.beep_nid = 0x23;
11556 spec->power_hook = alc_power_eapd;
11569 if (!spec->gen.no_analog) {
11570 err = set_beep_amp(spec, 0x23, 0, HDA_OUTPUT);
11617 struct alc_spec *spec = codec->spec;
11620 spec->gpio_mask |= 0x02;
11646 struct alc_spec *spec;
11653 spec = codec->spec;
11655 spec->gen.beep_nid = 0x23;
11657 spec->shutup = alc_eapd_shutup;
11669 if (!spec->gen.no_analog) {
11670 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
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;
11774 struct alc_spec *spec = codec->spec;
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;
11839 struct alc_spec *spec = codec->spec;
11849 spec->gen.mixer_nid = 0;
11850 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11862 struct alc_spec *spec = codec->spec;
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;
12664 struct alc_spec *spec;
12671 spec = codec->spec;
12673 spec->shutup = alc_eapd_shutup;
12676 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
12682 spec->init_hook = alc668_restore_default_value;
12696 spec->gen.beep_nid = 0x01;
12700 spec->cdefine.platform_type == 1) {
12711 if (!spec->gen.no_analog && spec->gen.beep_nid) {
12714 err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
12720 err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
12723 err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT);