Attached is a preliminary patch for supporting isochronous transfers in redirected host USB devices. The initial goal was supporting USB 1.1 Webcam. Tested on several Webcams. Works on USB 1.1 Webcams, as well as most USB 2.0 Webcams (backward compatibility) on low resolutions. Some jitter is visible in the video stream, and it will be fixed.
Notice USE_ASYNCIO, which defines whether to use signal based async io or polling for receiving urbs. Currently it is disabled, so polling is used, but it does not seem to affect the performance because it uses the non-blocking USBDEVFS_REAPURBNDELAY ioctl. In order to use the signal based async io, a further patch to usb-uhci.c will be posted. The patch includes parts of previous patches posted in Qemu-devel: usb_host_update_interfaces (from qemu-0.9.0-usb-multi-configs.patch), usb_linux_update_endp_table (qemu-usb-host-async.patch) as well as some other lines of code. I am starting to work on the ehci emulation for fully supporting USB 2.0 isochronous devices. Waiting for your comments, Arnon
qemu-usb-isoch.patch
Description: qemu-usb-isoch.patch