staging: line6: drop pod prog_data buffers
[firefly-linux-kernel-4.4.55.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 #include "dumprequest.h"
23
24 /*
25         PODxt Live interfaces
26 */
27 #define PODXTLIVE_INTERFACE_POD    0
28 #define PODXTLIVE_INTERFACE_VARIAX 1
29
30 /*
31         Locate name in binary program dump
32 */
33 #define POD_NAME_OFFSET 0
34 #define POD_NAME_LENGTH 16
35
36 /*
37         Other constants
38 */
39 #define POD_CONTROL_SIZE 0x80
40 #define POD_BUFSIZE_DUMPREQ 7
41 #define POD_STARTUP_DELAY 1000
42
43 /*
44         Stages of POD startup procedure
45 */
46 enum {
47         POD_STARTUP_INIT = 1,
48         POD_STARTUP_DUMPREQ,
49         POD_STARTUP_VERSIONREQ,
50         POD_STARTUP_WORKQUEUE,
51         POD_STARTUP_SETUP,
52         POD_STARTUP_LAST = POD_STARTUP_SETUP - 1
53 };
54
55 struct usb_line6_pod {
56         /**
57                 Generic Line6 USB data.
58         */
59         struct usb_line6 line6;
60
61         /**
62                 Dump request structure.
63         */
64         struct line6_dump_request dumpreq;
65
66         /**
67                 Instrument monitor level.
68         */
69         int monitor_level;
70
71         /**
72                 Timer for device initializaton.
73         */
74         struct timer_list startup_timer;
75
76         /**
77                 Work handler for device initializaton.
78         */
79         struct work_struct startup_work;
80
81         /**
82                 Current progress in startup procedure.
83         */
84         int startup_progress;
85
86         /**
87                 Some atomic flags.
88         */
89         unsigned long atomic_flags;
90
91         /**
92                 Serial number of device.
93         */
94         int serial_number;
95
96         /**
97                 Firmware version (x 100).
98         */
99         int firmware_version;
100
101         /**
102                 Device ID.
103         */
104         int device_id;
105 };
106
107 extern void line6_pod_disconnect(struct usb_interface *interface);
108 extern int line6_pod_init(struct usb_interface *interface,
109                           struct usb_line6_pod *pod);
110 extern void line6_pod_process_message(struct usb_line6_pod *pod);
111 extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
112                                          u8 value);
113
114 #endif