Lines Matching refs:nid

26 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs)		\
27 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
29 #define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \
30 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)
32 #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags) \
42 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags }
44 #define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction) \
45 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0)
47 #define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction) \
48 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0)
50 #define HDA_CODEC_VOLUME(xname, nid, xindex, direction) \
51 HDA_CODEC_VOLUME_MONO(xname, nid, 3, xindex, direction)
53 #define HDA_CODEC_VOLUME_MIN_MUTE(xname, nid, xindex, direction) \
54 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, 3, xindex, direction, \
57 #define HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \
63 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, direction) }
65 #define HDA_CODEC_MUTE_IDX(xname, xcidx, nid, xindex, direction) \
66 HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, 3, xindex, direction)
68 #define HDA_CODEC_MUTE_MONO(xname, nid, channel, xindex, direction) \
69 HDA_CODEC_MUTE_MONO_IDX(xname, 0, nid, channel, xindex, direction)
71 #define HDA_CODEC_MUTE(xname, nid, xindex, direction) \
72 HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction)
75 #define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \
81 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, direction) }
84 #define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, ch, xidx, dir) \
85 HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, ch, xidx, dir)
88 #define HDA_CODEC_MUTE_BEEP_MONO(xname, nid, channel, xindex, direction) \
89 HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, 0, nid, channel, xindex, direction)
91 #define HDA_CODEC_MUTE_BEEP(xname, nid, xindex, direction) \
92 HDA_CODEC_MUTE_BEEP_MONO(xname, nid, 3, xindex, direction)
117 #define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \
118 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx)
119 int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid,
121 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,
123 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
125 int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid,
127 void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
169 int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid);
188 struct snd_ctl_elem_value *ucontrol, hda_nid_t nid,
272 hda_nid_t nid;
434 int snd_hda_codec_get_pin_target(struct hda_codec *codec, hda_nid_t nid);
435 int snd_hda_codec_set_pin_target(struct hda_codec *codec, hda_nid_t nid,
438 #define for_each_hda_codec_node(nid, codec) \
439 for ((nid) = (codec)->core.start_nid; (nid) < (codec)->core.end_nid; (nid)++)
453 static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
455 if (nid < codec->core.start_nid ||
456 nid >= codec->core.start_nid + codec->core.num_nodes)
458 return codec->wcaps[nid - codec->core.start_nid];
480 hda_nid_t nid, u32 val)
482 if (nid >= codec->core.start_nid &&
483 nid < codec->core.start_nid + codec->core.num_nodes)
484 codec->wcaps[nid - codec->core.start_nid] = val;
487 u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction);
488 int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
493 * @nid: the NID to query
502 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid)
504 return snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
511 * @nid: the NID to override
519 snd_hda_override_pin_caps(struct hda_codec *codec, hda_nid_t nid,
522 return snd_hdac_override_parm(&codec->core, nid, AC_PAR_PIN_CAP, caps);
525 bool snd_hda_check_amp_caps(struct hda_codec *codec, hda_nid_t nid,
528 #define nid_has_mute(codec, nid, dir) \
529 snd_hda_check_amp_caps(codec, nid, dir, (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))
530 #define nid_has_volume(codec, nid, dir) \
531 snd_hda_check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS)
540 hda_nid_t nid;
544 int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
547 unsigned int index, hda_nid_t nid);
595 hda_nid_t nid;
607 hda_nid_t nid);
611 snd_hda_check_power_state(struct hda_codec *codec, hda_nid_t nid,
614 return snd_hdac_check_power_state(&codec->core, nid, target_state);
618 hda_nid_t nid,
621 return snd_hdac_sync_power_state(&codec->core, nid, target_state);
624 hda_nid_t nid,
700 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid);
701 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid,
709 int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid,