Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Line 6 Linux USB driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #ifndef MIDI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #define MIDI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <sound/rawmidi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include "midibuf.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define MIDI_BUFFER_SIZE 1024
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct snd_line6_midi {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	/* Pointer back to the Line 6 driver data structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	struct usb_line6 *line6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	/* MIDI substream for receiving (or NULL if not active) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	struct snd_rawmidi_substream *substream_receive;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	/* MIDI substream for transmitting (or NULL if not active) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	struct snd_rawmidi_substream *substream_transmit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	/* Number of currently active MIDI send URBs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	int num_active_send_urbs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	/* Spin lock to protect MIDI buffer handling */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	spinlock_t lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	/* Wait queue for MIDI transmission */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	wait_queue_head_t send_wait;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	/* Buffer for incoming MIDI stream */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	struct midi_buffer midibuf_in;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	/* Buffer for outgoing MIDI stream */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	struct midi_buffer midibuf_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) extern int line6_init_midi(struct usb_line6 *line6);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) extern void line6_midi_receive(struct usb_line6 *line6, unsigned char *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 			       int length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #endif