Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182666
b: refs/heads/master
c: d39e82d
h: refs/heads/master
v: v3
  • Loading branch information
Sebastien Alaiwan authored and Jaroslav Kysela committed Feb 16, 2010
1 parent 3986f0a commit 63fd67f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3a3e040f01457d2ea4f199f75ca205401001a3b
refs/heads/master: d39e82db73eb876c60d00f00219d767b3be30307
32 changes: 32 additions & 0 deletions trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3326,6 +3326,32 @@ static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
return err;
}

/*
* This call will put the synth in "USB send" mode, i.e it will send MIDI
* messages through USB (this is disabled at startup). The synth will
* acknowledge by sending a sysex on endpoint 0x85 and by displaying a USB
* sign on its LCD. Values here are chosen based on sniffing USB traffic
* under Windows.
*/
static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
{
int err, actual_length;

/* "midi send" enable */
static const u8 seq[] = { 0x4e, 0x73, 0x52, 0x01 };

void *buf = kmemdup(seq, ARRAY_SIZE(seq), GFP_KERNEL);
if (!buf)
return -ENOMEM;
err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
ARRAY_SIZE(seq), &actual_length, 1000);
kfree(buf);
if (err < 0)
return err;

return 0;
}

/*
* Setup quirks
*/
Expand Down Expand Up @@ -3624,6 +3650,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
goto __err_val;
}

/* Access Music VirusTI Desktop */
if (id == USB_ID(0x133e, 0x0815)) {
if (snd_usb_accessmusic_boot_quirk(dev) < 0)
goto __err_val;
}

/*
* found a config. now register to ALSA
*/
Expand Down
6 changes: 6 additions & 0 deletions trunk/sound/usb/usbmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,12 @@ static struct port_info {
EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"),
EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"),
EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"),
/* Access Music Virus TI */
EXTERNAL_PORT(0x133e, 0x0815, 0, "%s MIDI"),
PORT_INFO(0x133e, 0x0815, 1, "%s Synth", 0,
SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
SNDRV_SEQ_PORT_TYPE_HARDWARE |
SNDRV_SEQ_PORT_TYPE_SYNTHESIZER),
};

static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number)
Expand Down
27 changes: 27 additions & 0 deletions trunk/sound/usb/usbquirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,33 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
},

/* Access Music devices */
{
/* VirusTI Desktop */
USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_COMPOSITE,
.data = &(const struct snd_usb_audio_quirk[]) {
{
.ifnum = 3,
.type = QUIRK_MIDI_FIXED_ENDPOINT,
.data = &(const struct snd_usb_midi_endpoint_info) {
.out_cables = 0x0003,
.in_cables = 0x0003
}
},
{
.ifnum = 4,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = -1
}
}
}
},

/* */
{
/* aka. Serato Scratch Live DJ Box */
Expand Down

0 comments on commit 63fd67f

Please sign in to comment.