V4L2 *STD ioctls with webcam drivers
- From: Laurent Pinchart <laurent.pinchart (at) skynet.be>
- Date: Wed, 1 Mar 2006 17:12:27 +0100
Hi Eduardo,
> I would like to know what the correct implementation of the *STD ioctls
> in V4L2 webcam drivers is.
>
> Either they return -EINVAL or they get implemented like the attached
> patch in the http://linux-uvc.berlios.de/ USB driver or like the
> http://www.saillard.org/linux/pwc/ driver.
>
> I'm asking because different USB webcam drivers implement different code
> and I think a consensus should be reached if we want all the
> applications working properly with different drivers.
Thanks for raising the issue here, I was planning to send a mail myself but
I'm unfortunately a bit busy at the moment.
As I already stated, my understanding is that the V4L2 spec doesn't make those
ioctls mandatory. Returning -EINVAL is the proper way to deal with the *STD
ioctls when they are not supported by the driver.
Applications which handle -EINVAL as a critical failure should be fixed. Some
people adviced me to add a dummy implementation of those ioctls to the
linux-uvc driver to ensure compatibility with broken user-space applications.
I'd rather not go that way, as adding workarounds for user-space bugs in the
kernel will not help to fix the bugs. Application developpers testing against
workaround-enabled drivers will not catch bugs in their software. It would be
much more usefull to fix the broken applications.
I can of course be wrong, and I'm waiting for comments from all V4L2
developers.
Laurent Pinchart
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list