summaryrefslogtreecommitdiffstats
path: root/drivers/staging/line6/driver.c
diff options
context:
space:
mode:
authorStefan Hajnoczi2011-11-23 09:20:42 +0100
committerGreg Kroah-Hartman2011-11-27 01:14:11 +0100
commit16dc10401133d16d13a5eea7da2a71d2080e32a1 (patch)
tree0127cfdaed191fd806a9a6528adae837274bd250 /drivers/staging/line6/driver.c
parentline6: fix memory leaks in line6_init_midi() (diff)
downloadkernel-qcow2-linux-16dc10401133d16d13a5eea7da2a71d2080e32a1.tar.gz
kernel-qcow2-linux-16dc10401133d16d13a5eea7da2a71d2080e32a1.tar.xz
kernel-qcow2-linux-16dc10401133d16d13a5eea7da2a71d2080e32a1.zip
staging: line6: add Pod HD300 support
The Pod HD device family uses new MIDI SysEx messages and therefore cannot reuse the existing Pod code. Instead of hardcoding Pod HD MIDI messages into the driver, leave MIDI up to userspace. This driver simply presents MIDI and pcm ALSA devices. This device is similar to the Pod except that it has 48 kHz audio and does not respond to Pod SysEx messages. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6/driver.c')
-rw-r--r--drivers/staging/line6/driver.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index 851b762319cf..a71a5af7f8e3 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -21,6 +21,7 @@
#include "midi.h"
#include "playback.h"
#include "pod.h"
+#include "podhd.h"
#include "revision.h"
#include "toneport.h"
#include "usbdefs.h"
@@ -49,6 +50,7 @@ static const struct usb_device_id line6_id_table[] = {
{USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_TONEPORT_UX1)},
{USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_TONEPORT_UX2)},
{USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_VARIAX)},
+ {USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_PODHD300)},
{},
};
@@ -72,7 +74,8 @@ static struct line6_properties line6_properties_table[] = {
{ "TonePortGX", "TonePort GX", LINE6_BIT_TONEPORT_GX, LINE6_BIT_PCM },
{ "TonePortUX1", "TonePort UX1", LINE6_BIT_TONEPORT_UX1, LINE6_BIT_PCM },
{ "TonePortUX2", "TonePort UX2", LINE6_BIT_TONEPORT_UX2, LINE6_BIT_PCM },
- { "Variax", "Variax Workbench", LINE6_BIT_VARIAX, LINE6_BIT_CONTROL }
+ { "Variax", "Variax Workbench", LINE6_BIT_VARIAX, LINE6_BIT_CONTROL },
+ { "PODHD300", "POD HD300", LINE6_BIT_PODHD300, LINE6_BIT_CONTROL_PCM_HWMON },
};
/* *INDENT-ON* */
@@ -437,6 +440,9 @@ static void line6_data_received(struct urb *urb)
line6);
break;
+ case LINE6_DEVID_PODHD300:
+ break; /* let userspace handle MIDI */
+
case LINE6_DEVID_PODXTLIVE:
switch (line6->interface_number) {
case PODXTLIVE_INTERFACE_POD:
@@ -812,6 +818,7 @@ static int line6_probe(struct usb_interface *interface,
case LINE6_DEVID_BASSPODXTPRO:
case LINE6_DEVID_PODXT:
case LINE6_DEVID_PODXTPRO:
+ case LINE6_DEVID_PODHD300:
alternate = 5;
break;
@@ -865,6 +872,12 @@ static int line6_probe(struct usb_interface *interface,
ep_write = 0x03;
break;
+ case LINE6_DEVID_PODHD300:
+ size = sizeof(struct usb_line6_podhd);
+ ep_read = 0x84;
+ ep_write = 0x03;
+ break;
+
case LINE6_DEVID_POCKETPOD:
size = sizeof(struct usb_line6_pod);
ep_read = 0x82;
@@ -1017,6 +1030,11 @@ static int line6_probe(struct usb_interface *interface,
ret = line6_pod_init(interface, (struct usb_line6_pod *)line6);
break;
+ case LINE6_DEVID_PODHD300:
+ ret = line6_podhd_init(interface,
+ (struct usb_line6_podhd *)line6);
+ break;
+
case LINE6_DEVID_PODXTLIVE:
switch (interface_number) {
case PODXTLIVE_INTERFACE_POD:
@@ -1139,6 +1157,10 @@ static void line6_disconnect(struct usb_interface *interface)
line6_pod_disconnect(interface);
break;
+ case LINE6_DEVID_PODHD300:
+ line6_podhd_disconnect(interface);
+ break;
+
case LINE6_DEVID_PODXTLIVE:
switch (interface_number) {
case PODXTLIVE_INTERFACE_POD: