1 /* SPDX-License-Identifier: GPL-2.0 */
8 int hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm);
10 #define get_wcaps(codec, nid) \
11 hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP)
12 /* get the widget type from widget capability bits */
13 static inline int get_wcaps_type(unsigned int wcaps)
16 return -1; /* invalid type */
17 return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
20 #define get_pin_caps(codec, nid) \
21 hdac_read_parm(codec, nid, AC_PAR_PIN_CAP)
24 unsigned int get_pin_cfg(struct hdac_device *codec, hda_nid_t nid)
28 if (snd_hdac_read(codec, nid, AC_VERB_GET_CONFIG_DEFAULT, 0, &val))
33 #define get_amp_caps(codec, nid, dir) \
34 hdac_read_parm(codec, nid, (dir) == HDA_OUTPUT ? \
35 AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP)
37 #define get_power_caps(codec, nid) \
38 hdac_read_parm(codec, nid, AC_PAR_POWER_STATE)
40 #endif /* __HDAC_LOCAL_H */