Merge git://git.kvack.org/~bcrl/aio-next
[deliverable/linux.git] / drivers / staging / line6 / pod.h
CommitLineData
705ececd 1/*
e1a164d7 2 * Line6 Linux USB driver - 0.9.1beta
705ececd 3 *
1027f476 4 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
705ececd
MG
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
1027f476 15#include <linux/interrupt.h>
705ececd
MG
16#include <linux/spinlock.h>
17#include <linux/usb.h>
705ececd
MG
18
19#include <sound/core.h>
20
1027f476 21#include "driver.h"
705ececd 22
705ececd
MG
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
e1a164d7
MG
40#define POD_STARTUP_DELAY 1000
41
42/*
43 Stages of POD startup procedure
44*/
45enum {
46 POD_STARTUP_INIT = 1,
e1a164d7
MG
47 POD_STARTUP_VERSIONREQ,
48 POD_STARTUP_WORKQUEUE,
49 POD_STARTUP_SETUP,
50 POD_STARTUP_LAST = POD_STARTUP_SETUP - 1
51};
705ececd 52
705ececd
MG
53struct usb_line6_pod {
54 /**
1027f476 55 Generic Line6 USB data.
705ececd
MG
56 */
57 struct usb_line6 line6;
58
705ececd 59 /**
1027f476 60 Instrument monitor level.
705ececd 61 */
2c35dc21 62 int monitor_level;
705ececd 63
705ececd 64 /**
1027f476 65 Timer for device initializaton.
705ececd 66 */
1027f476 67 struct timer_list startup_timer;
705ececd
MG
68
69 /**
1027f476 70 Work handler for device initializaton.
705ececd 71 */
1027f476 72 struct work_struct startup_work;
705ececd
MG
73
74 /**
1027f476 75 Current progress in startup procedure.
705ececd 76 */
1027f476 77 int startup_progress;
705ececd 78
705ececd 79 /**
1027f476 80 Serial number of device.
705ececd
MG
81 */
82 int serial_number;
83
84 /**
1027f476 85 Firmware version (x 100).
705ececd
MG
86 */
87 int firmware_version;
88
89 /**
1027f476 90 Device ID.
705ececd
MG
91 */
92 int device_id;
705ececd
MG
93};
94
1027f476 95extern void line6_pod_disconnect(struct usb_interface *interface);
e1a164d7
MG
96extern int line6_pod_init(struct usb_interface *interface,
97 struct usb_line6_pod *pod);
1027f476
MG
98extern void line6_pod_process_message(struct usb_line6_pod *pod);
99extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
5b9bd2ad 100 u8 value);
705ececd 101
705ececd 102#endif
This page took 0.452555 seconds and 5 git commands to generate.