| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Line 6 Linux USB driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 8 | | - * published by the Free Software Foundation, version 2. |
|---|
| 9 | | - * |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #ifndef DRIVER_H |
|---|
| .. | .. |
|---|
| 68 | 64 | |
|---|
| 69 | 65 | #define LINE6_CHANNEL_MASK 0x0f |
|---|
| 70 | 66 | |
|---|
| 71 | | -#define CHECK_STARTUP_PROGRESS(x, n) \ |
|---|
| 72 | | -do { \ |
|---|
| 73 | | - if ((x) >= (n)) \ |
|---|
| 74 | | - return; \ |
|---|
| 75 | | - x = (n); \ |
|---|
| 76 | | -} while (0) |
|---|
| 77 | | - |
|---|
| 78 | 67 | extern const unsigned char line6_midi_id[3]; |
|---|
| 79 | 68 | |
|---|
| 80 | | -static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; |
|---|
| 81 | | -static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; |
|---|
| 69 | +#define SYSEX_DATA_OFS (sizeof(line6_midi_id) + 3) |
|---|
| 70 | +#define SYSEX_EXTRA_SIZE (sizeof(line6_midi_id) + 4) |
|---|
| 82 | 71 | |
|---|
| 83 | 72 | /* |
|---|
| 84 | 73 | Common properties of Line 6 devices. |
|---|
| .. | .. |
|---|
| 119 | 108 | LINE6_CAP_CONTROL_MIDI = 1 << 4, |
|---|
| 120 | 109 | /* device provides low-level information */ |
|---|
| 121 | 110 | LINE6_CAP_CONTROL_INFO = 1 << 5, |
|---|
| 111 | + /* device provides hardware monitoring volume control */ |
|---|
| 112 | + LINE6_CAP_HWMON_CTL = 1 << 6, |
|---|
| 122 | 113 | }; |
|---|
| 123 | 114 | |
|---|
| 124 | 115 | /* |
|---|
| .. | .. |
|---|
| 174 | 165 | struct mutex read_lock; |
|---|
| 175 | 166 | wait_queue_head_t wait_queue; |
|---|
| 176 | 167 | unsigned int active:1; |
|---|
| 168 | + unsigned int nonblock:1; |
|---|
| 177 | 169 | STRUCT_KFIFO_REC_2(LINE6_BUFSIZE_LISTEN * LINE6_RAW_MESSAGES_MAXCOUNT) |
|---|
| 178 | 170 | fifo; |
|---|
| 179 | 171 | } messages; |
|---|
| .. | .. |
|---|
| 195 | 187 | void *data, unsigned datalen); |
|---|
| 196 | 188 | extern int line6_read_serial_number(struct usb_line6 *line6, |
|---|
| 197 | 189 | u32 *serial_number); |
|---|
| 190 | +extern int line6_send_raw_message(struct usb_line6 *line6, |
|---|
| 191 | + const char *buffer, int size); |
|---|
| 198 | 192 | extern int line6_send_raw_message_async(struct usb_line6 *line6, |
|---|
| 199 | 193 | const char *buffer, int size); |
|---|
| 200 | 194 | extern int line6_send_sysex_message(struct usb_line6 *line6, |
|---|
| 201 | 195 | const char *buffer, int size); |
|---|
| 202 | 196 | extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr, |
|---|
| 203 | 197 | const char *buf, size_t count); |
|---|
| 204 | | -extern void line6_start_timer(struct timer_list *timer, unsigned long msecs, |
|---|
| 205 | | - void (*function)(struct timer_list *t)); |
|---|
| 206 | 198 | extern int line6_version_request_async(struct usb_line6 *line6); |
|---|
| 207 | 199 | extern int line6_write_data(struct usb_line6 *line6, unsigned address, |
|---|
| 208 | 200 | void *data, unsigned datalen); |
|---|