From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.irobotique.be ([92.243.18.41]:34244 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241Ab0CaVZi (ORCPT ); Wed, 31 Mar 2010 17:25:38 -0400 From: Laurent Pinchart To: Frank Schaefer Subject: Re: [PATCH v2 1/2] v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls Date: Wed, 31 Mar 2010 18:08:56 +0200 Cc: linux-media@vger.kernel.org References: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> <1268917018-3458-2-git-send-email-laurent.pinchart@ideasonboard.com> <4BA39794.7010208@googlemail.com> In-Reply-To: <4BA39794.7010208@googlemail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003311808.56687.laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org List-ID: Hi Frank, On Friday 19 March 2010 16:26:12 Frank Schaefer wrote: > Laurent Pinchart schrieb: > > Those control, as their names imply, control the camera aperture > > settings. > > > > Signed-off-by: Laurent Pinchart > > --- > > > > Documentation/DocBook/v4l/compat.xml | 11 +++++++++++ > > Documentation/DocBook/v4l/controls.xml | 19 +++++++++++++++++++ > > Documentation/DocBook/v4l/videodev2.h.xml | 3 +++ > > include/linux/videodev2.h | 3 +++ > > 4 files changed, 36 insertions(+), 0 deletions(-) > > > > diff --git a/Documentation/DocBook/v4l/compat.xml > > b/Documentation/DocBook/v4l/compat.xml index b9dbdf9..854235b 100644 > > --- a/Documentation/DocBook/v4l/compat.xml > > +++ b/Documentation/DocBook/v4l/compat.xml > > @@ -2332,6 +2332,17 @@ more information. > > > > > > > > > > > > > > > > +
> > + V4L2 in Linux 2.6.34 > > + > > + > > + Added > > +V4L2_CID_IRIS_ABSOLUTE and > > +V4L2_CID_IRIS_RELATIVE controls to the > > + Camera controls class. > > + > > + > > + > > > >
> > > >
> > > > diff --git a/Documentation/DocBook/v4l/controls.xml > > b/Documentation/DocBook/v4l/controls.xml index f464506..e47999d 100644 > > --- a/Documentation/DocBook/v4l/controls.xml > > +++ b/Documentation/DocBook/v4l/controls.xml > > @@ -1825,6 +1825,25 @@ wide-angle direction. The zoom speed unit is > > driver-specific. > > > > > > > > > > > > + > spanname="id">V4L2_CID_IRIS_ABSOLUTE  > > + integer > > + This control sets the > > +camera's aperture to the specified value. The unit is undefined. > > +Larger values open the iris wider, smaller values close it. > > + > > + > > + > > + > > + > spanname="id">V4L2_CID_IRIS_RELATIVE  > > + integer > > + This control modifies the > > +camera's aperture by the specified amount. The unit is undefined. > > +Positive values open the iris one step further, negative values close > > +it one step further. This is a write-only control. > > + > > + > > + > > + > > > > > spanname="id">V4L2_CID_PRIVACY  > > boolean > > > > Prevent video from being acquired > > > > diff --git a/Documentation/DocBook/v4l/videodev2.h.xml > > b/Documentation/DocBook/v4l/videodev2.h.xml index 0683259..c18dfeb > > 100644 > > --- a/Documentation/DocBook/v4l/videodev2.h.xml > > +++ b/Documentation/DocBook/v4l/videodev2.h.xml > > @@ -1271,6 +1271,9 @@ enum > linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type { > > > > #define V4L2_CID_PRIVACY > > (V4L2_CID_CAMERA_CLASS_BASE+16) > > > > +#define V4L2_CID_IRIS_ABSOLUTE > > (V4L2_CID_CAMERA_CLASS_BASE+17) +#define V4L2_CID_IRIS_RELATIVE > > (V4L2_CID_CAMERA_CLASS_BASE+18) + > > > > /* FM Modulator class control IDs */ > > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | > > 0x900) #define V4L2_CID_FM_TX_CLASS > > (V4L2_CTRL_CLASS_FM_TX | 1) > > > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h > > index 3c26560..c9d2120 100644 > > --- a/include/linux/videodev2.h > > +++ b/include/linux/videodev2.h > > @@ -1277,6 +1277,9 @@ enum v4l2_exposure_auto_type { > > > > #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > > > > +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) > > +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) > > + > > > > /* FM Modulator class control IDs */ > > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) > > #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) > > Please also add proper titles to v4l2_ctrl_get_name() in v4l2-common.c. Very good point. I'll resubmit the patches. -- Regards, Laurent Pinchart From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.irobotique.be ([92.243.18.41]:56471 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753191Ab0CRMyo (ORCPT ); Thu, 18 Mar 2010 08:54:44 -0400 Received: from localhost.localdomain (unknown [192.100.124.156]) by perceval.irobotique.be (Postfix) with ESMTPSA id 8183A35A9B for ; Thu, 18 Mar 2010 12:54:42 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH v2 1/2] v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls Date: Thu, 18 Mar 2010 13:56:57 +0100 Message-Id: <1268917018-3458-2-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org List-ID: Those control, as their names imply, control the camera aperture settings. Signed-off-by: Laurent Pinchart --- Documentation/DocBook/v4l/compat.xml | 11 +++++++++++ Documentation/DocBook/v4l/controls.xml | 19 +++++++++++++++++++ Documentation/DocBook/v4l/videodev2.h.xml | 3 +++ include/linux/videodev2.h | 3 +++ 4 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index b9dbdf9..854235b 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml @@ -2332,6 +2332,17 @@ more information.
+
+ V4L2 in Linux 2.6.34 + + + Added +V4L2_CID_IRIS_ABSOLUTE and +V4L2_CID_IRIS_RELATIVE controls to the + Camera controls class. + + +
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index f464506..e47999d 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -1825,6 +1825,25 @@ wide-angle direction. The zoom speed unit is driver-specific. + V4L2_CID_IRIS_ABSOLUTE  + integer + This control sets the +camera's aperture to the specified value. The unit is undefined. +Larger values open the iris wider, smaller values close it. + + + + + V4L2_CID_IRIS_RELATIVE  + integer + This control modifies the +camera's aperture by the specified amount. The unit is undefined. +Positive values open the iris one step further, negative values close +it one step further. This is a write-only control. + + + + V4L2_CID_PRIVACY  boolean Prevent video from being acquired diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 0683259..c18dfeb 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml @@ -1271,6 +1271,9 @@ enum v4l2_exposure_auto_type { #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 3c26560..c9d2120 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1277,6 +1277,9 @@ enum v4l2_exposure_auto_type { #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) -- 1.6.4.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-fx0-f219.google.com ([209.85.220.219]:37638 "EHLO mail-fx0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758Ab0CSP0E (ORCPT ); Fri, 19 Mar 2010 11:26:04 -0400 Received: by fxm19 with SMTP id 19so706980fxm.21 for ; Fri, 19 Mar 2010 08:26:03 -0700 (PDT) Message-ID: <4BA39794.7010208@googlemail.com> Date: Fri, 19 Mar 2010 16:26:12 +0100 From: Frank Schaefer MIME-Version: 1.0 To: Laurent Pinchart CC: linux-media@vger.kernel.org Subject: Re: [PATCH v2 1/2] v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls References: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> <1268917018-3458-2-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1268917018-3458-2-git-send-email-laurent.pinchart@ideasonboard.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Laurent Pinchart schrieb: > Those control, as their names imply, control the camera aperture > settings. > > Signed-off-by: Laurent Pinchart > --- > Documentation/DocBook/v4l/compat.xml | 11 +++++++++++ > Documentation/DocBook/v4l/controls.xml | 19 +++++++++++++++++++ > Documentation/DocBook/v4l/videodev2.h.xml | 3 +++ > include/linux/videodev2.h | 3 +++ > 4 files changed, 36 insertions(+), 0 deletions(-) > > diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml > index b9dbdf9..854235b 100644 > --- a/Documentation/DocBook/v4l/compat.xml > +++ b/Documentation/DocBook/v4l/compat.xml > @@ -2332,6 +2332,17 @@ more information. > > >
> +
> + V4L2 in Linux 2.6.34 > + > + > + Added > +V4L2_CID_IRIS_ABSOLUTE and > +V4L2_CID_IRIS_RELATIVE controls to the > + Camera controls class. > + > + > + >
> >
> diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml > index f464506..e47999d 100644 > --- a/Documentation/DocBook/v4l/controls.xml > +++ b/Documentation/DocBook/v4l/controls.xml > @@ -1825,6 +1825,25 @@ wide-angle direction. The zoom speed unit is driver-specific. > > > > + V4L2_CID_IRIS_ABSOLUTE  > + integer > + This control sets the > +camera's aperture to the specified value. The unit is undefined. > +Larger values open the iris wider, smaller values close it. > + > + > + > + > + V4L2_CID_IRIS_RELATIVE  > + integer > + This control modifies the > +camera's aperture by the specified amount. The unit is undefined. > +Positive values open the iris one step further, negative values close > +it one step further. This is a write-only control. > + > + > + > + > V4L2_CID_PRIVACY  > boolean > Prevent video from being acquired > diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml > index 0683259..c18dfeb 100644 > --- a/Documentation/DocBook/v4l/videodev2.h.xml > +++ b/Documentation/DocBook/v4l/videodev2.h.xml > @@ -1271,6 +1271,9 @@ enum v4l2_exposure_auto_type { > > #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > > +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) > +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) > + > /* FM Modulator class control IDs */ > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) > #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h > index 3c26560..c9d2120 100644 > --- a/include/linux/videodev2.h > +++ b/include/linux/videodev2.h > @@ -1277,6 +1277,9 @@ enum v4l2_exposure_auto_type { > > #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > > +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) > +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) > + > /* FM Modulator class control IDs */ > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) > #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) > Please also add proper titles to v4l2_ctrl_get_name() in v4l2-common.c. Thanks, Frank From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.irobotique.be ([92.243.18.41]:56472 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218Ab0CRMyp (ORCPT ); Thu, 18 Mar 2010 08:54:45 -0400 Received: from localhost.localdomain (unknown [192.100.124.156]) by perceval.irobotique.be (Postfix) with ESMTPSA id 1874D35AC4 for ; Thu, 18 Mar 2010 12:54:42 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH v2 2/2] uvcvideo: Support iris absolute and relative controls Date: Thu, 18 Mar 2010 13:56:58 +0100 Message-Id: <1268917018-3458-3-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org List-ID: Signed-off-by: Laurent Pinchart --- drivers/media/video/uvc/uvc_ctrl.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 3b2e780..3697d72 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -561,6 +561,26 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, }, { + .id = V4L2_CID_IRIS_ABSOLUTE, + .name = "Iris, Absolute", + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_IRIS_ABSOLUTE_CONTROL, + .size = 16, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED, + }, + { + .id = V4L2_CID_IRIS_RELATIVE, + .name = "Iris, Relative", + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_IRIS_RELATIVE_CONTROL, + .size = 8, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + }, + { .id = V4L2_CID_ZOOM_ABSOLUTE, .name = "Zoom, Absolute", .entity = UVC_GUID_UVC_CAMERA, -- 1.6.4.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.irobotique.be ([92.243.18.41]:56470 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190Ab0CRMyo (ORCPT ); Thu, 18 Mar 2010 08:54:44 -0400 Received: from localhost.localdomain (unknown [192.100.124.156]) by perceval.irobotique.be (Postfix) with ESMTPSA id 05324359F2 for ; Thu, 18 Mar 2010 12:54:41 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH v2 0/2] Add iris absolute and relative control CIDs Date: Thu, 18 Mar 2010 13:56:56 +0100 Message-Id: <1268917018-3458-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org List-ID: Hi everybody, Here's a second version of the iris control patch set that incorporates comments from Sergio and Mauro (I modified the documentation to make the relationship between control values and iris opening clearer). I can send a pull request for those patches after review. Laurent Pinchart (2): v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls uvcvideo: Support iris absolute and relative controls Documentation/DocBook/v4l/compat.xml | 11 +++++++++++ Documentation/DocBook/v4l/controls.xml | 19 +++++++++++++++++++ Documentation/DocBook/v4l/videodev2.h.xml | 3 +++ drivers/media/video/uvc/uvc_ctrl.c | 20 ++++++++++++++++++++ include/linux/videodev2.h | 3 +++ 5 files changed, 56 insertions(+), 0 deletions(-) -- Regards, Laurent Pinchart