Open xairy opened 3 weeks ago
Tested proxying with dwc2 on Raspberry Pi 4: the initial enumeration works, but attempting to stream a picture fails with ioctl(USB_RAW_IOCTL_EP_ENABLE): Cannot allocate memory
and dwc2 fe980000.usb: dwc2_hsotg_ep_enable: No suitable fifo found
.
I think this happens due to the hardware limitations (no FIFOs for the used packet size?).
I think failing to proxy the device in this case is fine. However, I filed #24 for a possible improvement.
Hi @xairy
Thanks for the PR! Glad to see ISOC is supported now!
Overall the PR looks good to me, I will find devices to test before merging, thanks again!
You're welcome!
I recommend using a DWC3-based device for testing, if you have one. Raspberry Pi with its dwc2, unfortunately, doesn't work. Other UDCs I haven't tested.
I found this document listing some vendors that are using DWC3, I will try if I can get any of them. In the mean time, May I know the model of the device that you used for testing? thanks!
I use a ThinkPad X1 Carbon 6th Gen laptop, but getting DWC3 enabled there is tricky: https://xairy.io/articles/thinkpad-xdci. I believe that ROCK Pi uses DWC3, but I haven't tried it myself.
With these changes, I'm able to proxy a few Logitech USB web cameras at a low resolution (160x120 pixels) via dwc3.
Proxying with a higher resolution fails to produce a picture on the host: I think because the transfer rate is too low and all the frames get dropped.
I have not tried other UDCs besides dwc3 yet.
Also fixes #13.