Lines Matching full:spec
56 static int set_beep_amp(struct conexant_spec *spec, hda_nid_t nid, in set_beep_amp() argument
63 spec->gen.beep_nid = nid; in set_beep_amp()
65 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
76 struct conexant_spec *spec = codec->spec; in cx_auto_parse_beep() local
81 return set_beep_amp(spec, nid, 0, HDA_OUTPUT); in cx_auto_parse_beep()
95 struct conexant_spec *spec = codec->spec; in cx_auto_parse_eapd() local
103 spec->eapds[spec->num_eapds++] = nid; in cx_auto_parse_eapd()
104 if (spec->num_eapds >= ARRAY_SIZE(spec->eapds)) in cx_auto_parse_eapd()
114 if (spec->num_eapds > 2) in cx_auto_parse_eapd()
115 spec->dynamic_eapd = 1; in cx_auto_parse_eapd()
134 struct conexant_spec *spec = codec->spec; in cx_auto_vmaster_hook() local
136 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, enabled); in cx_auto_vmaster_hook()
144 struct conexant_spec *spec = codec->spec; in cx_auto_vmaster_mute_led() local
146 snd_hda_codec_write(codec, spec->mute_led_eapd, 0, in cx_auto_vmaster_mute_led()
154 struct conexant_spec *spec = codec->spec; in cxt_init_gpio_led() local
155 unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask; in cxt_init_gpio_led()
163 spec->gpio_led); in cxt_init_gpio_led()
169 struct conexant_spec *spec = codec->spec; in cx_auto_init() local
171 if (!spec->dynamic_eapd) in cx_auto_init()
172 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true); in cx_auto_init()
182 struct conexant_spec *spec = codec->spec; in cx_auto_reboot_notify() local
186 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false); in cx_auto_reboot_notify()
245 struct conexant_spec *spec = codec->spec; in cxt_fixup_stereo_dmic() local
246 spec->gen.inv_dmic_split = 1; in cxt_fixup_stereo_dmic()
267 struct conexant_spec *spec = codec->spec; in cxt_update_headset_mode() local
268 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in cxt_update_headset_mode()
270 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in cxt_update_headset_mode()
280 spec->gen.hp_jack_present = false; in cxt_update_headset_mode()
283 spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]); in cxt_update_headset_mode()
299 struct conexant_spec *spec = codec->spec; in cxt_fixup_headphone_mic() local
303 spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC; in cxt_fixup_headphone_mic()
307 WARN_ON(spec->gen.cap_sync_hook); in cxt_fixup_headphone_mic()
308 spec->gen.cap_sync_hook = cxt_update_headset_mode_hook; in cxt_fixup_headphone_mic()
309 spec->gen.automute_hook = cxt_update_headset_mode; in cxt_fixup_headphone_mic()
320 struct conexant_spec *spec = codec->spec; in cxt_fixup_headset_mic() local
324 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in cxt_fixup_headset_mic()
353 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_boost() local
359 if (!spec->dc_enable) in olpc_xo_update_mic_boost()
368 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_pins() local
372 cur_input = spec->gen.input_paths[0][spec->gen.cur_mux[0]]; in olpc_xo_update_mic_pins()
377 if (!spec->dc_enable) { in olpc_xo_update_mic_pins()
380 snd_hda_activate_path(codec, spec->dc_mode_path, false, false); in olpc_xo_update_mic_pins()
389 update_mic_pin(codec, 0x1a, spec->recording ? in olpc_xo_update_mic_pins()
391 update_mic_pin(codec, 0x1b, spec->recording ? in olpc_xo_update_mic_pins()
408 if (spec->recording) in olpc_xo_update_mic_pins()
409 val = olpc_xo_dc_bias.items[spec->dc_input_bias].index; in olpc_xo_update_mic_pins()
415 update_mic_pin(codec, 0x1e, spec->recording ? PIN_IN : 0); in olpc_xo_update_mic_pins()
416 snd_hda_activate_path(codec, spec->dc_mode_path, true, false); in olpc_xo_update_mic_pins()
424 struct conexant_spec *spec = codec->spec; in olpc_xo_automic() local
427 if (!spec->dc_enable) in olpc_xo_automic()
430 if (spec->dc_enable) in olpc_xo_automic()
440 struct conexant_spec *spec = codec->spec; in olpc_xo_capture_hook() local
442 /* toggle spec->recording flag and update mic pins accordingly in olpc_xo_capture_hook()
447 spec->recording = 1; in olpc_xo_capture_hook()
451 spec->recording = 0; in olpc_xo_capture_hook()
461 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_get() local
462 ucontrol->value.integer.value[0] = spec->dc_enable; in olpc_xo_dc_mode_get()
470 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_put() local
473 if (dc_enable == spec->dc_enable) in olpc_xo_dc_mode_put()
476 spec->dc_enable = dc_enable; in olpc_xo_dc_mode_put()
486 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_get() local
487 ucontrol->value.enumerated.item[0] = spec->dc_input_bias; in olpc_xo_dc_bias_enum_get()
501 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_put() local
508 if (spec->dc_input_bias == idx) in olpc_xo_dc_bias_enum_put()
511 spec->dc_input_bias = idx; in olpc_xo_dc_bias_enum_put()
512 if (spec->dc_enable) in olpc_xo_dc_bias_enum_put()
542 struct conexant_spec *spec = codec->spec; in olpc_xo_mic_boost_put() local
544 if (ret > 0 && spec->dc_enable) in olpc_xo_mic_boost_put()
552 struct conexant_spec *spec = codec->spec; in cxt_fixup_olpc_xo() local
559 spec->gen.mic_autoswitch_hook = olpc_xo_automic; in cxt_fixup_olpc_xo()
560 spec->gen.pcm_capture_hook = olpc_xo_capture_hook; in cxt_fixup_olpc_xo()
561 spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0); in cxt_fixup_olpc_xo()
572 snd_array_for_each(&spec->gen.kctls, i, kctl) { in cxt_fixup_olpc_xo()
583 struct conexant_spec *spec = codec->spec; in cxt_fixup_mute_led_eapd() local
586 spec->mute_led_eapd = 0x1b; in cxt_fixup_mute_led_eapd()
587 spec->dynamic_eapd = 1; in cxt_fixup_mute_led_eapd()
635 struct conexant_spec *spec = codec->spec; in cxt_update_gpio_led() local
636 unsigned int oldval = spec->gpio_led; in cxt_update_gpio_led()
638 if (spec->mute_led_polarity) in cxt_update_gpio_led()
642 spec->gpio_led |= mask; in cxt_update_gpio_led()
644 spec->gpio_led &= ~mask; in cxt_update_gpio_led()
646 mask, led_on, spec->gpio_led); in cxt_update_gpio_led()
647 if (spec->gpio_led != oldval) in cxt_update_gpio_led()
649 spec->gpio_led); in cxt_update_gpio_led()
657 struct conexant_spec *spec = codec->spec; in cxt_gpio_mute_update() local
659 cxt_update_gpio_led(codec, spec->gpio_mute_led_mask, brightness); in cxt_gpio_mute_update()
668 struct conexant_spec *spec = codec->spec; in cxt_gpio_micmute_update() local
670 cxt_update_gpio_led(codec, spec->gpio_mic_led_mask, brightness); in cxt_gpio_micmute_update()
677 struct conexant_spec *spec = codec->spec; in cxt_setup_mute_led() local
679 spec->gpio_led = 0; in cxt_setup_mute_led()
680 spec->mute_led_polarity = 0; in cxt_setup_mute_led()
683 spec->gpio_mute_led_mask = mute; in cxt_setup_mute_led()
687 spec->gpio_mic_led_mask = mic_mute; in cxt_setup_mute_led()
997 struct conexant_spec *spec = codec->spec; in add_cx5051_fake_mutes() local
1007 spec->gen.dac_min_mute = true; in add_cx5051_fake_mutes()
1012 struct conexant_spec *spec; in patch_conexant_auto() local
1017 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in patch_conexant_auto()
1018 if (!spec) in patch_conexant_auto()
1020 snd_hda_gen_spec_init(&spec->gen); in patch_conexant_auto()
1021 codec->spec = spec; in patch_conexant_auto()
1025 spec->gen.own_eapd_ctl = 1; in patch_conexant_auto()
1030 spec->gen.mixer_nid = 0x17; in patch_conexant_auto()
1031 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1037 spec->gen.mixer_nid = 0x19; in patch_conexant_auto()
1038 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1058 if (!spec->gen.vmaster_mute.hook && spec->dynamic_eapd) in patch_conexant_auto()
1059 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; in patch_conexant_auto()
1063 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, in patch_conexant_auto()
1064 spec->parse_flags); in patch_conexant_auto()
1068 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in patch_conexant_auto()