diff options
Diffstat (limited to 'drivers/staging/line6/driver.h')
-rw-r--r-- | drivers/staging/line6/driver.h | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index 9908bfa..b1e5557 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h @@ -1,7 +1,7 @@ /* - * Line6 Linux USB driver - 0.8.0 + * Line6 Linux USB driver - 0.9.0 * - * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at) + * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -13,23 +13,24 @@ #define DRIVER_H -#include "config.h" - #include <linux/spinlock.h> #include <linux/usb.h> -#include <linux/wait.h> #include <sound/core.h> #include "midi.h" + #define DRIVER_NAME "line6usb" +#if defined(CONFIG_LINE6_USB_DUMP_CTRL) || defined(CONFIG_LINE6_USB_DUMP_MIDI) || defined(CONFIG_LINE6_USB_DUMP_PCM) +#define CONFIG_LINE6_USB_DUMP_ANY +#endif + #define LINE6_TIMEOUT 1 #define LINE6_MAX_DEVICES 8 #define LINE6_BUFSIZE_LISTEN 32 #define LINE6_MESSAGE_MAXLEN 256 - /* Line6 MIDI control commands */ @@ -54,6 +55,12 @@ #define LINE6_CHANNEL_MASK 0x0f +#ifdef CONFIG_LINE6_USB_DEBUG +#define DEBUG_MESSAGES(x) (x) +#else +#define DEBUG_MESSAGES(x) +#endif + #define MISSING_CASE \ printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \ @@ -67,10 +74,14 @@ do { \ return err; \ } while (0) +#define CHECK_STARTUP_PROGRESS(x, n) \ + if((x) >= (n)) \ + return; \ + x = (n); + extern const unsigned char line6_midi_id[3]; extern struct usb_line6 *line6_devices[LINE6_MAX_DEVICES]; -extern struct workqueue_struct *line6_workqueue; static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; @@ -80,8 +91,27 @@ static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; Common properties of Line6 devices. */ struct line6_properties { + /** + Card id string (maximum 16 characters). + This can be used to address the device in ALSA programs as + "default:CARD=<id>" + */ + const char *id; + + /** + Card short name (maximum 32 characters). + */ const char *name; + + /** + Bit identifying this device in the line6usb driver. + */ int device_bit; + + /** + Bit vector defining this device's capabilities in the + line6usb driver. + */ int capabilities; }; @@ -191,14 +221,22 @@ extern int line6_send_raw_message_async(struct usb_line6 *line6, const char *buffer, int size); extern int line6_send_sysex_message(struct usb_line6 *line6, const char *buffer, int size); +extern int line6_send_sysex_message_async(struct usb_line6 *line6, + const char *buffer, int size); extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); +extern void line6_start_timer(struct timer_list *timer, unsigned int msecs, + void (*function)(unsigned long), unsigned long data); extern int line6_transmit_parameter(struct usb_line6 *line6, int param, int value); +extern int line6_version_request_async(struct usb_line6 *line6); extern int line6_write_data(struct usb_line6 *line6, int address, void *data, size_t datalen); + +#ifdef CONFIG_LINE6_USB_DUMP_ANY extern void line6_write_hexdump(struct usb_line6 *line6, char dir, const unsigned char *buffer, int size); +#endif #endif |