1/* 2 * Line6 Linux USB driver - 0.8.0 3 * 4 * Copyright (C) 2004-2009 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 VARIAX_H 13#define VARIAX_H 14 15 16#include "driver.h" 17 18#include <linux/spinlock.h> 19#include <linux/usb.h> 20#include <linux/wait.h> 21 22#include <sound/core.h> 23 24#include "dumprequest.h" 25 26 27#define VARIAX_ACTIVATE_DELAY 10 28#define VARIAX_STARTUP_DELAY 3 29 30 31enum { 32 VARIAX_DUMP_PASS1 = LINE6_DUMP_CURRENT, 33 VARIAX_DUMP_PASS2, 34 VARIAX_DUMP_PASS3 35}; 36 37 38/** 39 Binary Variax model dump 40*/ 41struct variax_model { 42 /** 43 Header information (including program name). 44 */ 45 unsigned char name[18]; 46 47 /** 48 Model parameters. 49 */ 50 unsigned char control[78 * 2]; 51}; 52 53struct usb_line6_variax { 54 /** 55 Generic Line6 USB data. 56 */ 57 struct usb_line6 line6; 58 59 /** 60 Dump request structure. 61 Append two extra buffers for 3-pass data query. 62 */ 63 struct line6_dump_request dumpreq; struct line6_dump_reqbuf extrabuf[2]; 64 65 /** 66 Buffer for activation code. 67 */ 68 unsigned char *buffer_activate; 69 70 /** 71 Model number. 72 */ 73 int model; 74 75 /** 76 Current model settings. 77 */ 78 struct variax_model model_data; 79 80 /** 81 Name of current model bank. 82 */ 83 unsigned char bank[18]; 84 85 /** 86 Position of volume dial. 87 */ 88 int volume; 89 90 /** 91 Position of tone control dial. 92 */ 93 int tone; 94 95 /** 96 Timer for delayed activation request. 97 */ 98 struct timer_list activate_timer; 99}; 100 101 102extern void variax_disconnect(struct usb_interface *interface); 103extern int variax_init(struct usb_interface *interface, 104 struct usb_line6_variax *variax); 105extern void variax_process_message(struct usb_line6_variax *variax); 106 107 108#endif 109