Lines Matching refs:spec
92 struct cmi_spec *spec = codec->spec; in cmi_mux_enum_info() local
93 return snd_hda_input_mux_info(spec->input_mux, uinfo); in cmi_mux_enum_info()
99 struct cmi_spec *spec = codec->spec; in cmi_mux_enum_get() local
102 ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx]; in cmi_mux_enum_get()
109 struct cmi_spec *spec = codec->spec; in cmi_mux_enum_put() local
112 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, in cmi_mux_enum_put()
113 spec->adc_nids[adc_idx], &spec->cur_mux[adc_idx]); in cmi_mux_enum_put()
162 struct cmi_spec *spec = codec->spec; in cmi_ch_mode_info() local
163 return snd_hda_ch_mode_info(codec, uinfo, spec->channel_modes, in cmi_ch_mode_info()
164 spec->num_channel_modes); in cmi_ch_mode_info()
170 struct cmi_spec *spec = codec->spec; in cmi_ch_mode_get() local
171 return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_modes, in cmi_ch_mode_get()
172 spec->num_channel_modes, spec->multiout.max_channels); in cmi_ch_mode_get()
178 struct cmi_spec *spec = codec->spec; in cmi_ch_mode_put() local
179 return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_modes, in cmi_ch_mode_put()
180 spec->num_channel_modes, &spec->multiout.max_channels); in cmi_ch_mode_put()
325 struct cmi_spec *spec = codec->spec; in cmi9880_build_controls() local
332 if (spec->channel_modes) { in cmi9880_build_controls()
337 if (spec->multiout.dig_out_nid) { in cmi9880_build_controls()
339 spec->multiout.dig_out_nid, in cmi9880_build_controls()
340 spec->multiout.dig_out_nid); in cmi9880_build_controls()
344 &spec->multiout); in cmi9880_build_controls()
347 spec->multiout.share_spdif = 1; in cmi9880_build_controls()
349 if (spec->dig_in_nid) { in cmi9880_build_controls()
350 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); in cmi9880_build_controls()
358 err = snd_hda_add_nid(codec, kctl, i, spec->adc_nids[i]); in cmi9880_build_controls()
367 struct cmi_spec *spec = codec->spec; in cmi9880_init() local
368 if (spec->board_config == CMI_ALLOUT) in cmi9880_init()
372 if (spec->board_config == CMI_AUTO) in cmi9880_init()
373 snd_hda_sequence_write(codec, spec->multi_init); in cmi9880_init()
384 struct cmi_spec *spec = codec->spec; in cmi9880_playback_pcm_open() local
385 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream, in cmi9880_playback_pcm_open()
395 struct cmi_spec *spec = codec->spec; in cmi9880_playback_pcm_prepare() local
396 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, in cmi9880_playback_pcm_prepare()
404 struct cmi_spec *spec = codec->spec; in cmi9880_playback_pcm_cleanup() local
405 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); in cmi9880_playback_pcm_cleanup()
415 struct cmi_spec *spec = codec->spec; in cmi9880_dig_playback_pcm_open() local
416 return snd_hda_multi_out_dig_open(codec, &spec->multiout); in cmi9880_dig_playback_pcm_open()
423 struct cmi_spec *spec = codec->spec; in cmi9880_dig_playback_pcm_close() local
424 return snd_hda_multi_out_dig_close(codec, &spec->multiout); in cmi9880_dig_playback_pcm_close()
433 struct cmi_spec *spec = codec->spec; in cmi9880_dig_playback_pcm_prepare() local
434 return snd_hda_multi_out_dig_prepare(codec, &spec->multiout, stream_tag, in cmi9880_dig_playback_pcm_prepare()
447 struct cmi_spec *spec = codec->spec; in cmi9880_capture_pcm_prepare() local
449 snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], in cmi9880_capture_pcm_prepare()
458 struct cmi_spec *spec = codec->spec; in cmi9880_capture_pcm_cleanup() local
460 snd_hda_codec_cleanup_stream(codec, spec->adc_nids[substream->number]); in cmi9880_capture_pcm_cleanup()
511 struct cmi_spec *spec = codec->spec; in cmi9880_build_pcms() local
512 struct hda_pcm *info = spec->pcm_rec; in cmi9880_build_pcms()
521 if (spec->multiout.dig_out_nid || spec->dig_in_nid) { in cmi9880_build_pcms()
526 if (spec->multiout.dig_out_nid) { in cmi9880_build_pcms()
528 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid; in cmi9880_build_pcms()
530 if (spec->dig_in_nid) { in cmi9880_build_pcms()
532 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid; in cmi9880_build_pcms()
541 kfree(codec->spec); in cmi9880_free()
583 struct cmi_spec *spec = codec->spec; in cmi_parse_auto_config() local
584 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in cmi_parse_auto_config()
587 snd_hda_gen_spec_init(&spec->gen); in cmi_parse_auto_config()
602 struct cmi_spec *spec; in patch_cmi9880() local
604 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in patch_cmi9880()
605 if (spec == NULL) in patch_cmi9880()
608 codec->spec = spec; in patch_cmi9880()
609 spec->board_config = snd_hda_check_board_config(codec, CMI_MODELS, in patch_cmi9880()
612 if (spec->board_config < 0) { in patch_cmi9880()
615 spec->board_config = CMI_AUTO; /* try everything */ in patch_cmi9880()
618 if (spec->board_config == CMI_AUTO) { in patch_cmi9880()
628 memcpy(spec->dac_nids, cmi9880_dac_nids, sizeof(spec->dac_nids)); in patch_cmi9880()
629 spec->num_dacs = 4; in patch_cmi9880()
631 switch (spec->board_config) { in patch_cmi9880()
634 spec->channel_modes = cmi9880_channel_modes; in patch_cmi9880()
635 if (spec->board_config == CMI_MINIMAL) in patch_cmi9880()
636 spec->num_channel_modes = 2; in patch_cmi9880()
638 spec->front_panel = 1; in patch_cmi9880()
639 spec->num_channel_modes = 3; in patch_cmi9880()
641 spec->multiout.max_channels = cmi9880_channel_modes[0].channels; in patch_cmi9880()
642 spec->input_mux = &cmi9880_basic_mux; in patch_cmi9880()
646 spec->front_panel = 1; in patch_cmi9880()
647 spec->multiout.max_channels = 8; in patch_cmi9880()
648 spec->input_mux = &cmi9880_basic_mux; in patch_cmi9880()
649 if (spec->board_config == CMI_FULL_DIG) { in patch_cmi9880()
650 spec->multiout.dig_out_nid = CMI_DIG_OUT_NID; in patch_cmi9880()
651 spec->dig_in_nid = CMI_DIG_IN_NID; in patch_cmi9880()
656 spec->front_panel = 1; in patch_cmi9880()
657 spec->multiout.max_channels = 8; in patch_cmi9880()
658 spec->no_line_in = 1; in patch_cmi9880()
659 spec->input_mux = &cmi9880_no_line_mux; in patch_cmi9880()
660 spec->multiout.dig_out_nid = CMI_DIG_OUT_NID; in patch_cmi9880()
664 spec->multiout.num_dacs = spec->num_dacs; in patch_cmi9880()
665 spec->multiout.dac_nids = spec->dac_nids; in patch_cmi9880()
667 spec->adc_nids = cmi9880_adc_nids; in patch_cmi9880()