libusbx/libusbx — pull request #163 by JoshBlake (2013-12-10 00:21:43+00:00)
Title: Fix super-speed isoc packet size

This pull request adds handling for super-speed isochronous packet size to libusb_get_max_iso_packet_size. It checks the superspeed endpoint companion descriptor for the recommended packet length, per http://msdn.microsoft.com/en-us/library/windows/hardware/hh406225(v=vs.85).aspx:

> For SuperSpeed isochronous transfer, certain values of USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR (see Usbspec.h) are important. The USB driver stack uses those values to calculate the maximum number of bytes in a bus interval.
[...]
> wBytesPerInterval indicates the total number of bytes that the host can send or receive in a bus interval. Even though the maximum number of bytes per bus interval can be calculated as (bMaxBurst+1) * (Mult+1) * wMaxPacketSize, the USB 3.0 specification recommends using the wBytesPerInterval value instead. The wBytesPerInterval value must be less than or equal to that calculated value.