X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fpci%2Fhda%2Fhda_local.h;h=5f1dcc59002b4a610f0bff8b6455e9d1205f42a9;hb=fa285190025d0b9a35ed0f6233bfaa721281e0f4;hp=fa57cb93b44318ab90d108dba7d7c64bb8f507a3;hpb=03cb2dafcbde938ed7d01d4b952ea60e3c4e8532;p=pandora-kernel.git diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index fa57cb93b443..5f1dcc59002b 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -410,6 +410,16 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) /* get the widget type from widget capability bits */ #define get_wcaps_type(wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT) +static inline unsigned int get_wcaps_channels(u32 wcaps) +{ + unsigned int chans; + + chans = (wcaps & AC_WCAP_CHAN_CNT_EXT) >> 13; + chans = ((chans << 1) | 1) + 1; + + return chans; +} + 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);