From c18c7e7a02d6d922dc937913560caedc2159bbcd Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 16 Feb 2009 15:22:39 +0100 Subject: sound: usb-audio: fix uninitialized variable with M-Audio MIDI interfaces commit e156ac4c571e3be741bc411e58820b74a9295c72 upstream. Fix the snd_usbmidi_create_endpoints_midiman() function, which forgot to set the out_interval member of the endpoint info structure for Midiman/ M-Audio devices. Since kernel 2.6.24, any non-zero value makes the driver use interrupt transfers instead of bulk transfers. With EHCI controllers, these random interval values result in unbearably large latencies for output MIDI transfers. Signed-off-by: Clemens Ladisch Reported-by: David Tested-by: David Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/usbmidi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 6676a177c99e..940ae5a2258f 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -1583,6 +1583,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi, } ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + ep_info.out_interval = 0; ep_info.out_cables = endpoint->out_cables & 0x5555; err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); if (err < 0) -- cgit v1.2.3