From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbbHULcN (ORCPT ); Fri, 21 Aug 2015 07:32:13 -0400 Received: from lb3-smtp-cloud6.xs4all.net ([194.109.24.31]:38021 "EHLO lb3-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752554AbbHULcM (ORCPT ); Fri, 21 Aug 2015 07:32:12 -0400 Message-ID: <55D70C10.2050602@xs4all.nl> Date: Fri, 21 Aug 2015 13:31:28 +0200 From: Hans Verkuil User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Ricardo Ribalda Delgado , Mauro Carvalho Chehab , Mike Isely , Laurent Pinchart , Hans Verkuil , Steven Toth , Sakari Ailus , Vincent Palatin , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] Docbook: media: Document changes on struct v4l2_ext_controls References: <1440149386-19783-1-git-send-email-ricardo.ribalda@gmail.com> <1440149386-19783-9-git-send-email-ricardo.ribalda@gmail.com> In-Reply-To: <1440149386-19783-9-git-send-email-ricardo.ribalda@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/21/2015 11:29 AM, Ricardo Ribalda Delgado wrote: > Vidioc-g-ext-ctrls can now be used to get the default value of the > controls. > > Signed-off-by: Ricardo Ribalda Delgado > --- > Documentation/DocBook/media/v4l/v4l2.xml | 9 +++++++++ > Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 14 ++++++++++++++ > 2 files changed, 23 insertions(+) > > diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml > index e98caa1c39bd..be52bd2fb335 100644 > --- a/Documentation/DocBook/media/v4l/v4l2.xml > +++ b/Documentation/DocBook/media/v4l/v4l2.xml > @@ -153,6 +153,15 @@ structs, ioctls) must be noted in more detail in the history chapter > applications. --> > > > + 4.4 > + 2015-08-20 > + rr > + Extend vidioc-g-ext-ctrls;. Replace ctrl_class with a new > +union with ctrl_class and which. Which is used to select the current value of > +the control or the default value. > + > + > + > 3.21 > 2015-02-13 > mcc > diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > index c5bdbfcc42b3..224fa2bd1481 100644 > --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > @@ -216,7 +216,12 @@ Valid if V4L2_CTRL_FLAG_HAS_PAYLOAD is set for this control > > &cs-str; > > + > + union > + (anonymous) > + > > + > __u32 > ctrl_class > The control class to which all controls belong, see > @@ -228,6 +233,15 @@ with a count of 0. If that succeeds, then the driver > supports this feature. All I would say here is that ctrl_class is an alias for 'which', kept for backwards compatibility. Applications should use 'which' instead. > > > + > + __u32 > + which > + Which control are get/set/tried. V4L2_CTRL_WHICH_CUR_VAL I'd say: "Which value of the control to get/set/try." > +will return the current value of the control and V4L2_CTRL_WHICH_DEF_VAL will > +return the default value of the control. Please note that the default value of the control cannot > +be set or tried, only get. I'd rephrase that: "Please note that you can only get the default value of the control, you cannot set or try it." Add this: "For backwards compatibility you can also use a control class here (see . In that case all controls have to belong to that control class. This usage is deprecated, instead just use V4L2_CTRL_WHICH_CUR_VAL. There are some very old drivers that do not yet support V4L2_CTRL_WHICH_CUR_VAL and that require a control class here. You can test for such drivers by setting ctrl_class to V4L2_CTRL_WHICH_CUR_VAL and calling VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the driver does not support V4L2_CTRL_WHICH_CUR_VAL." I think the only driver that still doesn't support this is saa7164. I really need to convert it to the control framework. Regards, Hans > + > + > __u32 > count > The number of controls in the controls array. May >