Skip to contentSkip to conversation

usbcore: Select UAC3 configuration for audio if present

PATCH New Greg Kroah-Hartman 1 participant 1 message Sep 11, 2018 USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH v2 1/1 usbcore: Select UAC3 configuration for audio if present

Quoted 1 line · On Wed, Sep 12, 2018 at 01:03:57AM +0530, [email protected] wrote:

From: Saranya Gopal <[email protected]>

Any reason you forgot to cc: the usb maintainer? :)

Quoted 38 lines

USB audio class 3.0 specification introduced many significant changes like
- new power domains, support for LPM/L1
- new cluster descriptor
- new high capability and class-specific string descriptors
- BADD profiles
- ... and many other things (check spec from link below:
http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip)

Now that UAC3 is supported in linux, choose UAC3 configuration for audio if the device supports it. Selecting this configuration will enable the system to save power by leveraging the new power domains and LPM L1 capability and also support new codec types and data formats for consumer audio applications.

---
Changes from V1: Deleted nested if check for is_uac3_config

 drivers/usb/core/generic.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/usb/core/generic.c +1 -0
index bc8242b..df38d5a 100644
@@ -21,6 +21,7 @@
 
 #include <linux/usb.h>
 #include <linux/usb/hcd.h>
+#include <uapi/linux/usb/audio.h>
 #include "usb.h"
 
 static inline const char *plural(int n)

drivers/usb/core/generic.c static int is_activesync(struct usb_interface_descriptor *desc) · line 46

Quoted 4 lines
drivers/usb/core/generic.c +1 -0
@@ -42,6 +43,16 @@ static int is_activesync(struct usb_interface_descriptor *desc)
 		&& desc->bInterfaceProtocol == 1;
 }
 
+static int is_audio(struct usb_interface_descriptor *desc)

bool?

drivers/usb/core/generic.c static int is_activesync(struct usb_interface_descriptor *desc) · line 51

Quoted 5 lines
drivers/usb/core/generic.c +5 -0
+{
+	return desc->bInterfaceClass == USB_CLASS_AUDIO;
+}
+
+static int is_uac3_config(struct usb_interface_descriptor *desc)

bool?

thanks,

greg k-h