Lines Matching full:codec

3  * CM9825 HD-audio codec
44 struct hda_codec *codec; member
123 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); in cm9825_unsol_hp_delayed()
125 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", in cm9825_unsol_hp_delayed()
130 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_unsol_hp_delayed()
133 codec_dbg(spec->codec, "codec_write err %d\n", err); in cm9825_unsol_hp_delayed()
135 snd_hda_sequence_write(spec->codec, spec->chip_hp_remove_verbs); in cm9825_unsol_hp_delayed()
137 snd_hda_sequence_write(spec->codec, in cm9825_unsol_hp_delayed()
141 jack = snd_hda_jack_tbl_get(spec->codec, hp_pin); in cm9825_unsol_hp_delayed()
144 snd_hda_jack_report_sync(spec->codec); in cm9825_unsol_hp_delayed()
148 static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) in hp_callback() argument
150 struct cmi_spec *spec = codec->spec; in hp_callback()
157 codec_dbg(spec->codec, "cb->nid 0x%X\n", cb->nid); in hp_callback()
159 tbl = snd_hda_jack_tbl_get(codec, cb->nid); in hp_callback()
165 static void cm9825_setup_unsol(struct hda_codec *codec) in cm9825_setup_unsol() argument
167 struct cmi_spec *spec = codec->spec; in cm9825_setup_unsol()
171 snd_hda_jack_detect_enable_callback(codec, hp_pin, hp_callback); in cm9825_setup_unsol()
174 static int cm9825_init(struct hda_codec *codec) in cm9825_init() argument
176 snd_hda_gen_init(codec); in cm9825_init()
177 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); in cm9825_init()
182 static void cm9825_remove(struct hda_codec *codec) in cm9825_remove() argument
184 struct cmi_spec *spec = codec->spec; in cm9825_remove()
187 snd_hda_gen_remove(codec); in cm9825_remove()
190 static int cm9825_suspend(struct hda_codec *codec) in cm9825_suspend() argument
192 struct cmi_spec *spec = codec->spec; in cm9825_suspend()
196 snd_hda_sequence_write(codec, spec->chip_d3_verbs); in cm9825_suspend()
201 static int cm9825_resume(struct hda_codec *codec) in cm9825_resume() argument
203 struct cmi_spec *spec = codec->spec; in cm9825_resume()
209 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_resume()
212 codec_dbg(codec, "codec_write err %d\n", err); in cm9825_resume()
216 snd_hda_codec_init(codec); in cm9825_resume()
219 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); in cm9825_resume()
221 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", in cm9825_resume()
226 snd_hda_codec_write(spec->codec, 0x42, 0, in cm9825_resume()
230 codec_dbg(codec, "codec_write err %d\n", err); in cm9825_resume()
232 snd_hda_sequence_write(codec, cm9825_hp_remove_verbs); in cm9825_resume()
235 snd_hda_regmap_sync(codec); in cm9825_resume()
236 hda_call_check_power_status(codec, 0x01); in cm9825_resume()
241 static int cm9825_probe(struct hda_codec *codec, const struct hda_device_id *id) in cm9825_probe() argument
252 codec->spec = spec; in cm9825_probe()
253 spec->codec = codec; in cm9825_probe()
261 snd_hda_sequence_write(codec, spec->chip_d0_verbs); in cm9825_probe()
263 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in cm9825_probe()
266 err = snd_hda_gen_parse_auto_config(codec, cfg); in cm9825_probe()
270 cm9825_setup_unsol(codec); in cm9825_probe()
275 cm9825_remove(codec); in cm9825_probe()
277 codec_info(codec, "Enter err %d\n", err); in cm9825_probe()
305 MODULE_DESCRIPTION("CM9825 HD-audio codec");