top | item 35747415

(no title)

ranma42 | 2 years ago

> Now you might ask, why does the webcam have an endpoint with a 0 byte MaxPacketSize on its first interface? Who knows!

This one has a simple answer:

USB is a shared bus and limited in bandwidth. Isochronous endpoints transmit continously and thus require a fixed part of that bandwidth.

The OS has to allocate the available bus bandwidth to all plugged in devices.

If no more bandwidth is available, it will refuse to configure the device that you just plugged in!

Thus the alternate setting with the isochronous packet size set to 0 serves multiple purposes:

1) It lets the OS configure the device and let the driver discover it even when not enough free bandwith is available on the bus

2) The driver can release the unused bandwith while the device is not in use

3) Not sending iso packets while the device is not actively used also means less power draw

discuss

order

No comments yet.