aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/midi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 11:32:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 11:32:05 -0400
commit33081adf8b89d5a716d7e1c60171768d39795b39 (patch)
tree275de58bbbb5f7ddffcdc087844cfc7fbe4315be /sound/usb/midi.c
parentc55960499f810357a29659b32d6ea594abee9237 (diff)
parent506ecbca71d07fa327dd986be1682e90885678ee (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (365 commits) ALSA: hda - Disable sticky PCM stream assignment for AD codecs ALSA: usb - Creative USB X-Fi volume knob support ALSA: ca0106: Use card specific dac id for mute controls. ALSA: ca0106: Allow different sound cards to use different SPI channel mappings. ALSA: ca0106: Create a nice spot for mapping channels to dacs. ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence. ALSA: ca0106: Pull out dac powering routine into separate function. ALSA: ca0106 - add Sound Blaster 5.1vx info. ASoC: tlv320dac33: Use usleep_range for delays ALSA: usb-audio: add Novation Launchpad support ALSA: hda - Add workarounds for CT-IBG controllers ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs ASoC: tpa6130a2: Error handling for broken chip ASoC: max98088: Staticise m98088_eq_band ASoC: soc-core: Fix codec->name memory leak ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066 ALSA: hda - Add some workarounds for Creative IBG ALSA: hda - Fix wrong SPDIF NID assignment for CA0110 ALSA: hda - Fix codec rename rules for ALC662-compatible codecs ALSA: hda - Add alc_init_jacks() call to other codecs ...
Diffstat (limited to 'sound/usb/midi.c')
-rw-r--r--sound/usb/midi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index b9c2bc65f51a..25bce7e5b1af 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -784,7 +784,7 @@ static struct usb_protocol_ops snd_usbmidi_novation_ops = {
784}; 784};
785 785
786/* 786/*
787 * "raw" protocol: used by the MOTU FastLane. 787 * "raw" protocol: just move raw MIDI bytes from/to the endpoint
788 */ 788 */
789 789
790static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep, 790static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
@@ -834,7 +834,14 @@ static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep,
834 834
835 if (!ep->ports[0].active) 835 if (!ep->ports[0].active)
836 return; 836 return;
837 count = snd_usb_get_speed(ep->umidi->dev) == USB_SPEED_HIGH ? 1 : 2; 837 switch (snd_usb_get_speed(ep->umidi->dev)) {
838 case USB_SPEED_HIGH:
839 case USB_SPEED_SUPER:
840 count = 1;
841 break;
842 default:
843 count = 2;
844 }
838 count = snd_rawmidi_transmit(ep->ports[0].substream, 845 count = snd_rawmidi_transmit(ep->ports[0].substream,
839 urb->transfer_buffer, 846 urb->transfer_buffer,
840 count); 847 count);
@@ -2115,7 +2122,7 @@ int snd_usbmidi_create(struct snd_card *card,
2115 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; 2122 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
2116 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2123 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2117 break; 2124 break;
2118 case QUIRK_MIDI_FASTLANE: 2125 case QUIRK_MIDI_RAW_BYTES:
2119 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; 2126 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
2120 /* 2127 /*
2121 * Interface 1 contains isochronous endpoints, but with the same 2128 * Interface 1 contains isochronous endpoints, but with the same
@@ -2126,7 +2133,8 @@ int snd_usbmidi_create(struct snd_card *card,
2126 * interface 0, so we have to make sure that the USB core looks 2133 * interface 0, so we have to make sure that the USB core looks
2127 * again at interface 0 by calling usb_set_interface() on it. 2134 * again at interface 0 by calling usb_set_interface() on it.
2128 */ 2135 */
2129 usb_set_interface(umidi->dev, 0, 0); 2136 if (umidi->usb_id == USB_ID(0x07fd, 0x0001)) /* MOTU Fastlane */
2137 usb_set_interface(umidi->dev, 0, 0);
2130 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2138 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2131 break; 2139 break;
2132 case QUIRK_MIDI_EMAGIC: 2140 case QUIRK_MIDI_EMAGIC: