Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pod.h
Go to the documentation of this file.
1 /*
2  * Line6 Linux USB driver - 0.9.1beta
3  *
4  * Copyright (C) 2004-2010 Markus Grabner ([email protected])
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 #include <linux/wait.h>
19 
20 #include <sound/core.h>
21 
22 #include "driver.h"
23 #include "dumprequest.h"
24 
25 /*
26  PODxt Live interfaces
27 */
28 #define PODXTLIVE_INTERFACE_POD 0
29 #define PODXTLIVE_INTERFACE_VARIAX 1
30 
31 /*
32  Locate name in binary program dump
33 */
34 #define POD_NAME_OFFSET 0
35 #define POD_NAME_LENGTH 16
36 
37 /*
38  Other constants
39 */
40 #define POD_CONTROL_SIZE 0x80
41 #define POD_BUFSIZE_DUMPREQ 7
42 #define POD_STARTUP_DELAY 1000
43 
44 /*
45  Stages of POD startup procedure
46 */
47 enum {
54 };
55 
60 struct ValueWait {
61  int value;
63 };
64 
68 struct pod_program {
72  unsigned char header[0x20];
73 
77  unsigned char control[POD_CONTROL_SIZE];
78 };
79 
80 struct usb_line6_pod {
84  struct usb_line6 line6;
85 
90 
94  unsigned char channel_num;
95 
100 
105 
110 
115 
120 
125 
130 
139 
144 
149 
154 
159 
163  unsigned long param_dirty[POD_CONTROL_SIZE / sizeof(unsigned long)];
164 
168  unsigned long atomic_flags;
169 
174 
179 
184 
188  char dirty;
189 
194 };
195 
196 extern void line6_pod_disconnect(struct usb_interface *interface);
197 extern int line6_pod_init(struct usb_interface *interface,
198  struct usb_line6_pod *pod);
199 extern void line6_pod_midi_postprocess(struct usb_line6_pod *pod,
200  unsigned char *data, int length);
201 extern void line6_pod_process_message(struct usb_line6_pod *pod);
202 extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
203  u8 value);
204 
205 #endif