aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorJorge Sanjuan <jorge.sanjuan@codethink.co.uk>2018-07-31 13:28:42 +0100
committerTakashi Iwai <tiwai@suse.de>2018-07-31 15:01:22 +0200
commit11785ef53228d23ec386f5fe4a34601536f0c891 (patch)
treeecdf75859e73b7671550204c42d1dd6949bb8288 /include/linux/usb
parentALSA: seq: virmidi: Use READ_ONCE/WRITE_ONCE() macros (diff)
downloadlinux-dev-11785ef53228d23ec386f5fe4a34601536f0c891.tar.xz
linux-dev-11785ef53228d23ec386f5fe4a34601536f0c891.zip
ALSA: usb-audio: Initial Power Domain support
Thee USB Audio Class 3 (UAC3) introduces Power Domains as a new feature to let a host turn individual parts of an audio function to different power states via USB requests. This lets the device get to know a bit amore about what the host is up to in order to optimize power consumption efficiently. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/audio-v3.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h
index 334bfa6dfb47..6b708434b7f9 100644
--- a/include/linux/usb/audio-v3.h
+++ b/include/linux/usb/audio-v3.h
@@ -447,4 +447,8 @@ struct uac3_interrupt_data_msg {
/* BADD sample rate is always fixed to 48kHz */
#define UAC3_BADD_SAMPLING_RATE 48000
+/* BADD power domains recovery times in 50us increments */
+#define UAC3_BADD_PD_RECOVER_D1D0 0x0258 /* 30ms */
+#define UAC3_BADD_PD_RECOVER_D2D0 0x1770 /* 300ms */
+
#endif /* __LINUX_USB_AUDIO_V3_H */