aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c32
-rw-r--r--sound/usb/usbmidi.c24
-rw-r--r--sound/usb/usbquirks.h27
3 files changed, 80 insertions, 3 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index b8e0b8fda607..8a8f62515b80 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3312,6 +3312,32 @@ static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
3312} 3312}
3313 3313
3314/* 3314/*
3315 * This call will put the synth in "USB send" mode, i.e it will send MIDI
3316 * messages through USB (this is disabled at startup). The synth will
3317 * acknowledge by sending a sysex on endpoint 0x85 and by displaying a USB
3318 * sign on its LCD. Values here are chosen based on sniffing USB traffic
3319 * under Windows.
3320 */
3321static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
3322{
3323 int err, actual_length;
3324
3325 /* "midi send" enable */
3326 static const u8 seq[] = { 0x4e, 0x73, 0x52, 0x01 };
3327
3328 void *buf = kmemdup(seq, ARRAY_SIZE(seq), GFP_KERNEL);
3329 if (!buf)
3330 return -ENOMEM;
3331 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
3332 ARRAY_SIZE(seq), &actual_length, 1000);
3333 kfree(buf);
3334 if (err < 0)
3335 return err;
3336
3337 return 0;
3338}
3339
3340/*
3315 * Setup quirks 3341 * Setup quirks
3316 */ 3342 */
3317#define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */ 3343#define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */
@@ -3609,6 +3635,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
3609 goto __err_val; 3635 goto __err_val;
3610 } 3636 }
3611 3637
3638 /* Access Music VirusTI Desktop */
3639 if (id == USB_ID(0x133e, 0x0815)) {
3640 if (snd_usb_accessmusic_boot_quirk(dev) < 0)
3641 goto __err_val;
3642 }
3643
3612 /* 3644 /*
3613 * found a config. now register to ALSA 3645 * found a config. now register to ALSA
3614 */ 3646 */
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 6e89b8368d9a..b2da478a0fae 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1162,10 +1162,22 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
1162 pipe = usb_sndintpipe(umidi->dev, ep_info->out_ep); 1162 pipe = usb_sndintpipe(umidi->dev, ep_info->out_ep);
1163 else 1163 else
1164 pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep); 1164 pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep);
1165 if (umidi->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */ 1165 switch (umidi->usb_id) {
1166 ep->max_transfer = 4; 1166 default:
1167 else
1168 ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1); 1167 ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1);
1168 break;
1169 /*
1170 * Various chips declare a packet size larger than 4 bytes, but
1171 * do not actually work with larger packets:
1172 */
1173 case USB_ID(0x0a92, 0x1020): /* ESI M4U */
1174 case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */
1175 case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */
1176 case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */
1177 case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
1178 ep->max_transfer = 4;
1179 break;
1180 }
1169 for (i = 0; i < OUTPUT_URBS; ++i) { 1181 for (i = 0; i < OUTPUT_URBS; ++i) {
1170 buffer = usb_buffer_alloc(umidi->dev, 1182 buffer = usb_buffer_alloc(umidi->dev,
1171 ep->max_transfer, GFP_KERNEL, 1183 ep->max_transfer, GFP_KERNEL,
@@ -1407,6 +1419,12 @@ static struct port_info {
1407 EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"), 1419 EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"),
1408 EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"), 1420 EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"),
1409 EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"), 1421 EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"),
1422 /* Access Music Virus TI */
1423 EXTERNAL_PORT(0x133e, 0x0815, 0, "%s MIDI"),
1424 PORT_INFO(0x133e, 0x0815, 1, "%s Synth", 0,
1425 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
1426 SNDRV_SEQ_PORT_TYPE_HARDWARE |
1427 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER),
1410}; 1428};
1411 1429
1412static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number) 1430static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number)
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
index 65bbd22f2e0c..e691eba6a83e 100644
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -2042,6 +2042,33 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2042 } 2042 }
2043}, 2043},
2044 2044
2045/* Access Music devices */
2046{
2047 /* VirusTI Desktop */
2048 USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2049 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2050 .ifnum = QUIRK_ANY_INTERFACE,
2051 .type = QUIRK_COMPOSITE,
2052 .data = &(const struct snd_usb_audio_quirk[]) {
2053 {
2054 .ifnum = 3,
2055 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2056 .data = &(const struct snd_usb_midi_endpoint_info) {
2057 .out_cables = 0x0003,
2058 .in_cables = 0x0003
2059 }
2060 },
2061 {
2062 .ifnum = 4,
2063 .type = QUIRK_IGNORE_INTERFACE
2064 },
2065 {
2066 .ifnum = -1
2067 }
2068 }
2069 }
2070},
2071
2045/* */ 2072/* */
2046{ 2073{
2047 /* aka. Serato Scratch Live DJ Box */ 2074 /* aka. Serato Scratch Live DJ Box */