-
Notifications
You must be signed in to change notification settings - Fork 7.7k
uvc: improve standard compliance and MacOS compat #92320
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
base: main
Are you sure you want to change the base?
uvc: improve standard compliance and MacOS compat #92320
Conversation
Force-push:
I could check that it fixes a bug, but another one appears after it. |
Force-push:
Mac OSX should now work however some extra changes are required to get most applications work out of the box: |
429c057
to
ba50197
Compare
Force-push:
|
Some OSes like MacOS use shorter UVC 1.1 probe/commit messages even when UVC 1.5 is supported, without bUsage, bBitDepthLuma, bmSettings, bMaxNumberOfRefFramesPlus1, bmRateControlModes bmLayoutPerStream. Accept messages of arbitrary size to safely be processed, ignoring all missing fields, improving standard compliance. Signed-off-by: Josuah Demangeon <me@josuah.net>
In some cases, setup->wLength is shorter than the allocated buffer size. This lead to responses larger than what the host requested, which it rejected. Fix it by using the minimum between the allocated size, the struct size, and the wLength requested. Signed-off-by: Josuah Demangeon <me@josuah.net>
Force-push:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "some cases" for wLength are generally related to alignment and granularity requirements.
That also improve standard compliance:
cc @kartben who was interested in testing on this platform