1655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/**************************************************************************** 2655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng **************************************************************************** 3655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** 4655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** This header was automatically generated from a Linux kernel header 5655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** of the same name, to make information necessary for userspace to 6655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** call into the kernel available to libc. It contains only constants, 7655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** structures, and macros generated from the original header, and thus, 8655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** contains no copyrightable information. 9655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** 10655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** To edit the content of this header, modify the corresponding 11655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** source file (e.g. under external/kernel-headers/original/) then 12655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** run bionic/libc/kernel/tools/update_all.py 13655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** 14655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** Any manual change here will be lost the next time this script will 15655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** be run. You've been warned! 16655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng *** 17655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng **************************************************************************** 18655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************/ 19655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifndef __LINUX_USB_MIDI_H 20655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define __LINUX_USB_MIDI_H 21655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/types.h> 22655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_HEADER 0x01 23655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_MIDI_IN_JACK 0x02 24655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_MIDI_OUT_JACK 0x03 25655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_ELEMENT 0x04 26655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_GENERAL 0x01 27655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_EMBEDDED 0x01 28655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_MS_EXTERNAL 0x02 29655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct usb_ms_header_descriptor { 30d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bLength; 31d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorType; 32d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorSubtype; 33d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le16 bcdMSC; 34d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le16 wTotalLength; 35d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)); 36655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_DT_MS_HEADER_SIZE 7 37655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct usb_midi_in_jack_descriptor { 38d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bLength; 39d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorType; 40d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorSubtype; 41d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bJackType; 42d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bJackID; 43d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 iJack; 44d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)); 45655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_DT_MIDI_IN_SIZE 6 46655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct usb_midi_source_pin { 47d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 baSourceID; 48d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 baSourcePin; 49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)); 50655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct usb_midi_out_jack_descriptor { 51d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bLength; 52d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorType; 53d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorSubtype; 54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bJackType; 55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bJackID; 56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bNrInputPins; 57d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao struct usb_midi_source_pin pins[]; 58d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)); 59655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) 60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#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; \ 61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)) 62655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct usb_ms_endpoint_descriptor { 63d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bLength; 64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorType; 65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bDescriptorSubtype; 66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 bNumEmbMIDIJack; 67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 baAssocJackID[]; 68d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)); 69655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n)) 70d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) struct usb_ms_endpoint_descriptor_ ##n { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubtype; __u8 bNumEmbMIDIJack; __u8 baAssocJackID[n]; \ 71d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed)) 72655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif 73