Lines Matching full:spec
131 struct cs_spec *spec = codec->spec; in cs_vendor_coef_get() local
132 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
134 return snd_hda_codec_read(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
141 struct cs_spec *spec = codec->spec; in cs_vendor_coef_set() local
142 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
144 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
156 struct cs_spec *spec = codec->spec; in cs_automute() local
159 spec->gen.master_mute = !!(spec->spdif_present && spec->sense_b); in cs_automute()
163 if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) { in cs_automute()
164 if (spec->gen.automute_speaker) in cs_automute()
165 spec->gpio_data = spec->gen.hp_jack_present ? in cs_automute()
166 spec->gpio_eapd_hp : spec->gpio_eapd_speaker; in cs_automute()
168 spec->gpio_data = in cs_automute()
169 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs_automute()
171 AC_VERB_SET_GPIO_DATA, spec->gpio_data); in cs_automute()
184 struct cs_spec *spec = codec->spec; in init_input_coef() local
188 if (spec->vendor_nid == CS420X_VENDOR_NID) { in init_input_coef()
297 struct cs_spec *spec = codec->spec; in cs_init() local
299 if (spec->vendor_nid == CS420X_VENDOR_NID) { in cs_init()
303 } else if (spec->vendor_nid == CS4208_VENDOR_NID) { in cs_init()
309 if (spec->gpio_mask) { in cs_init()
311 spec->gpio_mask); in cs_init()
313 spec->gpio_dir); in cs_init()
315 spec->gpio_data); in cs_init()
318 if (spec->vendor_nid == CS420X_VENDOR_NID) { in cs_init()
349 struct cs_spec *spec = codec->spec; in cs_parse_auto_config() local
353 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); in cs_parse_auto_config()
357 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in cs_parse_auto_config()
362 if (spec->gen.dyn_adc_switch) { in cs_parse_auto_config()
364 for (i = 0; i < spec->gen.input_mux.num_items; i++) { in cs_parse_auto_config()
365 int idx = spec->gen.dyn_adc_idx[i]; in cs_parse_auto_config()
369 spec->gen.adc_nids[idx]); in cs_parse_auto_config()
499 struct cs_spec *spec = codec->spec; in cs420x_fixup_gpio_13() local
500 spec->gpio_eapd_hp = 2; /* GPIO1 = headphones */ in cs420x_fixup_gpio_13()
501 spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ in cs420x_fixup_gpio_13()
502 spec->gpio_mask = spec->gpio_dir = in cs420x_fixup_gpio_13()
503 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs420x_fixup_gpio_13()
511 struct cs_spec *spec = codec->spec; in cs420x_fixup_gpio_23() local
512 spec->gpio_eapd_hp = 4; /* GPIO2 = headphones */ in cs420x_fixup_gpio_23()
513 spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ in cs420x_fixup_gpio_23()
514 spec->gpio_mask = spec->gpio_dir = in cs420x_fixup_gpio_23()
515 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs420x_fixup_gpio_23()
573 struct cs_spec *spec; in cs_alloc_spec() local
575 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in cs_alloc_spec()
576 if (!spec) in cs_alloc_spec()
578 codec->spec = spec; in cs_alloc_spec()
579 spec->vendor_nid = vendor_nid; in cs_alloc_spec()
581 snd_hda_gen_spec_init(&spec->gen); in cs_alloc_spec()
583 return spec; in cs_alloc_spec()
588 struct cs_spec *spec; in patch_cs420x() local
591 spec = cs_alloc_spec(codec, CS420X_VENDOR_NID); in patch_cs420x()
592 if (!spec) in patch_cs420x()
596 spec->gen.automute_hook = cs_automute; in patch_cs420x()
655 struct cs_spec *spec = codec->spec; in cs4208_fixup_gpio0() local
656 spec->gpio_eapd_hp = 0; in cs4208_fixup_gpio0()
657 spec->gpio_eapd_speaker = 1; in cs4208_fixup_gpio0()
658 spec->gpio_mask = spec->gpio_dir = in cs4208_fixup_gpio0()
659 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs4208_fixup_gpio0()
701 struct cs_spec *spec = codec->spec; in cs4208_spdif_sw_put() local
702 hda_nid_t pin = spec->gen.autocfg.dig_out_pins[0]; in cs4208_spdif_sw_put()
706 return spec->spdif_sw_put(kcontrol, ucontrol); in cs4208_spdif_sw_put()
714 struct cs_spec *spec = codec->spec; in cs4208_fixup_spdif_switch() local
717 if (!spec->gen.autocfg.dig_out_pins[0]) in cs4208_fixup_spdif_switch()
722 spec->spdif_sw_put = kctl->put; in cs4208_fixup_spdif_switch()
769 struct cs_spec *spec; in patch_cs4208() local
772 spec = cs_alloc_spec(codec, CS4208_VENDOR_NID); in patch_cs4208()
773 if (!spec) in patch_cs4208()
777 spec->gen.automute_hook = cs_automute; in patch_cs4208()
779 spec->gen.out_vol_mask = 1ULL << 0x10; in patch_cs4208()
852 struct cs_spec *spec = codec->spec; in cs421x_fixup_sense_b() local
854 spec->sense_b = 1; in cs421x_fixup_sense_b()
989 struct cs_spec *spec = codec->spec; in cs4210_pinmux_init() local
995 if (spec->gpio_mask) in cs4210_pinmux_init()
1000 if (spec->sense_b) in cs4210_pinmux_init()
1007 if ((spec->gpio_mask || spec->sense_b) && in cs4210_pinmux_init()
1023 struct cs_spec *spec = codec->spec; in cs4210_spdif_automute() local
1025 hda_nid_t spdif_pin = spec->gen.autocfg.dig_out_pins[0]; in cs4210_spdif_automute()
1028 if (!spec->spdif_detect || in cs4210_spdif_automute()
1029 spec->vendor_nid != CS4210_VENDOR_NID) in cs4210_spdif_automute()
1033 if (spdif_present == spec->spdif_present) in cs4210_spdif_automute()
1036 spec->spdif_present = spdif_present; in cs4210_spdif_automute()
1045 struct cs_spec *spec = codec->spec; in parse_cs421x_digital() local
1046 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in parse_cs421x_digital()
1052 spec->spdif_detect = 1; in parse_cs421x_digital()
1061 struct cs_spec *spec = codec->spec; in cs421x_init() local
1063 if (spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_init()
1071 if (spec->gpio_mask) { in cs421x_init()
1073 spec->gpio_mask); in cs421x_init()
1075 spec->gpio_dir); in cs421x_init()
1077 spec->gpio_data); in cs421x_init()
1101 struct cs_spec *spec = codec->spec; in cs421x_parse_auto_config() local
1107 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); in cs421x_parse_auto_config()
1111 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in cs421x_parse_auto_config()
1117 if (spec->gen.autocfg.speaker_outs && in cs421x_parse_auto_config()
1118 spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_parse_auto_config()
1119 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, in cs421x_parse_auto_config()
1134 struct cs_spec *spec = codec->spec; in cs421x_suspend() local
1144 if (spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_suspend()
1167 struct cs_spec *spec; in patch_cs4210() local
1170 spec = cs_alloc_spec(codec, CS4210_VENDOR_NID); in patch_cs4210()
1171 if (!spec) in patch_cs4210()
1175 spec->gen.automute_hook = cs_automute; in patch_cs4210()
1203 struct cs_spec *spec; in patch_cs4213() local
1206 spec = cs_alloc_spec(codec, CS4213_VENDOR_NID); in patch_cs4213()
1207 if (!spec) in patch_cs4213()