~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/usb/midi-v2.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * <linux/usb/midi-v2.h> -- USB MIDI 2.0 definitions.
  4  */
  5 
  6 #ifndef __LINUX_USB_MIDI_V2_H
  7 #define __LINUX_USB_MIDI_V2_H
  8 
  9 #include <linux/types.h>
 10 #include <linux/usb/midi.h>
 11 
 12 /* A.1 MS Class-Specific Interface Descriptor Types */
 13 #define USB_DT_CS_GR_TRM_BLOCK  0x26
 14 
 15 /* A.1 MS Class-Specific Interface Descriptor Subtypes */
 16 /* same as MIDI 1.0 */
 17 
 18 /* A.2 MS Class-Specific Endpoint Descriptor Subtypes */
 19 #define USB_MS_GENERAL_2_0      0x02
 20 
 21 /* A.3 MS Class-Specific Group Terminal Block Descriptor Subtypes */
 22 #define USB_MS_GR_TRM_BLOCK_UNDEFINED   0x00
 23 #define USB_MS_GR_TRM_BLOCK_HEADER      0x01
 24 #define USB_MS_GR_TRM_BLOCK             0x02
 25 
 26 /* A.4 MS Interface Header MIDIStreaming Class Revision */
 27 #define USB_MS_REV_MIDI_1_0             0x0100
 28 #define USB_MS_REV_MIDI_2_0             0x0200
 29 
 30 /* A.5 MS MIDI IN and OUT Jack Types */
 31 /* same as MIDI 1.0 */
 32 
 33 /* A.6 Group Terminal Block Types */
 34 #define USB_MS_GR_TRM_BLOCK_TYPE_BIDIRECTIONAL  0x00
 35 #define USB_MS_GR_TRM_BLOCK_TYPE_INPUT_ONLY     0x01
 36 #define USB_MS_GR_TRM_BLOCK_TYPE_OUTPUT_ONLY    0x02
 37 
 38 /* A.7 Group Terminal Default MIDI Protocol */
 39 #define USB_MS_MIDI_PROTO_UNKNOWN       0x00 /* Unknown (Use MIDI-CI) */
 40 #define USB_MS_MIDI_PROTO_1_0_64        0x01 /* MIDI 1.0, UMP up to 64bits */
 41 #define USB_MS_MIDI_PROTO_1_0_64_JRTS   0x02 /* MIDI 1.0, UMP up to 64bits, Jitter Reduction Timestamps */
 42 #define USB_MS_MIDI_PROTO_1_0_128       0x03 /* MIDI 1.0, UMP up to 128bits */
 43 #define USB_MS_MIDI_PROTO_1_0_128_JRTS  0x04 /* MIDI 1.0, UMP up to 128bits, Jitter Reduction Timestamps */
 44 #define USB_MS_MIDI_PROTO_2_0           0x11 /* MIDI 2.0 */
 45 #define USB_MS_MIDI_PROTO_2_0_JRTS      0x12 /* MIDI 2.0, Jitter Reduction Timestamps */
 46 
 47 /* 5.2.2.1 Class-Specific MS Interface Header Descriptor */
 48 /* Same as MIDI 1.0, use struct usb_ms_header_descriptor */
 49 
 50 /* 5.3.2 Class-Specific MIDI Streaming Data Endpoint Descriptor */
 51 struct usb_ms20_endpoint_descriptor {
 52         __u8  bLength;                  /* 4+n */
 53         __u8  bDescriptorType;          /* USB_DT_CS_ENDPOINT */
 54         __u8  bDescriptorSubtype;       /* USB_MS_GENERAL_2_0 */
 55         __u8  bNumGrpTrmBlock;          /* Number of Group Terminal Blocks: n */
 56         __u8  baAssoGrpTrmBlkID[];      /* ID of the Group Terminal Blocks [n] */
 57 } __packed;
 58 
 59 #define USB_DT_MS20_ENDPOINT_SIZE(n)    (4 + (n))
 60 
 61 /* As above, but more useful for defining your own descriptors: */
 62 #define DECLARE_USB_MS20_ENDPOINT_DESCRIPTOR(n)                 \
 63 struct usb_ms20_endpoint_descriptor_##n {                       \
 64         __u8  bLength;                                          \
 65         __u8  bDescriptorType;                                  \
 66         __u8  bDescriptorSubtype;                               \
 67         __u8  bNumGrpTrmBlock;                                  \
 68         __u8  baAssoGrpTrmBlkID[n];                             \
 69 } __packed
 70 
 71 /* 5.4.1 Class-Specific Group Terminal Block Header Descriptor */
 72 struct usb_ms20_gr_trm_block_header_descriptor {
 73         __u8  bLength;                  /* 5 */
 74         __u8  bDescriptorType;          /* USB_DT_CS_GR_TRM_BLOCK */
 75         __u8  bDescriptorSubtype;       /* USB_MS_GR_TRM_BLOCK_HEADER */
 76         __le16 wTotalLength;            /* Total number of bytes */
 77 } __packed;
 78 
 79 /* 5.4.2.1 Group Terminal Block Descriptor */
 80 struct usb_ms20_gr_trm_block_descriptor {
 81         __u8  bLength;                  /* 13 */
 82         __u8  bDescriptorType;          /* USB_DT_CS_GR_TRM_BLOCK */
 83         __u8  bDescriptorSubtype;       /* USB_MS_GR_TRM_BLOCK */
 84         __u8  bGrpTrmBlkID;             /* ID of this Group Terminal Block */
 85         __u8  bGrpTrmBlkType;           /* Group Terminal Block Type */
 86         __u8  nGroupTrm;                /* The first member Group Terminal in this block */
 87         __u8  nNumGroupTrm;             /* Number of member Group Terminals spanned */
 88         __u8  iBlockItem;               /* String ID of Block item */
 89         __u8  bMIDIProtocol;            /* Default MIDI protocol */
 90         __le16 wMaxInputBandwidth;      /* Max input bandwidth capability in 4kB/s */
 91         __le16 wMaxOutputBandwidth;     /* Max output bandwidth capability in 4kB/s */
 92 } __packed;
 93 
 94 #endif /* __LINUX_USB_MIDI_V2_H */
 95 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php