Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: Move endpoint sync type definitions from usb/audio.h to usb/ch9.h

And use the new definitions in the USB Audio Class gadget driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Laurent Pinchart and committed by
Greg Kroah-Hartman
85e08ca5 81bf46f3

+7 -11
+1 -1
drivers/usb/gadget/f_audio.c
··· 174 174 .bLength = USB_DT_ENDPOINT_AUDIO_SIZE, 175 175 .bDescriptorType = USB_DT_ENDPOINT, 176 176 .bEndpointAddress = USB_DIR_OUT, 177 - .bmAttributes = USB_AS_ENDPOINT_ADAPTIVE 177 + .bmAttributes = USB_ENDPOINT_SYNC_ADAPTIVE 178 178 | USB_ENDPOINT_XFER_ISOC, 179 179 .wMaxPacketSize = __constant_cpu_to_le16(OUT_EP_MAX_PACKET_SIZE), 180 180 .bInterval = 4,
-10
include/linux/usb/audio.h
··· 46 46 #define MIDI_IN_JACK 0x02 47 47 #define MIDI_OUT_JACK 0x03 48 48 49 - /* endpoint attributes */ 50 - #define EP_ATTR_MASK 0x0c 51 - #define EP_ATTR_ASYNC 0x04 52 - #define EP_ATTR_ADAPTIVE 0x08 53 - #define EP_ATTR_SYNC 0x0c 54 - 55 49 /* cs endpoint attributes */ 56 50 #define EP_CS_ATTR_SAMPLE_RATE 0x01 57 51 #define EP_CS_ATTR_PITCH_CONTROL 0x02 ··· 237 243 #define USB_AS_FORMAT_TYPE_I 0x1 238 244 #define USB_AS_FORMAT_TYPE_II 0x2 239 245 #define USB_AS_FORMAT_TYPE_III 0x3 240 - 241 - #define USB_AS_ENDPOINT_ASYNC (1 << 2) 242 - #define USB_AS_ENDPOINT_ADAPTIVE (2 << 2) 243 - #define USB_AS_ENDPOINT_SYNC (3 << 2) 244 246 245 247 struct usb_as_iso_endpoint_descriptor { 246 248 __u8 bLength; /* in bytes: 7 */
+6
include/linux/usb/ch9.h
··· 348 348 #define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ 349 349 #define USB_ENDPOINT_DIR_MASK 0x80 350 350 351 + #define USB_ENDPOINT_SYNCTYPE 0x0c 352 + #define USB_ENDPOINT_SYNC_NONE (0 << 2) 353 + #define USB_ENDPOINT_SYNC_ASYNC (1 << 2) 354 + #define USB_ENDPOINT_SYNC_ADAPTIVE (2 << 2) 355 + #define USB_ENDPOINT_SYNC_SYNC (3 << 2) 356 + 351 357 #define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ 352 358 #define USB_ENDPOINT_XFER_CONTROL 0 353 359 #define USB_ENDPOINT_XFER_ISOC 1