Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/*
2 * Line6 Linux USB driver - 0.9.1beta
3 *
4 * 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 */
11
12#ifndef VARIAX_H
13#define VARIAX_H
14
15#include <linux/spinlock.h>
16#include <linux/usb.h>
17#include <linux/wait.h>
18#include <sound/core.h>
19
20#include "driver.h"
21
22#define VARIAX_STARTUP_DELAY1 1000
23#define VARIAX_STARTUP_DELAY3 100
24#define VARIAX_STARTUP_DELAY4 100
25
26/*
27 Stages of Variax startup procedure
28*/
29enum {
30 VARIAX_STARTUP_INIT = 1,
31 VARIAX_STARTUP_VERSIONREQ,
32 VARIAX_STARTUP_WAIT,
33 VARIAX_STARTUP_ACTIVATE,
34 VARIAX_STARTUP_WORKQUEUE,
35 VARIAX_STARTUP_SETUP,
36 VARIAX_STARTUP_LAST = VARIAX_STARTUP_SETUP - 1
37};
38
39struct usb_line6_variax {
40 /**
41 Generic Line6 USB data.
42 */
43 struct usb_line6 line6;
44
45 /**
46 Buffer for activation code.
47 */
48 unsigned char *buffer_activate;
49
50 /**
51 Handler for device initializaton.
52 */
53 struct work_struct startup_work;
54
55 /**
56 Timers for device initializaton.
57 */
58 struct timer_list startup_timer1;
59 struct timer_list startup_timer2;
60
61 /**
62 Current progress in startup procedure.
63 */
64 int startup_progress;
65};
66
67extern void line6_variax_disconnect(struct usb_interface *interface);
68extern int line6_variax_init(struct usb_interface *interface,
69 struct usb_line6_variax *variax);
70extern void line6_variax_process_message(struct usb_line6_variax *variax);
71
72#endif