midi.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef __LINUX_USB_MIDI_H 20#define __LINUX_USB_MIDI_H 21#include <linux/types.h> 22#define USB_MS_HEADER 0x01 23#define USB_MS_MIDI_IN_JACK 0x02 24#define USB_MS_MIDI_OUT_JACK 0x03 25#define USB_MS_ELEMENT 0x04 26#define USB_MS_GENERAL 0x01 27#define USB_MS_EMBEDDED 0x01 28#define USB_MS_EXTERNAL 0x02 29struct usb_ms_header_descriptor { 30 __u8 bLength; 31 __u8 bDescriptorType; 32 __u8 bDescriptorSubtype; 33 __le16 bcdMSC; 34 __le16 wTotalLength; 35} __attribute__((packed)); 36#define USB_DT_MS_HEADER_SIZE 7 37struct usb_midi_in_jack_descriptor { 38 __u8 bLength; 39 __u8 bDescriptorType; 40 __u8 bDescriptorSubtype; 41 __u8 bJackType; 42 __u8 bJackID; 43 __u8 iJack; 44} __attribute__((packed)); 45#define USB_DT_MIDI_IN_SIZE 6 46struct usb_midi_source_pin { 47 __u8 baSourceID; 48 __u8 baSourcePin; 49} __attribute__((packed)); 50struct usb_midi_out_jack_descriptor { 51 __u8 bLength; 52 __u8 bDescriptorType; 53 __u8 bDescriptorSubtype; 54 __u8 bJackType; 55 __u8 bJackID; 56 __u8 bNrInputPins; 57 struct usb_midi_source_pin pins[]; 58} __attribute__((packed)); 59#define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) 60#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; \ 61} __attribute__((packed)) 62struct usb_ms_endpoint_descriptor { 63 __u8 bLength; 64 __u8 bDescriptorType; 65 __u8 bDescriptorSubtype; 66 __u8 bNumEmbMIDIJack; 67 __u8 baAssocJackID[]; 68} __attribute__((packed)); 69#define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n)) 70#define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) struct usb_ms_endpoint_descriptor_ ##n { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubtype; __u8 bNumEmbMIDIJack; __u8 baAssocJackID[n]; \ 71} __attribute__((packed)) 72#endif 73