include/uapi/linux/usb/midi.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/usb/midi.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/usb/midi.h- Extension
.h- Size
- 3434 bytes
- Lines
- 114
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct usb_ms_header_descriptorstruct usb_midi_in_jack_descriptorstruct usb_midi_source_pinstruct usb_midi_out_jack_descriptorstruct usb_ms_endpoint_descriptor
Annotated Snippet
struct usb_ms_header_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bDescriptorSubtype;
__le16 bcdMSC;
__le16 wTotalLength;
} __attribute__ ((packed));
#define USB_DT_MS_HEADER_SIZE 7
/* 6.1.2.2 MIDI IN Jack Descriptor */
struct usb_midi_in_jack_descriptor {
__u8 bLength;
__u8 bDescriptorType; /* USB_DT_CS_INTERFACE */
__u8 bDescriptorSubtype; /* USB_MS_MIDI_IN_JACK */
__u8 bJackType; /* USB_MS_EMBEDDED/EXTERNAL */
__u8 bJackID;
__u8 iJack;
} __attribute__ ((packed));
#define USB_DT_MIDI_IN_SIZE 6
struct usb_midi_source_pin {
__u8 baSourceID;
__u8 baSourcePin;
} __attribute__ ((packed));
/* 6.1.2.3 MIDI OUT Jack Descriptor */
struct usb_midi_out_jack_descriptor {
__u8 bLength;
__u8 bDescriptorType; /* USB_DT_CS_INTERFACE */
__u8 bDescriptorSubtype; /* USB_MS_MIDI_OUT_JACK */
__u8 bJackType; /* USB_MS_EMBEDDED/EXTERNAL */
__u8 bJackID;
__u8 bNrInputPins; /* p */
struct usb_midi_source_pin pins[]; /* [p] */
/*__u8 iJack; -- omitted due to variable-sized pins[] */
} __attribute__ ((packed));
#define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p))
/* As above, but more useful for defining your own descriptors: */
#define DECLARE_USB_MIDI_OUT_JACK_DESCRIPTOR(p) \
struct usb_midi_out_jack_descriptor_##p { \
__u8 bLength; \
__u8 bDescriptorType; \
__u8 bDescriptorSubtype; \
__u8 bJackType; \
__u8 bJackID; \
__u8 bNrInputPins; \
struct usb_midi_source_pin pins[p]; \
__u8 iJack; \
} __attribute__ ((packed))
/* 6.2.2 Class-Specific MS Bulk Data Endpoint Descriptor */
struct usb_ms_endpoint_descriptor {
__u8 bLength; /* 4+n */
__u8 bDescriptorType; /* USB_DT_CS_ENDPOINT */
__u8 bDescriptorSubtype; /* USB_MS_GENERAL */
__u8 bNumEmbMIDIJack; /* n */
__u8 baAssocJackID[]; /* [n] */
} __attribute__ ((packed));
#define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n))
/* As above, but more useful for defining your own descriptors: */
#define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) \
struct usb_ms_endpoint_descriptor_##n { \
__u8 bLength; \
__u8 bDescriptorType; \
__u8 bDescriptorSubtype; \
__u8 bNumEmbMIDIJack; \
__u8 baAssocJackID[n]; \
} __attribute__ ((packed))
#endif /* __LINUX_USB_MIDI_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct usb_ms_header_descriptor`, `struct usb_midi_in_jack_descriptor`, `struct usb_midi_source_pin`, `struct usb_midi_out_jack_descriptor`, `struct usb_ms_endpoint_descriptor`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.