Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348411
b: refs/heads/master
c: b7b435e
h: refs/heads/master
i:
  348409: 5a7a48a
  348407: 7660b3e
v: v3
  • Loading branch information
Damien Zammit authored and Takashi Iwai committed Jan 4, 2013
1 parent e72ef9b commit e87b679
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f7f3ab15e0873a9b04d5a38ef1d33831aaf609d
refs/heads/master: b7b435e81b7228af68b5d3bef277fce10100b369
4 changes: 0 additions & 4 deletions trunk/sound/usb/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2181,10 +2181,6 @@ int snd_usbmidi_create(struct snd_card *card,
umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_MBOX2:
umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_RAW_BYTES:
umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/usb/quirks-table.h
Original file line number Diff line number Diff line change
Expand Up @@ -3015,7 +3015,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
},
{
.ifnum = 6,
.type = QUIRK_MIDI_MBOX2,
.type = QUIRK_MIDI_MIDIMAN,
.data = &(const struct snd_usb_midi_endpoint_info) {
.out_ep = 0x02,
.out_cables = 0x0001,
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/usb/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
[QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
[QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
[QUIRK_MIDI_MBOX2] = create_any_midi_quirk,
[QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk,
[QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
[QUIRK_MIDI_CME] = create_any_midi_quirk,
Expand Down Expand Up @@ -528,11 +527,11 @@ static void mbox2_setup_48_24_magic(struct usb_device *dev)
#define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */
#define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */

int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
static int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
{
struct usb_host_config *config = dev->actconfig;
int err;
u8 bootresponse;
u8 bootresponse[12];
int fwsize;
int count;

Expand All @@ -546,20 +545,20 @@ int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
snd_printd("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n");

count = 0;
bootresponse = MBOX2_BOOT_LOADING;
while ((bootresponse == MBOX2_BOOT_LOADING) && (count < 10)) {
bootresponse[0] = MBOX2_BOOT_LOADING;
while ((bootresponse[0] == MBOX2_BOOT_LOADING) && (count < 10)) {
msleep(500); /* 0.5 second delay */
snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0),
/* Control magic - load onboard firmware */
0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012);
if (bootresponse == MBOX2_BOOT_READY)
if (bootresponse[0] == MBOX2_BOOT_READY)
break;
snd_printd("usb-audio: device not ready, resending boot sequence...\n");
count++;
}

if (bootresponse != MBOX2_BOOT_READY) {
snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse);
if (bootresponse[0] != MBOX2_BOOT_READY) {
snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]);
return -ENODEV;
}

Expand Down Expand Up @@ -660,7 +659,6 @@ static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,
return 0; /* keep this altsetting */
}


static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/usb/usbaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ enum quirk_type {
QUIRK_MIDI_YAMAHA,
QUIRK_MIDI_MIDIMAN,
QUIRK_MIDI_NOVATION,
QUIRK_MIDI_MBOX2,
QUIRK_MIDI_RAW_BYTES,
QUIRK_MIDI_EMAGIC,
QUIRK_MIDI_CME,
Expand Down

0 comments on commit e87b679

Please sign in to comment.