forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/usb/line6/driver.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Line 6 Linux USB driver
34 *
45 * 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
- *
106 */
117
128 #ifndef DRIVER_H
....@@ -68,17 +64,10 @@
6864
6965 #define LINE6_CHANNEL_MASK 0x0f
7066
71
-#define CHECK_STARTUP_PROGRESS(x, n) \
72
-do { \
73
- if ((x) >= (n)) \
74
- return; \
75
- x = (n); \
76
-} while (0)
77
-
7867 extern const unsigned char line6_midi_id[3];
7968
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)
8271
8372 /*
8473 Common properties of Line 6 devices.
....@@ -119,6 +108,8 @@
119108 LINE6_CAP_CONTROL_MIDI = 1 << 4,
120109 /* device provides low-level information */
121110 LINE6_CAP_CONTROL_INFO = 1 << 5,
111
+ /* device provides hardware monitoring volume control */
112
+ LINE6_CAP_HWMON_CTL = 1 << 6,
122113 };
123114
124115 /*
....@@ -174,6 +165,7 @@
174165 struct mutex read_lock;
175166 wait_queue_head_t wait_queue;
176167 unsigned int active:1;
168
+ unsigned int nonblock:1;
177169 STRUCT_KFIFO_REC_2(LINE6_BUFSIZE_LISTEN * LINE6_RAW_MESSAGES_MAXCOUNT)
178170 fifo;
179171 } messages;
....@@ -195,14 +187,14 @@
195187 void *data, unsigned datalen);
196188 extern int line6_read_serial_number(struct usb_line6 *line6,
197189 u32 *serial_number);
190
+extern int line6_send_raw_message(struct usb_line6 *line6,
191
+ const char *buffer, int size);
198192 extern int line6_send_raw_message_async(struct usb_line6 *line6,
199193 const char *buffer, int size);
200194 extern int line6_send_sysex_message(struct usb_line6 *line6,
201195 const char *buffer, int size);
202196 extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr,
203197 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));
206198 extern int line6_version_request_async(struct usb_line6 *line6);
207199 extern int line6_write_data(struct usb_line6 *line6, unsigned address,
208200 void *data, unsigned datalen);