files: 0.558 graphic: 0.531 device: 0.492 performance: 0.468 socket: 0.377 architecture: 0.342 network: 0.328 ppc: 0.313 arm: 0.302 PID: 0.286 vnc: 0.275 kernel: 0.275 hypervisor: 0.274 peripherals: 0.267 VMM: 0.261 permissions: 0.239 TCG: 0.227 mistranslation: 0.225 semantic: 0.224 x86: 0.222 risc-v: 0.217 user-level: 0.210 boot: 0.203 debug: 0.169 register: 0.168 assembly: 0.136 i386: 0.118 KVM: 0.116 virtual: 0.098 Enhanced SuperSpeed Isochronous Endpoints with high-bandwidth pipes not working (Webcams and Microphones) Description of problem: I have encountered an issue with QEMU when forwarding HD webcams and microphones in SuperSpeed mode. When passing the USB webcam "Logitech BRIO Ultra HD Webcam" to the guest using USB HighSpeed mode, all pixel formats and video modes work as expected. However, when using SuperSpeed mode, only the MJPEG format operates at low resolutions. I have attached a [USB_Webcam_Testing_Truth_Table.pdf](/uploads/309d493989da1164198af0b315012fb1/USB_Webcam_Testing_Truth_Table.pdf) that displays the functioning modes. This issue arises with both qemu-xhci and nec-usb-xhci xHCI implementations, as well as with usb-host and usb-redir. Upon tracing and comparing the USB packets from the host and guest systems, I discovered an issue with the isochronous endpoint configurations supporting "high bandwidth" pipes (e.g., SS Companion Descriptor with bMaxBurst > 0). I created three pcap files to illustrate the problem: 1. [host-libusb.pcapng](/uploads/18a66948dc6dc10ff68b7f55d70fa209/host-libusb.pcapng) 2. [qemu-guest.pcapng](/uploads/b616507f2f7c1c042a9d085dc3af579f/qemu-guest.pcapng) 3. [host-native.pcapng](/uploads/279aa7f264a75a77203fa7bf6c5afc83/host-native.pcapng) To generate each capture, I executed the following command: ```console timeout --preserve-status 3s ffplay -f v4l2 -i "/dev/video0" -input_format mjpeg -framerate 30 -video_size 1920x1060 ``` The "SET INTERFACE" packet reveals that the USB video driver selects bAlternateSetting=7, which has the following parameters: ``` wMaxPacketSize: 1024 bMaxBurst: 2 bmAttributes: 0x01 .... ..01 = Mult: 1 ``` According to Section 4.14.2.1.3 of the xHCI specification, the size of an isoch transfer should be `Packet Size * (Max Burst Size + 1) * (Mult + 1) = 6144`. However, the host-libusb.pcapng capture shows that each transfer is only 1024 bytes in size. For higher bitrate formats, it is observed that the system generates erroneous transfers in which the data offset in the isodescriptor exceeds the packet size. Currently, I am unsure of the cause of this issue. If you need any additional information, logs, or specific USB packet captures, I would be more than happy to provide them. Thanks Additional information: [lsusb-cam-SuperSpeed.txt](/uploads/712ac9e67d0b53ce46573bee3df883d0/lsusb-cam-SuperSpeed.txt) [lsusb-cam-HighSpeed.txt](/uploads/70f855e471714fb1b48a7ed7912c0be4/lsusb-cam-HighSpeed.txt)