From patchwork Tue Jun 16 08:21:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 6614161 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A61DEC0020 for ; Tue, 16 Jun 2015 08:21:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5B28207D0 for ; Tue, 16 Jun 2015 08:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56EA9207CB for ; Tue, 16 Jun 2015 08:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756378AbbFPIVf (ORCPT ); Tue, 16 Jun 2015 04:21:35 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:35821 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756397AbbFPIVb (ORCPT ); Tue, 16 Jun 2015 04:21:31 -0400 Received: by labko7 with SMTP id ko7so5968687lab.2 for ; Tue, 16 Jun 2015 01:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=CzvvnIvASWerC+3qvxfRIlT7EliJBFBzSU+7saL/+5Q=; b=VE8pHj+HL0pvircqx3iO35mw0HAo+2Lp9reoYKA8tODvY5tj5bh+ZOkPwY6xauJtgG pAksut8J9ZnUezZjeD9G0ncX6hFQWZrPkKmIsYRk2JSfvqFm8iyCRcEvU7wFBqFSv0eS d6CZlTx7RMC7++Lnja8Rf5/bmIiHfvrbMdIyUNyn8Mo9wMFLhQqV07IkD7/xv11R5U/T T/RSN8iCHxFIQZPmHFtBUnuHtPctgbQezIueXpkuZp7YFQ0geri884x4Vn6lVFJXIjrM kQMqdJ/VGactq9079x8ZeHAB2RRm3dm//O7FEMLqt4PG0gjUmnP0XfC41nf2xDGcc5sI jv+Q== X-Received: by 10.112.55.70 with SMTP id q6mr4880388lbp.99.1434442890060; Tue, 16 Jun 2015 01:21:30 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by mx.google.com with ESMTPSA id kb5sm69485lbc.16.2015.06.16.01.21.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jun 2015 01:21:29 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , Hans Verkuil , linux-media@vger.kernel.org, Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Guennadi Liakhovetski Cc: Ricardo Ribalda Delgado Subject: [RFC v4 18/19] Docbook: media: new ioctl VIDIOC_G_DEF_EXT_CTRLS Date: Tue, 16 Jun 2015 10:21:27 +0200 Message-Id: <1434442887-22261-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add documentation for new ioctl. Signed-off-by: Ricardo Ribalda Delgado --- v4: -Add Author information -Set kernel version to 4,3 Documentation/DocBook/media/v4l/v4l2.xml | 20 ++++++++++++++++++++ .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 13 +++++++++---- Documentation/video4linux/v4l2-controls.txt | 3 ++- Documentation/video4linux/v4l2-framework.txt | 1 + Documentation/zh_CN/video4linux/v4l2-framework.txt | 1 + 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e98caa1c39bd..4bbc59edd4ac 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -117,6 +117,18 @@ Remote Controller chapter. + + + Ricardo + Ribalda Delgado + Designed and documented the VIDIOC_G_DEF_EXT_CTRLS ioctl + + +
+ ricardo.ribalda@gmail.com +
+
+
@@ -153,6 +165,14 @@ structs, ioctls) must be noted in more detail in the history chapter applications. --> + 4.3 + 2015-06-12 + rr + Extend &vidioc-g-ext-ctrls;. Add ioctl VIDIOC_G_DEF_EXT_CTRLS +to get the default value of multiple controls. + + + 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..5f8283a7e288 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml @@ -1,12 +1,13 @@ ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, -VIDIOC_TRY_EXT_CTRLS +VIDIOC_TRY_EXT_CTRLS, VIDIOC_G_DEF_EXT_CTRLS &manvol; VIDIOC_G_EXT_CTRLS + VIDIOC_G_DEF_EXT_CTRLS VIDIOC_S_EXT_CTRLS VIDIOC_TRY_EXT_CTRLS Get or set the value of several controls, try control @@ -39,7 +40,7 @@ values request VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, -VIDIOC_TRY_EXT_CTRLS +VIDIOC_TRY_EXT_CTRLS, VIDIOC_G_DEF_EXT_CTRLS @@ -74,7 +75,10 @@ of each &v4l2-ext-control; and call the VIDIOC_G_EXT_CTRLS ioctl. String controls controls must also set the string field. Controls of compound types (V4L2_CTRL_FLAG_HAS_PAYLOAD is set) -must set the ptr field. +must set the ptr field. To get the default value +instead of the current value, call the +VIDIOC_G_DEF_EXT_CTRLS ioctl with the same arguments. + If the size is too small to receive the control result (only relevant for pointer-type controls @@ -141,7 +145,8 @@ application. The total size in bytes of the payload of this control. This is normally 0, but for pointer controls this should be set to the size of the memory containing the payload, or that will -receive the payload. If VIDIOC_G_EXT_CTRLS finds +receive the payload. If VIDIOC_G_EXT_CTRLS +or VIDIOC_G_DEF_EXT_CTRLS finds that this value is less than is required to store the payload result, then it is set to a value large enough to store the payload result and ENOSPC is returned. Note that for string controls diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 5517db602f37..7e3dfcacdbee 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt @@ -79,7 +79,8 @@ Basic usage for V4L2 and sub-device drivers Finally, remove all control functions from your v4l2_ioctl_ops (if any): vidioc_queryctrl, vidioc_query_ext_ctrl, vidioc_querymenu, vidioc_g_ctrl, - vidioc_s_ctrl, vidioc_g_ext_ctrls, vidioc_try_ext_ctrls and vidioc_s_ext_ctrls. + vidioc_s_ctrl, vidioc_g_ext_ctrls, vidioc_try_ext_ctrls, + vidioc_g_def_ext_ctrls, and vidioc_s_ext_ctrls. Those are now no longer needed. 1.3.2) For sub-device drivers do this: diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 75d5c18d689a..4672396f48b1 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt @@ -462,6 +462,7 @@ VIDIOC_QUERYMENU VIDIOC_G_CTRL VIDIOC_S_CTRL VIDIOC_G_EXT_CTRLS +VIDIOC_G_DEF_EXT_CTRLS VIDIOC_S_EXT_CTRLS VIDIOC_TRY_EXT_CTRLS diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt index 2b828e631e31..b8c0d6fb6595 100644 --- a/Documentation/zh_CN/video4linux/v4l2-framework.txt +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt @@ -401,6 +401,7 @@ VIDIOC_QUERYMENU VIDIOC_G_CTRL VIDIOC_S_CTRL VIDIOC_G_EXT_CTRLS +VIDIOC_G_DEF_EXT_CTRLS VIDIOC_S_EXT_CTRLS VIDIOC_TRY_EXT_CTRLS