summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorMark Brown2016-05-13 15:27:16 +0200
committerMark Brown2016-05-13 15:27:16 +0200
commit515511a7920c69aebf7f5fef0cb8e1df6767f34c (patch)
tree2cd9ac2853bb11aa2eeb766bb18c0b1846d8d941 /sound/hda
parentMerge remote-tracking branches 'asoc/topic/es8328', 'asoc/topic/find-dai', 'a... (diff)
parentASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc() (diff)
downloadkernel-qcow2-linux-515511a7920c69aebf7f5fef0cb8e1df6767f34c.tar.gz
kernel-qcow2-linux-515511a7920c69aebf7f5fef0cb8e1df6767f34c.tar.xz
kernel-qcow2-linux-515511a7920c69aebf7f5fef0cb8e1df6767f34c.zip
Merge remote-tracking branch 'asoc/topic/hdmi' into asoc-next
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/local.h10
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);