Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux/usb
File: midi.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* <linux/usb/midi.h> -- USB MIDI definitions.
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 2006 Thumtronics Pty Ltd.
[4] Fix | Delete
* Developed for Thumtronics by Grey Innovation
[5] Fix | Delete
* Ben Williamson <ben.williamson@greyinnovation.com>
[6] Fix | Delete
*
[7] Fix | Delete
* This software is distributed under the terms of the GNU General Public
[8] Fix | Delete
* License ("GPL") version 2, as published by the Free Software Foundation.
[9] Fix | Delete
*
[10] Fix | Delete
* This file holds USB constants and structures defined
[11] Fix | Delete
* by the USB Device Class Definition for MIDI Devices.
[12] Fix | Delete
* Comments below reference relevant sections of that document:
[13] Fix | Delete
*
[14] Fix | Delete
* http://www.usb.org/developers/devclass_docs/midi10.pdf
[15] Fix | Delete
*/
[16] Fix | Delete
[17] Fix | Delete
#ifndef __LINUX_USB_MIDI_H
[18] Fix | Delete
#define __LINUX_USB_MIDI_H
[19] Fix | Delete
[20] Fix | Delete
#include <linux/types.h>
[21] Fix | Delete
[22] Fix | Delete
/* A.1 MS Class-Specific Interface Descriptor Subtypes */
[23] Fix | Delete
#define USB_MS_HEADER 0x01
[24] Fix | Delete
#define USB_MS_MIDI_IN_JACK 0x02
[25] Fix | Delete
#define USB_MS_MIDI_OUT_JACK 0x03
[26] Fix | Delete
#define USB_MS_ELEMENT 0x04
[27] Fix | Delete
[28] Fix | Delete
/* A.2 MS Class-Specific Endpoint Descriptor Subtypes */
[29] Fix | Delete
#define USB_MS_GENERAL 0x01
[30] Fix | Delete
[31] Fix | Delete
/* A.3 MS MIDI IN and OUT Jack Types */
[32] Fix | Delete
#define USB_MS_EMBEDDED 0x01
[33] Fix | Delete
#define USB_MS_EXTERNAL 0x02
[34] Fix | Delete
[35] Fix | Delete
/* 6.1.2.1 Class-Specific MS Interface Header Descriptor */
[36] Fix | Delete
struct usb_ms_header_descriptor {
[37] Fix | Delete
__u8 bLength;
[38] Fix | Delete
__u8 bDescriptorType;
[39] Fix | Delete
__u8 bDescriptorSubtype;
[40] Fix | Delete
__le16 bcdMSC;
[41] Fix | Delete
__le16 wTotalLength;
[42] Fix | Delete
} __attribute__ ((packed));
[43] Fix | Delete
[44] Fix | Delete
#define USB_DT_MS_HEADER_SIZE 7
[45] Fix | Delete
[46] Fix | Delete
/* 6.1.2.2 MIDI IN Jack Descriptor */
[47] Fix | Delete
struct usb_midi_in_jack_descriptor {
[48] Fix | Delete
__u8 bLength;
[49] Fix | Delete
__u8 bDescriptorType; /* USB_DT_CS_INTERFACE */
[50] Fix | Delete
__u8 bDescriptorSubtype; /* USB_MS_MIDI_IN_JACK */
[51] Fix | Delete
__u8 bJackType; /* USB_MS_EMBEDDED/EXTERNAL */
[52] Fix | Delete
__u8 bJackID;
[53] Fix | Delete
__u8 iJack;
[54] Fix | Delete
} __attribute__ ((packed));
[55] Fix | Delete
[56] Fix | Delete
#define USB_DT_MIDI_IN_SIZE 6
[57] Fix | Delete
[58] Fix | Delete
struct usb_midi_source_pin {
[59] Fix | Delete
__u8 baSourceID;
[60] Fix | Delete
__u8 baSourcePin;
[61] Fix | Delete
} __attribute__ ((packed));
[62] Fix | Delete
[63] Fix | Delete
/* 6.1.2.3 MIDI OUT Jack Descriptor */
[64] Fix | Delete
struct usb_midi_out_jack_descriptor {
[65] Fix | Delete
__u8 bLength;
[66] Fix | Delete
__u8 bDescriptorType; /* USB_DT_CS_INTERFACE */
[67] Fix | Delete
__u8 bDescriptorSubtype; /* USB_MS_MIDI_OUT_JACK */
[68] Fix | Delete
__u8 bJackType; /* USB_MS_EMBEDDED/EXTERNAL */
[69] Fix | Delete
__u8 bJackID;
[70] Fix | Delete
__u8 bNrInputPins; /* p */
[71] Fix | Delete
struct usb_midi_source_pin pins[]; /* [p] */
[72] Fix | Delete
/*__u8 iJack; -- omitted due to variable-sized pins[] */
[73] Fix | Delete
} __attribute__ ((packed));
[74] Fix | Delete
[75] Fix | Delete
#define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p))
[76] Fix | Delete
[77] Fix | Delete
/* As above, but more useful for defining your own descriptors: */
[78] Fix | Delete
#define DECLARE_USB_MIDI_OUT_JACK_DESCRIPTOR(p) \
[79] Fix | Delete
struct usb_midi_out_jack_descriptor_##p { \
[80] Fix | Delete
__u8 bLength; \
[81] Fix | Delete
__u8 bDescriptorType; \
[82] Fix | Delete
__u8 bDescriptorSubtype; \
[83] Fix | Delete
__u8 bJackType; \
[84] Fix | Delete
__u8 bJackID; \
[85] Fix | Delete
__u8 bNrInputPins; \
[86] Fix | Delete
struct usb_midi_source_pin pins[p]; \
[87] Fix | Delete
__u8 iJack; \
[88] Fix | Delete
} __attribute__ ((packed))
[89] Fix | Delete
[90] Fix | Delete
/* 6.2.2 Class-Specific MS Bulk Data Endpoint Descriptor */
[91] Fix | Delete
struct usb_ms_endpoint_descriptor {
[92] Fix | Delete
__u8 bLength; /* 4+n */
[93] Fix | Delete
__u8 bDescriptorType; /* USB_DT_CS_ENDPOINT */
[94] Fix | Delete
__u8 bDescriptorSubtype; /* USB_MS_GENERAL */
[95] Fix | Delete
__u8 bNumEmbMIDIJack; /* n */
[96] Fix | Delete
__u8 baAssocJackID[]; /* [n] */
[97] Fix | Delete
} __attribute__ ((packed));
[98] Fix | Delete
[99] Fix | Delete
#define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n))
[100] Fix | Delete
[101] Fix | Delete
/* As above, but more useful for defining your own descriptors: */
[102] Fix | Delete
#define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) \
[103] Fix | Delete
struct usb_ms_endpoint_descriptor_##n { \
[104] Fix | Delete
__u8 bLength; \
[105] Fix | Delete
__u8 bDescriptorType; \
[106] Fix | Delete
__u8 bDescriptorSubtype; \
[107] Fix | Delete
__u8 bNumEmbMIDIJack; \
[108] Fix | Delete
__u8 baAssocJackID[n]; \
[109] Fix | Delete
} __attribute__ ((packed))
[110] Fix | Delete
[111] Fix | Delete
#endif /* __LINUX_USB_MIDI_H */
[112] Fix | Delete
[113] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function