Lines Matching full:codec

3  * Universal Interface for Intel High Definition Audio Codec
48 struct hda_codec *codec; member
127 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); in cm9825_unsol_hp_delayed()
129 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", in cm9825_unsol_hp_delayed()
134 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_unsol_hp_delayed()
137 codec_dbg(spec->codec, "codec_write err %d\n", err); in cm9825_unsol_hp_delayed()
139 snd_hda_sequence_write(spec->codec, spec->chip_hp_remove_verbs); in cm9825_unsol_hp_delayed()
141 snd_hda_sequence_write(spec->codec, in cm9825_unsol_hp_delayed()
145 jack = snd_hda_jack_tbl_get(spec->codec, hp_pin); in cm9825_unsol_hp_delayed()
148 snd_hda_jack_report_sync(spec->codec); in cm9825_unsol_hp_delayed()
152 static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) in hp_callback() argument
154 struct cmi_spec *spec = codec->spec; in hp_callback()
161 codec_dbg(spec->codec, "cb->nid 0x%X\n", cb->nid); in hp_callback()
163 tbl = snd_hda_jack_tbl_get(codec, cb->nid); in hp_callback()
169 static void cm9825_setup_unsol(struct hda_codec *codec) in cm9825_setup_unsol() argument
171 struct cmi_spec *spec = codec->spec; in cm9825_setup_unsol()
175 snd_hda_jack_detect_enable_callback(codec, hp_pin, hp_callback); in cm9825_setup_unsol()
178 static int cm9825_init(struct hda_codec *codec) in cm9825_init() argument
180 snd_hda_gen_init(codec); in cm9825_init()
181 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); in cm9825_init()
186 static void cm9825_free(struct hda_codec *codec) in cm9825_free() argument
188 struct cmi_spec *spec = codec->spec; in cm9825_free()
191 snd_hda_gen_free(codec); in cm9825_free()
194 static int cm9825_suspend(struct hda_codec *codec) in cm9825_suspend() argument
196 struct cmi_spec *spec = codec->spec; in cm9825_suspend()
200 snd_hda_sequence_write(codec, spec->chip_d3_verbs); in cm9825_suspend()
205 static int cm9825_resume(struct hda_codec *codec) in cm9825_resume() argument
207 struct cmi_spec *spec = codec->spec; in cm9825_resume()
213 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_resume()
216 codec_dbg(codec, "codec_write err %d\n", err); in cm9825_resume()
220 codec->patch_ops.init(codec); in cm9825_resume()
223 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); in cm9825_resume()
225 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", in cm9825_resume()
230 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_resume()
234 codec_dbg(codec, "codec_write err %d\n", err); in cm9825_resume()
236 snd_hda_sequence_write(codec, cm9825_hp_remove_verbs); in cm9825_resume()
239 snd_hda_regmap_sync(codec); in cm9825_resume()
240 hda_call_check_power_status(codec, 0x01); in cm9825_resume()
256 static int patch_cm9825(struct hda_codec *codec) in patch_cm9825() argument
267 codec->spec = spec; in patch_cm9825()
268 spec->codec = codec; in patch_cm9825()
269 codec->patch_ops = cmi_auto_patch_ops; in patch_cm9825()
270 codec->patch_ops.init = cm9825_init; in patch_cm9825()
271 codec->patch_ops.suspend = cm9825_suspend; in patch_cm9825()
272 codec->patch_ops.resume = cm9825_resume; in patch_cm9825()
273 codec->patch_ops.free = cm9825_free; in patch_cm9825()
274 codec->patch_ops.check_power_status = snd_hda_gen_check_power_status; in patch_cm9825()
282 snd_hda_sequence_write(codec, spec->chip_d0_verbs); in patch_cm9825()
284 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cm9825()
287 err = snd_hda_gen_parse_auto_config(codec, cfg); in patch_cm9825()
291 cm9825_setup_unsol(codec); in patch_cm9825()
296 cm9825_free(codec); in patch_cm9825()
298 codec_info(codec, "Enter err %d\n", err); in patch_cm9825()
303 static int patch_cmi9880(struct hda_codec *codec) in patch_cmi9880() argument
313 codec->spec = spec; in patch_cmi9880()
314 codec->patch_ops = cmi_auto_patch_ops; in patch_cmi9880()
318 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi9880()
321 err = snd_hda_gen_parse_auto_config(codec, cfg); in patch_cmi9880()
328 snd_hda_gen_free(codec); in patch_cmi9880()
332 static int patch_cmi8888(struct hda_codec *codec) in patch_cmi8888() argument
342 codec->spec = spec; in patch_cmi8888()
343 codec->patch_ops = cmi_auto_patch_ops; in patch_cmi8888()
352 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi8888()
355 err = snd_hda_gen_parse_auto_config(codec, cfg); in patch_cmi8888()
359 if (get_defcfg_device(snd_hda_codec_get_pincfg(codec, 0x10)) == in patch_cmi8888()
373 snd_hda_gen_free(codec); in patch_cmi8888()
390 MODULE_DESCRIPTION("C-Media HD-audio codec");