ALSA: move line6 usb driver into sound/usb
[firefly-linux-kernel-4.4.55.git] / sound / usb / 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         Locate name in binary program dump
25 */
26 #define POD_NAME_OFFSET 0
27 #define POD_NAME_LENGTH 16
28
29 /*
30         Other constants
31 */
32 #define POD_CONTROL_SIZE 0x80
33 #define POD_BUFSIZE_DUMPREQ 7
34 #define POD_STARTUP_DELAY 1000
35
36 /*
37         Stages of POD startup procedure
38 */
39 enum {
40         POD_STARTUP_INIT = 1,
41         POD_STARTUP_VERSIONREQ,
42         POD_STARTUP_WORKQUEUE,
43         POD_STARTUP_SETUP,
44         POD_STARTUP_LAST = POD_STARTUP_SETUP - 1
45 };
46
47 struct usb_line6_pod {
48         /**
49                 Generic Line6 USB data.
50         */
51         struct usb_line6 line6;
52
53         /**
54                 Instrument monitor level.
55         */
56         int monitor_level;
57
58         /**
59                 Timer for device initializaton.
60         */
61         struct timer_list startup_timer;
62
63         /**
64                 Work handler for device initializaton.
65         */
66         struct work_struct startup_work;
67
68         /**
69                 Current progress in startup procedure.
70         */
71         int startup_progress;
72
73         /**
74                 Serial number of device.
75         */
76         int serial_number;
77
78         /**
79                 Firmware version (x 100).
80         */
81         int firmware_version;
82
83         /**
84                 Device ID.
85         */
86         int device_id;
87 };
88
89 extern int line6_pod_init(struct usb_interface *interface,
90                           struct usb_line6 *line6);
91
92 #endif