7 int hdac_read_parm(struct hdac_device
*codec
, hda_nid_t nid
, int parm
);
9 #define get_wcaps(codec, nid) \
10 hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP)
11 /* get the widget type from widget capability bits */
12 static inline int get_wcaps_type(unsigned int wcaps
)
15 return -1; /* invalid type */
16 return (wcaps
& AC_WCAP_TYPE
) >> AC_WCAP_TYPE_SHIFT
;
19 #define get_pin_caps(codec, nid) \
20 hdac_read_parm(codec, nid, AC_PAR_PIN_CAP)
23 unsigned int get_pin_cfg(struct hdac_device
*codec
, hda_nid_t nid
)
27 if (snd_hdac_read(codec
, nid
, AC_VERB_GET_CONFIG_DEFAULT
, 0, &val
))
32 #define get_amp_caps(codec, nid, dir) \
33 hdac_read_parm(codec, nid, (dir) == HDA_OUTPUT ? \
34 AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP)
36 #define get_power_caps(codec, nid) \
37 hdac_read_parm(codec, nid, AC_PAR_POWER_STATE)
39 #endif /* __HDAC_LOCAL_H */