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>
This commit is contained in:
Jorge Sanjuan
2018-07-31 13:28:42 +01:00
committed by Takashi Iwai
parent 89b4ab213f
commit 11785ef532
4 changed files with 128 additions and 0 deletions

View File

@@ -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 */