]> err.no Git - linux-2.6/commitdiff
[ALSA] Repair snd-usb-usx2y over OHCI
authorKarsten Wiese <fzu@wemgehoertderstaat.de>
Wed, 10 Jan 2007 18:02:26 +0000 (19:02 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 23 Jan 2007 08:23:36 +0000 (09:23 +0100)
The previous patch 'Repair snd-usb-usx2y for usb 2.6.18' assumed
urb->start_frame roll over beyond MAX_INT for both UHCI & OHCI.
This isn't true until now (kernel 2.6.20).
Fix this by only looking at the common between OHCI & UHCI Frame number
range.
This is for mainline and stable kernels >= 2.6.18.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/usb/usx2y/usbusx2yaudio.c
sound/usb/usx2y/usx2yhwdeppcm.c

index 367f8a32a6657ed66324b69280b760d47d90c288..0a352e46862f37abbdc1b94c2475f8d185e99d63 100644 (file)
@@ -322,7 +322,7 @@ static void i_usX2Y_urb_complete(struct urb *urb)
                usX2Y_error_urb_status(usX2Y, subs, urb);
                return;
        }
-       if (likely(urb->start_frame == usX2Y->wait_iso_frame))
+       if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
                subs->completed_urb = urb;
        else {
                usX2Y_error_sequence(usX2Y, subs, urb);
index 8f3e35e24e72ce5b46771609c2c1dfe694d5c841..a5e7bcd7ca2ec0c5b486ba0b56c5f8e8f9d41a75 100644 (file)
@@ -243,7 +243,7 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb)
                usX2Y_error_urb_status(usX2Y, subs, urb);
                return;
        }
-       if (likely(urb->start_frame == usX2Y->wait_iso_frame))
+       if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
                subs->completed_urb = urb;
        else {
                usX2Y_error_sequence(usX2Y, subs, urb);