Merge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux
[linux-2.6.git] / drivers / staging / line6 / pod.h
blob3e3f1671337ad0c9594ff1533bc09e8080ee2bb8
1 /*
2 * Line6 Linux USB driver - 0.9.1beta
4 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
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.
12 #ifndef POD_H
13 #define POD_H
15 #include <linux/interrupt.h>
16 #include <linux/spinlock.h>
17 #include <linux/usb.h>
19 #include <sound/core.h>
21 #include "driver.h"
24 PODxt Live interfaces
26 #define PODXTLIVE_INTERFACE_POD 0
27 #define PODXTLIVE_INTERFACE_VARIAX 1
30 Locate name in binary program dump
32 #define POD_NAME_OFFSET 0
33 #define POD_NAME_LENGTH 16
36 Other constants
38 #define POD_CONTROL_SIZE 0x80
39 #define POD_BUFSIZE_DUMPREQ 7
40 #define POD_STARTUP_DELAY 1000
43 Stages of POD startup procedure
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
53 struct usb_line6_pod {
54 /**
55 Generic Line6 USB data.
57 struct usb_line6 line6;
59 /**
60 Instrument monitor level.
62 int monitor_level;
64 /**
65 Timer for device initializaton.
67 struct timer_list startup_timer;
69 /**
70 Work handler for device initializaton.
72 struct work_struct startup_work;
74 /**
75 Current progress in startup procedure.
77 int startup_progress;
79 /**
80 Serial number of device.
82 int serial_number;
84 /**
85 Firmware version (x 100).
87 int firmware_version;
89 /**
90 Device ID.
92 int device_id;
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);
102 #endif