122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef __LINUX_USB_MIDI_H
2022851890Sopenharmony_ci#define __LINUX_USB_MIDI_H
2122851890Sopenharmony_ci#include <linux/types.h>
2222851890Sopenharmony_ci#define USB_MS_HEADER 0x01
2322851890Sopenharmony_ci#define USB_MS_MIDI_IN_JACK 0x02
2422851890Sopenharmony_ci#define USB_MS_MIDI_OUT_JACK 0x03
2522851890Sopenharmony_ci#define USB_MS_ELEMENT 0x04
2622851890Sopenharmony_ci#define USB_MS_GENERAL 0x01
2722851890Sopenharmony_ci#define USB_MS_EMBEDDED 0x01
2822851890Sopenharmony_ci#define USB_MS_EXTERNAL 0x02
2922851890Sopenharmony_cistruct usb_ms_header_descriptor {
3022851890Sopenharmony_ci  __u8 bLength;
3122851890Sopenharmony_ci  __u8 bDescriptorType;
3222851890Sopenharmony_ci  __u8 bDescriptorSubtype;
3322851890Sopenharmony_ci  __le16 bcdMSC;
3422851890Sopenharmony_ci  __le16 wTotalLength;
3522851890Sopenharmony_ci} __attribute__((packed));
3622851890Sopenharmony_ci#define USB_DT_MS_HEADER_SIZE 7
3722851890Sopenharmony_cistruct usb_midi_in_jack_descriptor {
3822851890Sopenharmony_ci  __u8 bLength;
3922851890Sopenharmony_ci  __u8 bDescriptorType;
4022851890Sopenharmony_ci  __u8 bDescriptorSubtype;
4122851890Sopenharmony_ci  __u8 bJackType;
4222851890Sopenharmony_ci  __u8 bJackID;
4322851890Sopenharmony_ci  __u8 iJack;
4422851890Sopenharmony_ci} __attribute__((packed));
4522851890Sopenharmony_ci#define USB_DT_MIDI_IN_SIZE 6
4622851890Sopenharmony_cistruct usb_midi_source_pin {
4722851890Sopenharmony_ci  __u8 baSourceID;
4822851890Sopenharmony_ci  __u8 baSourcePin;
4922851890Sopenharmony_ci} __attribute__((packed));
5022851890Sopenharmony_cistruct usb_midi_out_jack_descriptor {
5122851890Sopenharmony_ci  __u8 bLength;
5222851890Sopenharmony_ci  __u8 bDescriptorType;
5322851890Sopenharmony_ci  __u8 bDescriptorSubtype;
5422851890Sopenharmony_ci  __u8 bJackType;
5522851890Sopenharmony_ci  __u8 bJackID;
5622851890Sopenharmony_ci  __u8 bNrInputPins;
5722851890Sopenharmony_ci  struct usb_midi_source_pin pins[];
5822851890Sopenharmony_ci} __attribute__((packed));
5922851890Sopenharmony_ci#define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p))
6022851890Sopenharmony_ci#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; \
6122851890Sopenharmony_ci} __attribute__((packed))
6222851890Sopenharmony_cistruct usb_ms_endpoint_descriptor {
6322851890Sopenharmony_ci  __u8 bLength;
6422851890Sopenharmony_ci  __u8 bDescriptorType;
6522851890Sopenharmony_ci  __u8 bDescriptorSubtype;
6622851890Sopenharmony_ci  __u8 bNumEmbMIDIJack;
6722851890Sopenharmony_ci  __u8 baAssocJackID[];
6822851890Sopenharmony_ci} __attribute__((packed));
6922851890Sopenharmony_ci#define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n))
7022851890Sopenharmony_ci#define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) struct usb_ms_endpoint_descriptor_ ##n { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubtype; __u8 bNumEmbMIDIJack; __u8 baAssocJackID[n]; \
7122851890Sopenharmony_ci} __attribute__((packed))
7222851890Sopenharmony_ci#endif
73