• Home
  • Raw
  • Download

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()
246 struct conexant_spec *spec = codec->spec; in cxt_fixup_stereo_dmic() local
247 spec->gen.inv_dmic_split = 1; in cxt_fixup_stereo_dmic()
268 struct conexant_spec *spec = codec->spec; in cxt_update_headset_mode() local
269 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in cxt_update_headset_mode()
271 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; in cxt_update_headset_mode()
281 spec->gen.hp_jack_present = false; in cxt_update_headset_mode()
284 spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]); in cxt_update_headset_mode()
300 struct conexant_spec *spec = codec->spec; in cxt_fixup_headphone_mic() local
304 spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC; in cxt_fixup_headphone_mic()
308 WARN_ON(spec->gen.cap_sync_hook); in cxt_fixup_headphone_mic()
309 spec->gen.cap_sync_hook = cxt_update_headset_mode_hook; in cxt_fixup_headphone_mic()
310 spec->gen.automute_hook = cxt_update_headset_mode; in cxt_fixup_headphone_mic()
321 struct conexant_spec *spec = codec->spec; in cxt_fixup_headset_mic() local
325 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; in cxt_fixup_headset_mic()
354 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_boost() local
360 if (!spec->dc_enable) in olpc_xo_update_mic_boost()
369 struct conexant_spec *spec = codec->spec; in olpc_xo_update_mic_pins() local
373 cur_input = spec->gen.input_paths[0][spec->gen.cur_mux[0]]; in olpc_xo_update_mic_pins()
378 if (!spec->dc_enable) { in olpc_xo_update_mic_pins()
381 snd_hda_activate_path(codec, spec->dc_mode_path, false, false); in olpc_xo_update_mic_pins()
390 update_mic_pin(codec, 0x1a, spec->recording ? in olpc_xo_update_mic_pins()
392 update_mic_pin(codec, 0x1b, spec->recording ? in olpc_xo_update_mic_pins()
409 if (spec->recording) in olpc_xo_update_mic_pins()
410 val = olpc_xo_dc_bias.items[spec->dc_input_bias].index; in olpc_xo_update_mic_pins()
416 update_mic_pin(codec, 0x1e, spec->recording ? PIN_IN : 0); in olpc_xo_update_mic_pins()
417 snd_hda_activate_path(codec, spec->dc_mode_path, true, false); in olpc_xo_update_mic_pins()
425 struct conexant_spec *spec = codec->spec; in olpc_xo_automic() local
428 if (!spec->dc_enable) in olpc_xo_automic()
431 if (spec->dc_enable) in olpc_xo_automic()
441 struct conexant_spec *spec = codec->spec; in olpc_xo_capture_hook() local
443 /* toggle spec->recording flag and update mic pins accordingly in olpc_xo_capture_hook()
448 spec->recording = 1; in olpc_xo_capture_hook()
452 spec->recording = 0; in olpc_xo_capture_hook()
462 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_get() local
463 ucontrol->value.integer.value[0] = spec->dc_enable; in olpc_xo_dc_mode_get()
471 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_mode_put() local
474 if (dc_enable == spec->dc_enable) in olpc_xo_dc_mode_put()
477 spec->dc_enable = dc_enable; in olpc_xo_dc_mode_put()
487 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_get() local
488 ucontrol->value.enumerated.item[0] = spec->dc_input_bias; in olpc_xo_dc_bias_enum_get()
502 struct conexant_spec *spec = codec->spec; in olpc_xo_dc_bias_enum_put() local
509 if (spec->dc_input_bias == idx) in olpc_xo_dc_bias_enum_put()
512 spec->dc_input_bias = idx; in olpc_xo_dc_bias_enum_put()
513 if (spec->dc_enable) in olpc_xo_dc_bias_enum_put()
543 struct conexant_spec *spec = codec->spec; in olpc_xo_mic_boost_put() local
545 if (ret > 0 && spec->dc_enable) in olpc_xo_mic_boost_put()
553 struct conexant_spec *spec = codec->spec; in cxt_fixup_olpc_xo() local
560 spec->gen.mic_autoswitch_hook = olpc_xo_automic; in cxt_fixup_olpc_xo()
561 spec->gen.pcm_capture_hook = olpc_xo_capture_hook; in cxt_fixup_olpc_xo()
562 spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0); in cxt_fixup_olpc_xo()
573 snd_array_for_each(&spec->gen.kctls, i, kctl) { in cxt_fixup_olpc_xo()
584 struct conexant_spec *spec = codec->spec; in cxt_fixup_mute_led_eapd() local
587 spec->mute_led_eapd = 0x1b; in cxt_fixup_mute_led_eapd()
588 spec->dynamic_eapd = 1; in cxt_fixup_mute_led_eapd()
636 struct conexant_spec *spec = codec->spec; in cxt_update_gpio_led() local
637 unsigned int oldval = spec->gpio_led; in cxt_update_gpio_led()
639 if (spec->mute_led_polarity) in cxt_update_gpio_led()
643 spec->gpio_led |= mask; in cxt_update_gpio_led()
645 spec->gpio_led &= ~mask; in cxt_update_gpio_led()
647 mask, led_on, spec->gpio_led); in cxt_update_gpio_led()
648 if (spec->gpio_led != oldval) in cxt_update_gpio_led()
650 spec->gpio_led); in cxt_update_gpio_led()
658 struct conexant_spec *spec = codec->spec; in cxt_gpio_mute_update() local
660 cxt_update_gpio_led(codec, spec->gpio_mute_led_mask, brightness); in cxt_gpio_mute_update()
669 struct conexant_spec *spec = codec->spec; in cxt_gpio_micmute_update() local
671 cxt_update_gpio_led(codec, spec->gpio_mic_led_mask, brightness); in cxt_gpio_micmute_update()
678 struct conexant_spec *spec = codec->spec; in cxt_setup_mute_led() local
680 spec->gpio_led = 0; in cxt_setup_mute_led()
681 spec->mute_led_polarity = 0; in cxt_setup_mute_led()
684 spec->gpio_mute_led_mask = mute; in cxt_setup_mute_led()
688 spec->gpio_mic_led_mask = mic_mute; in cxt_setup_mute_led()
1011 struct conexant_spec *spec = codec->spec; in add_cx5051_fake_mutes() local
1021 spec->gen.dac_min_mute = true; in add_cx5051_fake_mutes()
1026 struct conexant_spec *spec; in patch_conexant_auto() local
1031 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in patch_conexant_auto()
1032 if (!spec) in patch_conexant_auto()
1034 snd_hda_gen_spec_init(&spec->gen); in patch_conexant_auto()
1035 codec->spec = spec; in patch_conexant_auto()
1039 spec->gen.own_eapd_ctl = 1; in patch_conexant_auto()
1044 spec->gen.mixer_nid = 0x17; in patch_conexant_auto()
1045 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1051 spec->gen.mixer_nid = 0x19; in patch_conexant_auto()
1052 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1064 spec->gen.mixer_nid = 0x22; in patch_conexant_auto()
1065 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; in patch_conexant_auto()
1079 if (!spec->gen.vmaster_mute.hook && spec->dynamic_eapd) in patch_conexant_auto()
1080 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; in patch_conexant_auto()
1084 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, in patch_conexant_auto()
1085 spec->parse_flags); in patch_conexant_auto()
1093 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in patch_conexant_auto()