Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6a712aeb17ff30206ae1bc827d50497d884602a
Commit:     a6a712aeb17ff30206ae1bc827d50497d884602a
Parent:     d53d7d9e5e6bce747e8b8b2f825db1b32d8f6647
Author:     Clemens Ladisch <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 08:56:08 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:18 2007 +0200

    [ALSA] usb-audio: allow output interrupt transfers for MIDI
    
    Allow output interrupt transfers for some MIDI devices that require
    them.
    
    Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/usb/usbmidi.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 2bb1834..4bacb50 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -983,8 +983,10 @@ static int snd_usbmidi_out_endpoint_create(struct 
snd_usb_midi* umidi,
                snd_usbmidi_out_endpoint_delete(ep);
                return -ENOMEM;
        }
-       /* we never use interrupt output pipes */
-       pipe = usb_sndbulkpipe(umidi->chip->dev, ep_info->out_ep);
+       if (ep_info->out_interval)
+               pipe = usb_sndintpipe(umidi->chip->dev, ep_info->out_ep);
+       else
+               pipe = usb_sndbulkpipe(umidi->chip->dev, ep_info->out_ep);
        if (umidi->chip->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */
                /* FIXME: we need more URBs to get reasonable bandwidth here: */
                ep->max_transfer = 4;
@@ -996,8 +998,14 @@ static int snd_usbmidi_out_endpoint_create(struct 
snd_usb_midi* umidi,
                snd_usbmidi_out_endpoint_delete(ep);
                return -ENOMEM;
        }
-       usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer,
-                         ep->max_transfer, snd_usbmidi_out_urb_complete, ep);
+       if (ep_info->out_interval)
+               usb_fill_int_urb(ep->urb, umidi->chip->dev, pipe, buffer,
+                                ep->max_transfer, snd_usbmidi_out_urb_complete,
+                                ep, ep_info->out_interval);
+       else
+               usb_fill_bulk_urb(ep->urb, umidi->chip->dev,
+                                 pipe, buffer, ep->max_transfer,
+                                 snd_usbmidi_out_urb_complete, ep);
        ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
 
        spin_lock_init(&ep->buffer_lock);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to