From a22d543a95e82e5ad0ee1a44aad54fd6b6bf52a8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 Jul 2009 12:54:26 +0200 Subject: ALSA: hda - Introduce get_wcaps_type() macro Add a helper macro to retrieve the widget type from wiget cap bits. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_local.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/pci/hda/hda_local.h') diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 75aa3785212f..fa57cb93b443 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -407,6 +407,9 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) return codec->wcaps[nid - codec->start_nid]; } +/* get the widget type from widget capability bits */ +#define get_wcaps_type(wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT) + u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction); int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, unsigned int caps); -- cgit v1.2.3-59-g8ed1b