sound: usb-audio: Digidesign Mbox 2 Duplex mode support Fixed the tab indentation. Removed unnecessary comments. Put IDs in the right order. Removed support for spdif using a device_setup parameter, now only analogue duplex mode is supported.
Subsystems (2)
PATCH 1/1 sound: usb-audio: Digidesign Mbox 2 Duplex mode support Fixed the tab indentation. Removed unnecessary comments. Put IDs in the right order. Removed support for spdif using a device_setup parameter, now only analogue duplex mode is supported.
From: Damien Zammit <[email protected]>
Clemens wrote last year:
Quoted 11 lines
Review
Quoted 8 lines
(quoted diff) +8
-0+mbox2_reboot: + snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), + 0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012, 1000); + + if (bootresponse == MBOX2_BOOT_LOADING) { + snd_printdd("device not ready, resending boot sequence...\n"); + goto mbox2_reboot; + }This could be made a loop. And it could run infinitely long; maybe you should add a timeout. (How long does it usually need?)
I need help to write a loop with a timeout that is RT safe? The device responds before 5 seconds from zero power to bootup.
--- sound/usb/midi.c | 12 ++++ sound/usb/quirks-table.h | 52 +++++++++++++++++++ sound/usb/quirks.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++ sound/usb/quirks.h | 5 ++ sound/usb/usbaudio.h | 1 + 5 files changed, 195 insertions(+), 0 deletions(-)
sound/usb/midi.c +12 -0
@@ -2122,6 +2122,18 @@ 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 : +/* Digidesign Mbox 2 uses MIDIMAN MIDI protocol */ + umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops; +/* +* We have to make sure that the USB core looks +* again at interface 6 by calling usb_set_interface() on it. +*/ +usb_set_interface (umidi->dev,6 ,0 ); +memcpy (&endpoints[0 ], quirk->data, +sizeof (struct snd_usb_midi_endpoint_info )); + err =0 ; +break ;case QUIRK_MIDI_RAW_BYTES : umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;/*
sound/usb/quirks-table.h +52 -0
58 lines not on this page · raw message
sound/usb/quirks.c +125 -0
152 lines not on this page · raw message
sound/usb/quirks.h +5 -0
@@ -20,4 +20,9 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,int snd_usb_is_big_endian_format (struct snd_usb_audio *chip,struct audioformat *fp); +static int mbox2_skip_setting_quirk (struct snd_usb_audio *chip, +int iface,int altno); + +static int snd_usb_mbox2_boot_quirk (struct usb_device *dev); +#endif /* __USBAUDIO_QUIRKS_H */
sound/usb/usbaudio.h +1 -0
@@ -70,6 +70,7 @@ 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,
Signature · 1 line
1.6.3.3