linux/include/linux/usb/midi-v2.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * <linux/usb/midi-v2.h> -- USB MIDI 2.0 definitions.
 */

#ifndef __LINUX_USB_MIDI_V2_H
#define __LINUX_USB_MIDI_V2_H

#include <linux/types.h>
#include <linux/usb/midi.h>

/* A.1 MS Class-Specific Interface Descriptor Types */
#define USB_DT_CS_GR_TRM_BLOCK

/* A.1 MS Class-Specific Interface Descriptor Subtypes */
/* same as MIDI 1.0 */

/* A.2 MS Class-Specific Endpoint Descriptor Subtypes */
#define USB_MS_GENERAL_2_0

/* A.3 MS Class-Specific Group Terminal Block Descriptor Subtypes */
#define USB_MS_GR_TRM_BLOCK_UNDEFINED
#define USB_MS_GR_TRM_BLOCK_HEADER
#define USB_MS_GR_TRM_BLOCK

/* A.4 MS Interface Header MIDIStreaming Class Revision */
#define USB_MS_REV_MIDI_1_0
#define USB_MS_REV_MIDI_2_0

/* A.5 MS MIDI IN and OUT Jack Types */
/* same as MIDI 1.0 */

/* A.6 Group Terminal Block Types */
#define USB_MS_GR_TRM_BLOCK_TYPE_BIDIRECTIONAL
#define USB_MS_GR_TRM_BLOCK_TYPE_INPUT_ONLY
#define USB_MS_GR_TRM_BLOCK_TYPE_OUTPUT_ONLY

/* A.7 Group Terminal Default MIDI Protocol */
#define USB_MS_MIDI_PROTO_UNKNOWN
#define USB_MS_MIDI_PROTO_1_0_64
#define USB_MS_MIDI_PROTO_1_0_64_JRTS
#define USB_MS_MIDI_PROTO_1_0_128
#define USB_MS_MIDI_PROTO_1_0_128_JRTS
#define USB_MS_MIDI_PROTO_2_0
#define USB_MS_MIDI_PROTO_2_0_JRTS

/* 5.2.2.1 Class-Specific MS Interface Header Descriptor */
/* Same as MIDI 1.0, use struct usb_ms_header_descriptor */

/* 5.3.2 Class-Specific MIDI Streaming Data Endpoint Descriptor */
struct usb_ms20_endpoint_descriptor {} __packed;

#define USB_DT_MS20_ENDPOINT_SIZE(n)

/* As above, but more useful for defining your own descriptors: */
#define DECLARE_USB_MS20_ENDPOINT_DESCRIPTOR(n)

/* 5.4.1 Class-Specific Group Terminal Block Header Descriptor */
struct usb_ms20_gr_trm_block_header_descriptor {} __packed;

/* 5.4.2.1 Group Terminal Block Descriptor */
struct usb_ms20_gr_trm_block_descriptor {} __packed;

#endif /* __LINUX_USB_MIDI_V2_H */