staging: line6: drop dump requests from pod startup
[cascardo/linux.git] / drivers / staging / line6 / pod.h
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 POD_H
13 #define POD_H
14
15 #include <linux/interrupt.h>
16 #include <linux/spinlock.h>
17 #include <linux/usb.h>
18
19 #include <sound/core.h>
20
21 #include "driver.h"
22
23 /*
24         PODxt Live interfaces
25 */
26 #define PODXTLIVE_INTERFACE_POD    0
27 #define PODXTLIVE_INTERFACE_VARIAX 1
28
29 /*
30         Locate name in binary program dump
31 */
32 #define POD_NAME_OFFSET 0
33 #define POD_NAME_LENGTH 16
34
35 /*
36         Other constants
37 */
38 #define POD_CONTROL_SIZE 0x80
39 #define POD_BUFSIZE_DUMPREQ 7
40 #define POD_STARTUP_DELAY 1000
41
42 /*
43         Stages of POD startup procedure
44 */
45 enum {
46         POD_STARTUP_INIT = 1,
47         POD_STARTUP_VERSIONREQ,
48         POD_STARTUP_WORKQUEUE,
49         POD_STARTUP_SETUP,
50         POD_STARTUP_LAST = POD_STARTUP_SETUP - 1
51 };
52
53 struct usb_line6_pod {
54         /**
55                 Generic Line6 USB data.
56         */
57         struct usb_line6 line6;
58
59         /**
60                 Instrument monitor level.
61         */
62         int monitor_level;
63
64         /**
65                 Timer for device initializaton.
66         */
67         struct timer_list startup_timer;
68
69         /**
70                 Work handler for device initializaton.
71         */
72         struct work_struct startup_work;
73
74         /**
75                 Current progress in startup procedure.
76         */
77         int startup_progress;
78
79         /**
80                 Serial number of device.
81         */
82         int serial_number;
83
84         /**
85                 Firmware version (x 100).
86         */
87         int firmware_version;
88
89         /**
90                 Device ID.
91         */
92         int device_id;
93 };
94
95 extern void line6_pod_disconnect(struct usb_interface *interface);
96 extern int line6_pod_init(struct usb_interface *interface,
97                           struct usb_line6_pod *pod);
98 extern void line6_pod_process_message(struct usb_line6_pod *pod);
99 extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
100                                          u8 value);
101
102 #endif