2 * Line6 Linux USB driver - 0.9.1beta
4 * Copyright (C) 2004-2010 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.
15 #include <linux/spinlock.h>
16 #include <linux/usb.h>
17 #include <linux/wait.h>
18 #include <sound/core.h>
21 #include "dumprequest.h"
23 #define VARIAX_STARTUP_DELAY1 1000
24 #define VARIAX_STARTUP_DELAY3 100
25 #define VARIAX_STARTUP_DELAY4 100
28 Stages of Variax startup procedure
31 VARIAX_STARTUP_INIT
= 1,
32 VARIAX_STARTUP_VERSIONREQ
,
34 VARIAX_STARTUP_ACTIVATE
,
35 VARIAX_STARTUP_DUMPREQ
,
36 VARIAX_STARTUP_WORKQUEUE
,
38 VARIAX_STARTUP_LAST
= VARIAX_STARTUP_SETUP
- 1
42 VARIAX_DUMP_PASS1
= LINE6_DUMP_CURRENT
,
48 Binary Variax model dump
52 Header information (including program name).
54 unsigned char name
[18];
59 unsigned char control
[78 * 2];
62 struct usb_line6_variax
{
64 Generic Line6 USB data.
66 struct usb_line6 line6
;
69 Dump request structure.
70 Append two extra buffers for 3-pass data query.
72 struct line6_dump_request dumpreq
;
73 struct line6_dump_reqbuf extrabuf
[2];
76 Buffer for activation code.
78 unsigned char *buffer_activate
;
81 Current model settings.
83 struct variax_model model_data
;
86 Handler for device initializaton.
88 struct work_struct startup_work
;
91 Timers for device initializaton.
93 struct timer_list startup_timer1
;
94 struct timer_list startup_timer2
;
97 Current progress in startup procedure.
102 extern void line6_variax_disconnect(struct usb_interface
*interface
);
103 extern int line6_variax_init(struct usb_interface
*interface
,
104 struct usb_line6_variax
*variax
);
105 extern void line6_variax_process_message(struct usb_line6_variax
*variax
);