git: 9front

Download patch

ref: 85f19e8284ae86b0df88eaef21a056805b91a256
parent: 8e7be62ff78fa3b046e6f0d4781275c9fed69c2f
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);
--