Support for write-only controls
Quoted 22 lines · Martin Rubli
Thanks a lot for all your feedback and the constructive discussion and sorry for the delay while I was without Internet on the weekend. I'll try to summarize what we have so far:
Write-only controls:
It seems, everybody likes EACCES. Michael, maybe we could get some feedback from you on this? It would be nice to change the spec, so that EACCES also becomes the error for writing read-only controls--it seems appropriate. But if for some reason we can't change that we should probably make the write-only controls consistent and return EINVAL as well.
Unusable controls due to device communication error:
The easiest solution seems to be to set the
V4L2_CTRL_FLAG_DISABLEDflag as was suggested. The documentation currently says "permanently disabled and should be ignored by the application" which I think is exactly what applies to the situation. TheV4L2_CTRL_FLAG_NEXT_CTRLwould still be respected by drivers supporting the extended control enumeration, so no need to the spec is required. But I would still add a short paragraph about the first part as a guide for future implementations and a witness of this thread. ;-)
Quoted 2 lines
As soon as everyone agrees on this, I will propose new patches. Let me know what you think ...
Did you ever send out patches on this? I can't seem to find them.
Cheers,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 23 lines · Brandon Philips
Quoted 22 lines · Martin Rubli
Thanks a lot for all your feedback and the constructive discussion and sorry for the delay while I was without Internet on the weekend. I'll try to summarize what we have so far:
Write-only controls:
It seems, everybody likes EACCES. Michael, maybe we could get some feedback from you on this? It would be nice to change the spec, so that EACCES also becomes the error for writing read-only controls--it seems appropriate. But if for some reason we can't change that we should probably make the write-only controls consistent and return EINVAL as well.
Unusable controls due to device communication error:
The easiest solution seems to be to set the
V4L2_CTRL_FLAG_DISABLEDflag as was suggested. The documentation currently says "permanently disabled and should be ignored by the application" which I think is exactly what applies to the situation. TheV4L2_CTRL_FLAG_NEXT_CTRLwould still be respected by drivers supporting the extended control enumeration, so no need to the spec is required. But I would still add a short paragraph about the first part as a guide for future implementations and a witness of this thread. ;-)
Quoted 3 lines
Quoted 2 lines
As soon as everyone agrees on this, I will propose new patches. Let me know what you think ...
Ping. I never saw patches come across for this.
Thanks,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Hi Brandon,
Quoted 14 lines
-----Original Message-----
From: Brandon Philips [mailto:[email protected]]
Sent: Tuesday, April 15, 2008 08:44
To: Martin Rubli; [email protected]; Laurent Pinchart
Cc: Linux and Kernel Video
Subject: Re: [PATCH] Support for write-only controlsQuoted 2 lines · Brandon Philips
Quoted 1 line · Martin Rubli
Thanks a lot for all your feedback and the constructive discussion and
sorry
Quoted 3 lines
Quoted 3 lines
for the delay while I was without Internet on the weekend. I'll try to summarize what we have so far:
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Write-only controls:
It seems, everybody likes EACCES. Michael, maybe we could get some
feedback
Quoted 1 line
Quoted 1 line
from you on this? It would be nice to change the spec, so that EACCES
also
Quoted 1 line
Quoted 1 line
becomes the error for writing read-only controls--it seems
appropriate.
Quoted 8 lines
But
Quoted 6 lines
Quoted 6 lines
if for some reason we can't change that we should probably make the write-only controls consistent and return EINVAL as well.
Unusable controls due to device communication error:
The easiest solution seems to be to set the
V4L2_CTRL_FLAG_DISABLEDflag as
Quoted 9 lines
Quoted 1 line
Quoted 1 line
was suggested. The documentation currently says "permanently disabled
and
Quoted 1 line
Quoted 1 line
should be ignored by the application" which I think is exactly what
applies
Quoted 1 line
Quoted 1 line
to the situation. The
V4L2_CTRL_FLAG_NEXT_CTRLwould still berespected by
Quoted 1 line
Quoted 1 line
drivers supporting the extended control enumeration, so no need to the
spec
Quoted 1 line
Quoted 1 line
is required. But I would still add a short paragraph about the first
part as
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
a guide for future implementations and a witness of this thread. ;-)
As soon as everyone agrees on this, I will propose new patches. Let me
know
Quoted 2 lines
Quoted 1 line
what you think ...
Ping. I never saw patches come across for this.
Attached the patch for videodev2.h and the documentation sources.
Cheers,
Martin
linux/include/linux/videodev2.h +1 -0
@@ -831,6 +831,7 @@#define V4L2_CTRL_FLAG_UPDATE 0x0008#define V4L2_CTRL_FLAG_INACTIVE 0x0010#define V4L2_CTRL_FLAG_SLIDER 0x0020 +#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040/* Query flag, to be ORed with the control ID */ #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
vidioc-queryctrl.sgml +9 -0
@@ -361,6 +361,15 @@ <entry>A hint that this control is best represented as a slider-like element in a user interface.</entry> </row> + <row> + <entry><constant>V4L2_CTRL_FLAG_WRITE_ONLY</constant></entry> + <entry>0x0040</entry> + <entry>This control is permanently writable only. Any +attempt to read the control will result in an EACCES error code. This +flag is typically present for relative controls or action controls where +writing a value will cause the device to carry out a given action +(e. g. motor control) but no meaningful value can be returned.</entry> + </row> </tbody> </tgroup> </table>
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Hi Mauro,
Quoted 11 lines · Mauro Carvalho Chehab
On Mon, 14 Apr 2008 17:44:16 -0700
Quoted 1 line · Brandon Philips
Ping. I never saw patches come across for this.
Brandon, Could you please add this on one of your trees, together with those pending V4L2 API patches for UVC? I want to merge those changes together with the in-kernel driver that firstly requires such changes.
Btw, Laurent, are you ready for uvc inclusion? The window for the next kernel is about to open.
The driver is constantly evolving, but I don't see any showstopper.
How exactly should we proceed ? Should I submit a patch based on git 2.6.25 ? What about future patches ?
Do you have any opinion regarding keeping or closing the linux-uvc-devel mailing list ?
Laurent Pinchart
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 12 lines · On Thu, 17 Apr 2008 00:41:43 +0200 Laurent Pinchart…
Hi Mauro,
Quoted 9 lines · Mauro Carvalho Chehab
On Mon, 14 Apr 2008 17:44:16 -0700
Quoted 1 line · Brandon Philips
Ping. I never saw patches come across for this.
Brandon, Could you please add this on one of your trees, together with those pending V4L2 API patches for UVC? I want to merge those changes together with the in-kernel driver that firstly requires such changes.
Quoted 6 lines
Quoted 2 lines
Btw, Laurent, are you ready for uvc inclusion? The window for the next kernel is about to open.
The driver is constantly evolving, but I don't see any showstopper.
How exactly should we proceed ? Should I submit a patch based on git 2.6.25 ?
The better is to generate against -hg, but against 2.6.25 should also be fine.
Quoted 1 line
What about future patches ?
You may submit to me as they are tested. I prefer if you use hg. Otherwise, please submit via email.
Quoted 2 lines
Do you have any opinion regarding keeping or closing the linux-uvc-devel mailing list ?
It is up to you. There are some drivers already with specific lists, like ivtv and pvrusb2. If you prefer, you may also use the std V4L ML.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
PATCH 1/1 v4l2-spec: write-only controls
In reply to Martin RubliHello Michael-
Please fold this new control flag into the v4l2spec.
Thanks,
Brandon
vidioc-queryctrl.sgml +9 -0
@@ -361,6 +361,15 @@ <entry>A hint that this control is best represented as a slider-like element in a user interface.</entry> </row> + <row> + <entry><constant>V4L2_CTRL_FLAG_WRITE_ONLY</constant></entry> + <entry>0x0040</entry> + <entry>This control is permanently writable only. Any +attempt to read the control will result in an EACCES error code. This +flag is typically present for relative controls or action controls where +writing a value will cause the device to carry out a given action +(e. g. motor control) but no meaningful value can be returned.</entry> + </row> </tbody> </tgroup> </table>
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 3 lines · Mauro Carvalho Chehab
Brandon, Could you please add this on one of your trees, together with those pending V4L2 API patches for UVC? I want to merge those changes together with the in-kernel driver that firstly requires such changes.
I have a tree with the change sets. Please don't pull from the tip
though: hg pull -r 4ca1ed646f89 http://ifup.org/hg/v4l-uvc
The tip of that tree has UVC and all of the Kconfig/Makefile bits too.
The patch set for the tree: http://ifup.org/hg/uvc-v4l-patches
If Laurent wants to add his sign off to that last patch (based on r204) we can commit that too :D
Cheers,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 8 lines · Brandon Philips
Quoted 3 lines · Mauro Carvalho Chehab
Brandon, Could you please add this on one of your trees, together with those pending V4L2 API patches for UVC? I want to merge those changes together with the in-kernel driver that firstly requires such changes.
I have a tree with the change sets. Please don't pull from the tip
though: hg pull -r4ca1ed646f89http://ifup.org/hg/v4l-uvc
Quoted 6 lines
The tip of that tree has UVC and all of the Kconfig/Makefile bits too.
The patch set for the tree: http://ifup.org/hg/uvc-v4l-patches
If Laurent wants to add his sign off to that last patch (based on r204) we can commit that too :D
I want the driver to be properly reviewed on both video4linux-list and linux-usb. I will post a patch on both mailing lists today.
Thanks for taking care of the Kconfig/Makefile bits. Could you send them to me so that I can include them in the patch to be reviewed ?
Cheers,
Laurent Pinchart
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 11 lines · Laurent Pinchart
Quoted 10 lines · Brandon Philips
Quoted 3 lines · Mauro Carvalho Chehab
Brandon, Could you please add this on one of your trees, together with those pending V4L2 API patches for UVC? I want to merge those changes together with the in-kernel driver that firstly requires such changes.
I have a tree with the change sets. Please don't pull from the tip
though: hg pull -r4ca1ed646f89http://ifup.org/hg/v4l-uvcThe tip of that tree has UVC and all of the Kconfig/Makefile bits too.
Quoted 7 lines
Quoted 4 lines
The patch set for the tree: http://ifup.org/hg/uvc-v4l-patches
If Laurent wants to add his sign off to that last patch (based on r204) we can commit that too :D
I want the driver to be properly reviewed on both video4linux-list and linux-usb. I will post a patch on both mailing lists today.
Certainly :D
I put the UVC patch on my tree just to ensure I got all the right bits together ;)
Quoted 2 lines
Thanks for taking care of the Kconfig/Makefile bits. Could you send them to me so that I can include them in the patch to be reviewed ?
linux/drivers/media/video/Kconfig +8 -0
@@ -741,6 +741,14 @@ menuconfig V4L_USB_DRIVERS if V4L_USB_DRIVERS && USB +config USB_UVC + tristate "USB Video Class (UVC)" + ---help--- + Support for the USB Video Class (UVC). Currently only video + input devices, such as webcams, are supported. + + For more information see: <http://linux-uvc.berlios.de/> + source "drivers/media/video/pvrusb2/Kconfig" source "drivers/media/video/em28xx/Kconfig"
linux/drivers/media/video/Makefile +2 -0
@@ -144,6 +144,8 @@ obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o +obj-$(CONFIG_USB_UVC) += uvc/ + obj-$(CONFIG_VIDEO_AU0828) += au0828/ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
linux/drivers/media/video/uvc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +uvcvideo-objs := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o\ + uvc_status.o uvc_isight.o +obj-$(CONFIG_USB_UVC) := uvcvideo.o
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list