Hi David,

Your "rmb()" patch doesn't do any difference here.
I think an interrupt is a memory barrier also, so the "rmb()" had no effect.
Somebody please correct me, if I'm wrong.
The attached patch really makes it here.

please apply!

thanks,
Karsten
ehci: buzz free split iso out

Context is i.e: Audio Playback through an usb1.1 device connected to an
usb2.0 hub connected to an usb2 ehci hc.
Without Hunk 1 ehci sitd's "Buffer Pointer (Page 1)" initialisation is wrong,
which causes a crackle for each 4k page transit.
Hunk 2 corrects the number of uframes needed for the bordercase of (multiples of) 188
bytes sent: without it 2 uframes are used for 188 bytes, though ehci spec says
"use 1 uframe for (up to, including) 188 bytes".
It makes playback crackle-free here for 48khz stereo 16bit.
(sometimes uses usb framesize of 188 = 47*2*2 as the soundcard is a little slower)

signed-of-by: Karsten Wiese <[EMAIL PROTECTED]>


--- linux-2.6.11.2was/drivers/usb/host_ehci/ehci.h	2005-03-09 09:12:44.000000000 +0100
+++ linux-2.6.11.2/drivers/usb/host/ehci.h	2005-03-19 15:41:12.000000000 +0100
@@ -430,7 +430,7 @@
 	__le32			transaction;	/* itd->hw_transaction[i] |= */
 	u8			cross;		/* buf crosses pages */
 	/* for full speed OUT splits */
-	u16			buf1;
+	u32			buf1;
 };
 
 /* temporary schedule data for packets from iso urbs (both speeds)
--- linux-2.6.11.2was/drivers/usb/host_ehci/ehci-sched.c	2005-03-09 09:11:18.000000000 +0100
+++ linux-2.6.11.2/drivers/usb/host/ehci-sched.c	2005-03-19 21:31:36.000000000 +0100
@@ -1508,7 +1508,7 @@
 		/* OUT uses multiple start-splits */ 
 		if (stream->bEndpointAddress & USB_DIR_IN)
 			continue;
-		length = 1 + (length / 188);
+		length = (length + 187) / 188;
 		packet->buf1 |= length;
 		if (length > 1) /* BEGIN vs ALL */
 			packet->buf1 |= 1 << 3;

Reply via email to