2 * Line6 Linux USB driver - 0.8.0
4 * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at)
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.
18 #include <linux/spinlock.h>
19 #include <linux/usb.h>
20 #include <linux/wait.h>
21 #include <linux/workqueue.h>
23 #include <sound/core.h>
25 #include "dumprequest.h"
31 #define PODXTLIVE_INTERFACE_POD 0
32 #define PODXTLIVE_INTERFACE_VARIAX 1
35 Locate name in binary program dump
37 #define POD_NAME_OFFSET 0
38 #define POD_NAME_LENGTH 16
43 #define POD_CONTROL_SIZE 0x80
44 #define POD_BUFSIZE_DUMPREQ 7
45 #define POD_STARTUP_DELAY 3
49 Data structure for values that need to be requested explicitly.
50 This is the case for system and tuner settings.
54 wait_queue_head_t wait;
58 Binary PodXT Pro program dump
62 Header information (including program name).
64 unsigned char header[0x20];
69 unsigned char control[POD_CONTROL_SIZE];
72 struct usb_line6_pod {
74 Generic Line6 USB data.
76 struct usb_line6 line6;
79 Dump request structure.
81 struct line6_dump_request dumpreq;
84 Current program number.
86 unsigned char channel_num;
89 Current program settings.
91 struct pod_program prog_data;
94 Buffer for data retrieved from or to be stored on PODxt Pro.
96 struct pod_program prog_data_buf;
99 Buffer for requesting version number.
101 unsigned char *buffer_versionreq;
106 struct ValueWait tuner_mute;
109 Tuner base frequency (typically 440Hz).
111 struct ValueWait tuner_freq;
114 Note received from tuner.
116 struct ValueWait tuner_note;
119 Pitch value received from tuner.
121 struct ValueWait tuner_pitch;
124 Instrument monitor level.
126 struct ValueWait monitor_level;
130 0: send processed guitar
132 2: send clean guitar re-amp playback
133 3: send re-amp playback
135 struct ValueWait routing;
138 Wait for audio clipping event.
140 struct ValueWait clipping;
143 Bottom-half for creation of sysfs special files.
145 struct work_struct create_files_work;
148 Dirty flags for access to parameter data.
150 unsigned long param_dirty[POD_CONTROL_SIZE / sizeof(unsigned long)];
155 unsigned long atomic_flags;
158 Counter for startup process.
163 Serial number of device.
168 Firmware version (x 100).
170 int firmware_version;
178 Flag to indicate modification of current program settings.
183 Flag if initial firmware version request has been successful.
188 Flag to enable MIDI postprocessing.
190 char midi_postprocess;
194 extern void pod_disconnect(struct usb_interface *interface);
195 extern int pod_init(struct usb_interface *interface, struct usb_line6_pod *pod);
196 extern void pod_midi_postprocess(struct usb_line6_pod *pod,
197 unsigned char *data, int length);
198 extern void pod_process_message(struct usb_line6_pod *pod);
199 extern void pod_receive_parameter(struct usb_line6_pod *pod, int param);
200 extern void pod_transmit_parameter(struct usb_line6_pod *pod, int param,