Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support isochronous transfers in Dummy HCD/UDC #72

Open
xairy opened this issue Jun 16, 2024 · 3 comments
Open

Support isochronous transfers in Dummy HCD/UDC #72

xairy opened this issue Jun 16, 2024 · 3 comments
Labels
gadget subsystem Requires changes in USB Gadget subsystem kernel Requires kernel changes

Comments

@xairy
Copy link
Owner

xairy commented Jun 16, 2024

This is not an issue in Raw Gadget, but it is related to its testing and usage.

The Dummy HCD/UDC does not support isochronous transfers. As a result, it's impossible to use it for connecting devices that require them, such as audio/video devices.

There was a patch for adding partial support for this, but it was rejected, as the support did not emulate the real hardware behavior; see the discussion on the patch for details.

@xairy xairy added kernel Requires kernel changes gadget subsystem Requires changes in USB Gadget subsystem labels Jun 16, 2024
@xairy
Copy link
Owner Author

xairy commented Jun 19, 2024

Alan posted a testing-grade patch from pre-2008 era for this.

@GPlays09
Copy link

GPlays09 commented Jul 9, 2024

since this isn't supported yet, is there a way to check if there is any data waiting to be read at a specific endpoint and how much there is?

@xairy
Copy link
Owner Author

xairy commented Jul 9, 2024

I think you can do this via usb_ep_fifo_status, but it's not exposed in Raw Gadget (#12). Also the Dummy UDC does not appear to implement the fifo_status handler, so usb_ep_fifo_status won't work with it as is: you would need to add support for fifo_status to the Dummy UDC first. But even if you do, you still cannot use it for isochronous transfers before those are implemented.

But in case your question is not related to isochronous transfers and your goal is just to deal with Raw Gadget blocking on I/O, what you can do is create a thread for handling I/O on an endpoint and send any signal to that thread (via e.g. pthread_kill) to interrupt the I/O ioctl when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gadget subsystem Requires changes in USB Gadget subsystem kernel Requires kernel changes
Projects
None yet
Development

No branches or pull requests

2 participants