Lines Matching full:codec
3 * Legacy Nvidia HDMI codec support
50 static int nvhdmi_mcp_init(struct hda_codec *codec) in nvhdmi_mcp_init() argument
52 struct hdmi_spec *spec = codec->spec; in nvhdmi_mcp_init()
55 snd_hda_sequence_write(codec, nvhdmi_basic_init_7x_2ch); in nvhdmi_mcp_init()
57 snd_hda_sequence_write(codec, nvhdmi_basic_init_7x_8ch); in nvhdmi_mcp_init()
61 static void nvhdmi_8ch_7x_set_info_frame_parameters(struct hda_codec *codec, in nvhdmi_8ch_7x_set_info_frame_parameters() argument
87 snd_hda_codec_write(codec, 0x1, 0, in nvhdmi_8ch_7x_set_info_frame_parameters()
90 snd_hda_codec_write(codec, 0x1, 0, in nvhdmi_8ch_7x_set_info_frame_parameters()
96 struct hda_codec *codec, in nvhdmi_8ch_7x_pcm_close() argument
99 struct hdmi_spec *spec = codec->spec; in nvhdmi_8ch_7x_pcm_close()
102 snd_hda_codec_write(codec, nvhdmi_master_con_nid_7x, in nvhdmi_8ch_7x_pcm_close()
106 snd_hda_codec_write(codec, nvhdmi_con_nids_7x[i], 0, in nvhdmi_8ch_7x_pcm_close()
109 snd_hda_codec_write(codec, nvhdmi_con_nids_7x[i], 0, in nvhdmi_8ch_7x_pcm_close()
116 nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8); in nvhdmi_8ch_7x_pcm_close()
118 return snd_hda_multi_out_dig_close(codec, &spec->multiout); in nvhdmi_8ch_7x_pcm_close()
122 struct hda_codec *codec, in nvhdmi_8ch_7x_pcm_prepare() argument
130 struct hdmi_spec *spec = codec->spec; in nvhdmi_8ch_7x_pcm_prepare()
134 guard(mutex)(&codec->spdif_mutex); in nvhdmi_8ch_7x_pcm_prepare()
136 spdif = snd_hda_spdif_out_of_nid(codec, per_cvt->cvt_nid); in nvhdmi_8ch_7x_pcm_prepare()
143 if (codec->spdif_status_reset && (spdif->ctls & AC_DIG1_ENABLE)) in nvhdmi_8ch_7x_pcm_prepare()
144 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
151 snd_hda_codec_write(codec, nvhdmi_master_con_nid_7x, 0, in nvhdmi_8ch_7x_pcm_prepare()
155 snd_hda_codec_write(codec, nvhdmi_master_con_nid_7x, 0, in nvhdmi_8ch_7x_pcm_prepare()
160 if (codec->spdif_status_reset && (spdif->ctls & AC_DIG1_ENABLE)) { in nvhdmi_8ch_7x_pcm_prepare()
161 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
166 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
181 if (codec->spdif_status_reset && in nvhdmi_8ch_7x_pcm_prepare()
183 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
189 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
195 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
202 if (codec->spdif_status_reset && in nvhdmi_8ch_7x_pcm_prepare()
204 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
209 snd_hda_codec_write(codec, in nvhdmi_8ch_7x_pcm_prepare()
216 nvhdmi_8ch_7x_set_info_frame_parameters(codec, chs); in nvhdmi_8ch_7x_pcm_prepare()
236 static int nvhdmi_mcp_build_pcms(struct hda_codec *codec) in nvhdmi_mcp_build_pcms() argument
238 struct hdmi_spec *spec = codec->spec; in nvhdmi_mcp_build_pcms()
241 err = snd_hda_hdmi_simple_build_pcms(codec); in nvhdmi_mcp_build_pcms()
250 static int nvhdmi_mcp_build_controls(struct hda_codec *codec) in nvhdmi_mcp_build_controls() argument
252 struct hdmi_spec *spec = codec->spec; in nvhdmi_mcp_build_controls()
257 err = snd_hda_hdmi_simple_build_controls(codec); in nvhdmi_mcp_build_controls()
271 switch (codec->preset->vendor_id) { in nvhdmi_mcp_build_controls()
304 static int nvhdmi_mcp_probe(struct hda_codec *codec, in nvhdmi_mcp_probe() argument
310 err = snd_hda_hdmi_simple_probe(codec, nvhdmi_master_con_nid_7x, in nvhdmi_mcp_probe()
315 /* override the PCM rates, etc, as the codec doesn't give full list */ in nvhdmi_mcp_probe()
316 spec = codec->spec; in nvhdmi_mcp_probe()
328 switch (codec->preset->vendor_id) { in nvhdmi_mcp_probe()
345 nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8); in nvhdmi_mcp_probe()
375 MODULE_DESCRIPTION("Legacy Nvidia HDMI HD-audio codec");