code: plan9front

Download patch

ref: 6901fbd5e924a3d05c116289092f3be8f1a290d7
parent: c613e336df8eed2b952acf2cb28e865e92e2daf7
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Apr 4 17:45:46 EDT 2024

usbxhci: fix high/super speed iso transfers

full speed assumes 1ms between the frames, but with high
speeds the (micro)frames are 125us between.
Adjust accordingly.

This fixed playback on my usb audio 2.0 headset connected
to Reform's xhci hub port.

--- a/sys/src/9/port/usbxhci.c
+++ b/sys/src/9/port/usbxhci.c
@@ -1115,7 +1115,7 @@
 		io->incr = 0;
 		io->tdsz = ep->maxpkt*ep->ntds;
 	} else {
-		io->incr = ((vlong)ep->hz*ep->pollival<<8)/1000;
+		io->incr = ((vlong)ep->hz*io->period<<8)/8000;
 		io->tdsz = (io->incr+255>>8)*ep->samplesz;
 	}
 	io->b = allocb((io->ring->mask+1)*io->tdsz);