Lines Matching refs:spec

144 	struct cs_spec *spec = codec->spec;  in cs_vendor_coef_get()  local
145 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
147 return snd_hda_codec_read(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
154 struct cs_spec *spec = codec->spec; in cs_vendor_coef_set() local
155 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
157 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
169 struct cs_spec *spec = codec->spec; in cs_automute() local
172 spec->gen.master_mute = !!(spec->spdif_present && spec->sense_b); in cs_automute()
176 if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) { in cs_automute()
177 if (spec->gen.automute_speaker) in cs_automute()
178 spec->gpio_data = spec->gen.hp_jack_present ? in cs_automute()
179 spec->gpio_eapd_hp : spec->gpio_eapd_speaker; in cs_automute()
181 spec->gpio_data = in cs_automute()
182 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs_automute()
184 AC_VERB_SET_GPIO_DATA, spec->gpio_data); in cs_automute()
197 struct cs_spec *spec = codec->spec; in init_input_coef() local
201 if (spec->vendor_nid == CS420X_VENDOR_NID) { in init_input_coef()
310 struct cs_spec *spec = codec->spec; in cs_init() local
312 if (spec->vendor_nid == CS420X_VENDOR_NID) { in cs_init()
316 } else if (spec->vendor_nid == CS4208_VENDOR_NID) { in cs_init()
322 if (spec->gpio_mask) { in cs_init()
324 spec->gpio_mask); in cs_init()
326 spec->gpio_dir); in cs_init()
328 spec->gpio_data); in cs_init()
331 if (spec->vendor_nid == CS420X_VENDOR_NID) { in cs_init()
362 struct cs_spec *spec = codec->spec; in cs_parse_auto_config() local
365 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); in cs_parse_auto_config()
369 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in cs_parse_auto_config()
496 struct cs_spec *spec = codec->spec; in cs420x_fixup_gpio_13() local
497 spec->gpio_eapd_hp = 2; /* GPIO1 = headphones */ in cs420x_fixup_gpio_13()
498 spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ in cs420x_fixup_gpio_13()
499 spec->gpio_mask = spec->gpio_dir = in cs420x_fixup_gpio_13()
500 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs420x_fixup_gpio_13()
508 struct cs_spec *spec = codec->spec; in cs420x_fixup_gpio_23() local
509 spec->gpio_eapd_hp = 4; /* GPIO2 = headphones */ in cs420x_fixup_gpio_23()
510 spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ in cs420x_fixup_gpio_23()
511 spec->gpio_mask = spec->gpio_dir = in cs420x_fixup_gpio_23()
512 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs420x_fixup_gpio_23()
570 struct cs_spec *spec; in cs_alloc_spec() local
572 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in cs_alloc_spec()
573 if (!spec) in cs_alloc_spec()
575 codec->spec = spec; in cs_alloc_spec()
576 spec->vendor_nid = vendor_nid; in cs_alloc_spec()
577 snd_hda_gen_spec_init(&spec->gen); in cs_alloc_spec()
579 return spec; in cs_alloc_spec()
584 struct cs_spec *spec; in patch_cs420x() local
587 spec = cs_alloc_spec(codec, CS420X_VENDOR_NID); in patch_cs420x()
588 if (!spec) in patch_cs420x()
591 spec->gen.automute_hook = cs_automute; in patch_cs420x()
652 struct cs_spec *spec = codec->spec; in cs4208_fixup_gpio0() local
653 spec->gpio_eapd_hp = 0; in cs4208_fixup_gpio0()
654 spec->gpio_eapd_speaker = 1; in cs4208_fixup_gpio0()
655 spec->gpio_mask = spec->gpio_dir = in cs4208_fixup_gpio0()
656 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; in cs4208_fixup_gpio0()
698 struct cs_spec *spec = codec->spec; in cs4208_spdif_sw_put() local
699 hda_nid_t pin = spec->gen.autocfg.dig_out_pins[0]; in cs4208_spdif_sw_put()
703 return spec->spdif_sw_put(kcontrol, ucontrol); in cs4208_spdif_sw_put()
711 struct cs_spec *spec = codec->spec; in cs4208_fixup_spdif_switch() local
714 if (!spec->gen.autocfg.dig_out_pins[0]) in cs4208_fixup_spdif_switch()
719 spec->spdif_sw_put = kctl->put; in cs4208_fixup_spdif_switch()
766 struct cs_spec *spec; in patch_cs4208() local
769 spec = cs_alloc_spec(codec, CS4208_VENDOR_NID); in patch_cs4208()
770 if (!spec) in patch_cs4208()
773 spec->gen.automute_hook = cs_automute; in patch_cs4208()
775 spec->gen.out_vol_mask = 1ULL << 0x10; in patch_cs4208()
850 struct cs_spec *spec = codec->spec; in cs421x_fixup_sense_b() local
852 spec->sense_b = 1; in cs421x_fixup_sense_b()
987 struct cs_spec *spec = codec->spec; in cs4210_pinmux_init() local
993 if (spec->gpio_mask) in cs4210_pinmux_init()
998 if (spec->sense_b) in cs4210_pinmux_init()
1005 if ((spec->gpio_mask || spec->sense_b) && in cs4210_pinmux_init()
1021 struct cs_spec *spec = codec->spec; in cs4210_spdif_automute() local
1023 hda_nid_t spdif_pin = spec->gen.autocfg.dig_out_pins[0]; in cs4210_spdif_automute()
1026 if (!spec->spdif_detect || in cs4210_spdif_automute()
1027 spec->vendor_nid != CS4210_VENDOR_NID) in cs4210_spdif_automute()
1031 if (spdif_present == spec->spdif_present) in cs4210_spdif_automute()
1034 spec->spdif_present = spdif_present; in cs4210_spdif_automute()
1043 struct cs_spec *spec = codec->spec; in parse_cs421x_digital() local
1044 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in parse_cs421x_digital()
1050 spec->spdif_detect = 1; in parse_cs421x_digital()
1059 struct cs_spec *spec = codec->spec; in cs421x_init() local
1061 if (spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_init()
1069 if (spec->gpio_mask) { in cs421x_init()
1071 spec->gpio_mask); in cs421x_init()
1073 spec->gpio_dir); in cs421x_init()
1075 spec->gpio_data); in cs421x_init()
1087 struct cs_spec *spec = codec->spec; in cs421x_build_controls() local
1094 if (spec->gen.autocfg.speaker_outs && in cs421x_build_controls()
1095 spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_build_controls()
1118 struct cs_spec *spec = codec->spec; in cs421x_parse_auto_config() local
1124 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); in cs421x_parse_auto_config()
1128 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in cs421x_parse_auto_config()
1143 struct cs_spec *spec = codec->spec; in cs421x_suspend() local
1153 if (spec->vendor_nid == CS4210_VENDOR_NID) { in cs421x_suspend()
1176 struct cs_spec *spec; in patch_cs4210() local
1179 spec = cs_alloc_spec(codec, CS4210_VENDOR_NID); in patch_cs4210()
1180 if (!spec) in patch_cs4210()
1183 spec->gen.automute_hook = cs_automute; in patch_cs4210()
1213 struct cs_spec *spec; in patch_cs4213() local
1216 spec = cs_alloc_spec(codec, CS4213_VENDOR_NID); in patch_cs4213()
1217 if (!spec) in patch_cs4213()