diff options
author | Mark Brown <broonie@kernel.org> | 2016-05-13 16:27:16 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-13 16:27:16 +0300 |
commit | 515511a7920c69aebf7f5fef0cb8e1df6767f34c (patch) | |
tree | 2cd9ac2853bb11aa2eeb766bb18c0b1846d8d941 /sound/hda | |
parent | 180bc41ad11b9a7ec5b420fbcef6570163d09204 (diff) | |
parent | 8f658815da156a9239b98b34e5ba1d3db71a2f6e (diff) | |
download | linux-515511a7920c69aebf7f5fef0cb8e1df6767f34c.tar.xz |
Merge remote-tracking branch 'asoc/topic/hdmi' into asoc-next
Diffstat (limited to 'sound/hda')
-rw-r--r-- | sound/hda/local.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/hda/local.h b/sound/hda/local.h index d692f417ddc0..0d5bb159d538 100644 --- a/sound/hda/local.h +++ b/sound/hda/local.h @@ -16,6 +16,16 @@ static inline int get_wcaps_type(unsigned int wcaps) return (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) * 2; + + return chans; +} + extern const struct attribute_group *hdac_dev_attr_groups[]; int hda_widget_sysfs_init(struct hdac_device *codec); void hda_widget_sysfs_exit(struct hdac_device *codec); |