Lines Matching refs:codec
130 #define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \ argument
131 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx)
132 int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid,
134 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,
136 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
138 int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid,
140 void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
142 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
144 int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
148 #define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \ argument
149 __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL)
150 int snd_hda_codec_reset(struct hda_codec *codec);
151 void snd_hda_codec_register(struct hda_codec *codec);
152 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);
168 struct hda_codec *codec; member
171 int snd_hda_add_vmaster_hook(struct hda_codec *codec,
245 int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
248 #define snd_hda_create_spdif_out_ctls(codec, anid, cnid) \ argument
249 snd_hda_create_dig_out_ctls(codec, anid, cnid, HDA_PCM_TYPE_SPDIF)
250 int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid);
267 int snd_hda_input_mux_put(struct hda_codec *codec,
271 int snd_hda_add_imux_item(struct hda_codec *codec,
305 int snd_hda_create_spdif_share_sw(struct hda_codec *codec,
307 int snd_hda_multi_out_dig_open(struct hda_codec *codec,
309 int snd_hda_multi_out_dig_close(struct hda_codec *codec,
311 int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
316 int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
318 int snd_hda_multi_out_analog_open(struct hda_codec *codec,
322 int snd_hda_multi_out_analog_prepare(struct hda_codec *codec,
327 int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
334 int snd_hda_codec_proc_new(struct hda_codec *codec);
336 static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; } in snd_hda_codec_proc_new() argument
345 int snd_hda_add_new_ctls(struct hda_codec *codec,
370 void (*func)(struct hda_codec *codec,
377 unsigned int codec; /* Codec vendor/device ID */ member
389 { .codec = _codec,\
398 { .codec = _codec,\
427 int snd_hda_add_verbs(struct hda_codec *codec, const struct hda_verb *list);
428 void snd_hda_apply_verbs(struct hda_codec *codec);
429 void snd_hda_apply_pincfgs(struct hda_codec *codec,
431 void snd_hda_apply_fixup(struct hda_codec *codec, int action);
432 void snd_hda_pick_fixup(struct hda_codec *codec,
436 void snd_hda_pick_pin_fixup(struct hda_codec *codec,
471 unsigned int snd_hda_get_default_vref(struct hda_codec *codec, hda_nid_t pin);
472 unsigned int snd_hda_correct_pin_ctl(struct hda_codec *codec,
474 int _snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin,
493 snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin, unsigned int val) in snd_hda_set_pin_ctl() argument
495 return _snd_hda_set_pin_ctl(codec, pin, val, false); in snd_hda_set_pin_ctl()
507 snd_hda_set_pin_ctl_cache(struct hda_codec *codec, hda_nid_t pin, in snd_hda_set_pin_ctl_cache() argument
510 return _snd_hda_set_pin_ctl(codec, pin, val, true); in snd_hda_set_pin_ctl_cache()
513 int snd_hda_codec_get_pin_target(struct hda_codec *codec, hda_nid_t nid);
514 int snd_hda_codec_set_pin_target(struct hda_codec *codec, hda_nid_t nid,
517 #define for_each_hda_codec_node(nid, codec) \ argument
518 for ((nid) = (codec)->core.start_nid; (nid) < (codec)->core.end_nid; (nid)++)
523 static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) in get_wcaps() argument
525 if (nid < codec->core.start_nid || in get_wcaps()
526 nid >= codec->core.start_nid + codec->core.num_nodes) in get_wcaps()
528 return codec->wcaps[nid - codec->core.start_nid]; in get_wcaps()
549 static inline void snd_hda_override_wcaps(struct hda_codec *codec, in snd_hda_override_wcaps() argument
552 if (nid >= codec->core.start_nid && in snd_hda_override_wcaps()
553 nid < codec->core.start_nid + codec->core.num_nodes) in snd_hda_override_wcaps()
554 codec->wcaps[nid - codec->core.start_nid] = val; in snd_hda_override_wcaps()
557 u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction);
558 int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
572 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid) in snd_hda_query_pin_caps() argument
574 return snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); in snd_hda_query_pin_caps()
589 snd_hda_override_pin_caps(struct hda_codec *codec, hda_nid_t nid, in snd_hda_override_pin_caps() argument
592 return snd_hdac_override_parm(&codec->core, nid, AC_PAR_PIN_CAP, caps); in snd_hda_override_pin_caps()
595 bool snd_hda_check_amp_caps(struct hda_codec *codec, hda_nid_t nid,
598 #define nid_has_mute(codec, nid, dir) \ argument
599 snd_hda_check_amp_caps(codec, nid, dir, (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))
600 #define nid_has_volume(codec, nid, dir) \ argument
601 snd_hda_check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS)
614 int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
616 int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
618 void snd_hda_ctls_clear(struct hda_codec *codec);
624 int snd_hda_create_hwdep(struct hda_codec *codec);
626 static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; } in snd_hda_create_hwdep() argument
629 void snd_hda_sysfs_init(struct hda_codec *codec);
630 void snd_hda_sysfs_clear(struct hda_codec *codec);
635 const char *snd_hda_get_hint(struct hda_codec *codec, const char *key);
636 int snd_hda_get_bool_hint(struct hda_codec *codec, const char *key);
637 int snd_hda_get_int_hint(struct hda_codec *codec, const char *key, int *valp);
640 const char *snd_hda_get_hint(struct hda_codec *codec, const char *key) in snd_hda_get_hint() argument
646 int snd_hda_get_bool_hint(struct hda_codec *codec, const char *key) in snd_hda_get_bool_hint() argument
652 int snd_hda_get_int_hint(struct hda_codec *codec, const char *key, int *valp) in snd_hda_get_int_hint() argument
662 void snd_hda_schedule_power_save(struct hda_codec *codec);
675 int snd_hda_check_amp_list_power(struct hda_codec *codec,
681 snd_hda_check_power_state(struct hda_codec *codec, hda_nid_t nid, in snd_hda_check_power_state() argument
684 return snd_hdac_check_power_state(&codec->core, nid, target_state); in snd_hda_check_power_state()
687 unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec,
762 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid);
763 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid,
765 int snd_hdmi_parse_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e,
767 void snd_hdmi_show_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e);
771 int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid,
787 #define codec_err(codec, fmt, args...) \ argument
788 dev_err(hda_codec_dev(codec), fmt, ##args)
789 #define codec_warn(codec, fmt, args...) \ argument
790 dev_warn(hda_codec_dev(codec), fmt, ##args)
791 #define codec_info(codec, fmt, args...) \ argument
792 dev_info(hda_codec_dev(codec), fmt, ##args)
793 #define codec_dbg(codec, fmt, args...) \ argument
794 dev_dbg(hda_codec_dev(codec), fmt, ##args)