Lines Matching refs:spec

63 static int set_beep_amp(struct conexant_spec *spec, hda_nid_t nid,  in set_beep_amp()  argument
70 spec->gen.beep_nid = nid; in set_beep_amp()
72 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
83 struct conexant_spec *spec = codec->spec; in cx_auto_parse_beep() local
88 return set_beep_amp(spec, nid, 0, HDA_OUTPUT); in cx_auto_parse_beep()
102 struct conexant_spec *spec = codec->spec; in cx_auto_parse_eapd() local
110 spec->eapds[spec->num_eapds++] = nid; in cx_auto_parse_eapd()
111 if (spec->num_eapds >= ARRAY_SIZE(spec->eapds)) in cx_auto_parse_eapd()
121 if (spec->num_eapds > 2) in cx_auto_parse_eapd()
122 spec->dynamic_eapd = 1; in cx_auto_parse_eapd()
141 struct conexant_spec *spec = codec->spec; in cx_auto_vmaster_hook() local
143 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, enabled); in cx_auto_vmaster_hook()
151 struct conexant_spec *spec = codec->spec; in cx_auto_vmaster_mute_led() local
153 snd_hda_codec_write(codec, spec->mute_led_eapd, 0, in cx_auto_vmaster_mute_led()
161 struct conexant_spec *spec = codec->spec; in cxt_init_gpio_led() local
162 unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask; in cxt_init_gpio_led()
170 spec->gpio_led); in cxt_init_gpio_led()
197 struct conexant_spec *spec = codec->spec; in cx_auto_init() local
199 if (!spec->dynamic_eapd) in cx_auto_init()
200 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true); in cx_auto_init()
205 if (spec->is_cx8070_sn6140) in cx_auto_init()
213 struct conexant_spec *spec = codec->spec; in cx_auto_shutdown() local
217 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false); in cx_auto_shutdown()
256 struct conexant_spec *spec = codec->spec; in cx_update_headset_mic_vref() local
268 spec->headset_present_flag = CX_HEADSET_NOPRESENT; in cx_update_headset_mic_vref()
272 if (spec->headset_present_flag == CX_HEADSET_NOPRESENT) { in cx_update_headset_mic_vref()
273 spec->headset_present_flag = CX_HEADSET_PARTPRESENT; in cx_update_headset_mic_vref()
274 } else if (spec->headset_present_flag == CX_HEADSET_PARTPRESENT) { in cx_update_headset_mic_vref()
281 spec->headset_present_flag = CX_HEADSET_ALLPRESENT; in cx_update_headset_mic_vref()
289 struct conexant_spec *spec = codec->spec; in cx_jack_unsol_event() local
291 if (spec->is_cx8070_sn6140) in cx_jack_unsol_event()
356 struct conexant_spec *spec = codec->spec; in cxt_fixup_stereo_dmic() local
357 spec->gen.inv_dmic_split = 1; in cxt_fixup_stereo_dmic()
378 struct conexant_spec *spec = codec->spec; in cxt_update_headset_mode() local
379 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in cxt_update_headset_mode()
381 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in cxt_update_headset_mode()
391 spec->gen.hp_jack_present = false; in cxt_update_headset_mode()
394 spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]); in cxt_update_headset_mode()
410 struct conexant_spec *spec = codec->spec; in cxt_fixup_headphone_mic() local
414 spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC; in cxt_fixup_headphone_mic()
418 WARN_ON(spec->gen.cap_sync_hook); in cxt_fixup_headphone_mic()
419 spec->gen.cap_sync_hook = cxt_update_headset_mode_hook; in cxt_fixup_headphone_mic()
420 spec->gen.automute_hook = cxt_update_headset_mode; in cxt_fixup_headphone_mic()
431 struct conexant_spec *spec = codec->spec; in cxt_fixup_headset_mic() local
435 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in cxt_fixup_headset_mic()
464 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_boost() local
470 if (!spec->dc_enable) in olpc_xo_update_mic_boost()
479 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_pins() local
483 cur_input = spec->gen.input_paths[0][spec->gen.cur_mux[0]]; in olpc_xo_update_mic_pins()
488 if (!spec->dc_enable) { in olpc_xo_update_mic_pins()
491 snd_hda_activate_path(codec, spec->dc_mode_path, false, false); in olpc_xo_update_mic_pins()
500 update_mic_pin(codec, 0x1a, spec->recording ? in olpc_xo_update_mic_pins()
502 update_mic_pin(codec, 0x1b, spec->recording ? in olpc_xo_update_mic_pins()
519 if (spec->recording) in olpc_xo_update_mic_pins()
520 val = olpc_xo_dc_bias.items[spec->dc_input_bias].index; in olpc_xo_update_mic_pins()
526 update_mic_pin(codec, 0x1e, spec->recording ? PIN_IN : 0); in olpc_xo_update_mic_pins()
527 snd_hda_activate_path(codec, spec->dc_mode_path, true, false); in olpc_xo_update_mic_pins()
535 struct conexant_spec *spec = codec->spec; in olpc_xo_automic() local
538 if (!spec->dc_enable) in olpc_xo_automic()
541 if (spec->dc_enable) in olpc_xo_automic()
551 struct conexant_spec *spec = codec->spec; in olpc_xo_capture_hook() local
558 spec->recording = 1; in olpc_xo_capture_hook()
562 spec->recording = 0; in olpc_xo_capture_hook()
572 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_get() local
573 ucontrol->value.integer.value[0] = spec->dc_enable; in olpc_xo_dc_mode_get()
581 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_put() local
584 if (dc_enable == spec->dc_enable) in olpc_xo_dc_mode_put()
587 spec->dc_enable = dc_enable; in olpc_xo_dc_mode_put()
597 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_get() local
598 ucontrol->value.enumerated.item[0] = spec->dc_input_bias; in olpc_xo_dc_bias_enum_get()
612 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_put() local
619 if (spec->dc_input_bias == idx) in olpc_xo_dc_bias_enum_put()
622 spec->dc_input_bias = idx; in olpc_xo_dc_bias_enum_put()
623 if (spec->dc_enable) in olpc_xo_dc_bias_enum_put()
653 struct conexant_spec *spec = codec->spec; in olpc_xo_mic_boost_put() local
655 if (ret > 0 && spec->dc_enable) in olpc_xo_mic_boost_put()
663 struct conexant_spec *spec = codec->spec; in cxt_fixup_olpc_xo() local
670 spec->gen.mic_autoswitch_hook = olpc_xo_automic; in cxt_fixup_olpc_xo()
671 spec->gen.pcm_capture_hook = olpc_xo_capture_hook; in cxt_fixup_olpc_xo()
672 spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0); in cxt_fixup_olpc_xo()
683 snd_array_for_each(&spec->gen.kctls, i, kctl) { in cxt_fixup_olpc_xo()
694 struct conexant_spec *spec = codec->spec; in cxt_fixup_mute_led_eapd() local
697 spec->mute_led_eapd = 0x1b; in cxt_fixup_mute_led_eapd()
698 spec->dynamic_eapd = true; in cxt_fixup_mute_led_eapd()
746 struct conexant_spec *spec = codec->spec; in cxt_update_gpio_led() local
747 unsigned int oldval = spec->gpio_led; in cxt_update_gpio_led()
749 if (spec->mute_led_polarity) in cxt_update_gpio_led()
753 spec->gpio_led |= mask; in cxt_update_gpio_led()
755 spec->gpio_led &= ~mask; in cxt_update_gpio_led()
757 mask, led_on, spec->gpio_led); in cxt_update_gpio_led()
758 if (spec->gpio_led != oldval) in cxt_update_gpio_led()
760 spec->gpio_led); in cxt_update_gpio_led()
768 struct conexant_spec *spec = codec->spec; in cxt_gpio_mute_update() local
770 cxt_update_gpio_led(codec, spec->gpio_mute_led_mask, brightness); in cxt_gpio_mute_update()
779 struct conexant_spec *spec = codec->spec; in cxt_gpio_micmute_update() local
781 cxt_update_gpio_led(codec, spec->gpio_mic_led_mask, brightness); in cxt_gpio_micmute_update()
788 struct conexant_spec *spec = codec->spec; in cxt_setup_mute_led() local
790 spec->gpio_led = 0; in cxt_setup_mute_led()
791 spec->mute_led_polarity = 0; in cxt_setup_mute_led()
794 spec->gpio_mute_led_mask = mute; in cxt_setup_mute_led()
798 spec->gpio_mic_led_mask = mic_mute; in cxt_setup_mute_led()
1138 struct conexant_spec *spec = codec->spec; in add_cx5051_fake_mutes() local
1148 spec->gen.dac_min_mute = true; in add_cx5051_fake_mutes()
1153 struct conexant_spec *spec; in patch_conexant_auto() local
1158 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in patch_conexant_auto()
1159 if (!spec) in patch_conexant_auto()
1161 snd_hda_gen_spec_init(&spec->gen); in patch_conexant_auto()
1162 codec->spec = spec; in patch_conexant_auto()
1169 spec->is_cx8070_sn6140 = true; in patch_conexant_auto()
1170 spec->headset_present_flag = CX_HEADSET_NOPRESENT; in patch_conexant_auto()
1175 spec->gen.own_eapd_ctl = 1; in patch_conexant_auto()
1180 spec->gen.mixer_nid = 0x17; in patch_conexant_auto()
1181 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1187 spec->gen.mixer_nid = 0x19; in patch_conexant_auto()
1188 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1200 spec->gen.mixer_nid = 0x22; in patch_conexant_auto()
1201 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1215 if (!spec->gen.vmaster_mute.hook && spec->dynamic_eapd) in patch_conexant_auto()
1216 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; in patch_conexant_auto()
1220 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, in patch_conexant_auto()
1221 spec->parse_flags); in patch_conexant_auto()
1229 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in patch_conexant_auto()