From patchwork Fri Jun 12 13:12:20 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: 6598631 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 29E08C0020 for ; Fri, 12 Jun 2015 13:13:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C8442039E for ; Fri, 12 Jun 2015 13:13:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD7D0204A2 for ; Fri, 12 Jun 2015 13:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932135AbbFLNNU (ORCPT ); Fri, 12 Jun 2015 09:13:20 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:36769 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932098AbbFLNNO (ORCPT ); Fri, 12 Jun 2015 09:13:14 -0400 Received: by lbbqq2 with SMTP id qq2so19780892lbb.3 for ; Fri, 12 Jun 2015 06:13:13 -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:in-reply-to:references; bh=7PfX8Zjn8R6U+JPC2QKDUWWOoXbfnbnIyicnNd50E40=; b=dAGKzLzrJQuIn/4AUdxmrqm1jVW/5JuYeYZrQdjt2CdPz8B2jQTP2AgwoyaFnLsVGf V3ukfPTpn0mSDryQkcwC9yJUtidnJZMcPtG3hDLD8peARM7tBdyrzEoBVln/1DB9i/cU ZIaTD7T135xxIT024db3y3K817Rke0n4Y1a7dwu8Qb01/YRyHfqzPywQKEHLvHKdjuJj ceV96su/PzMKYjcRjWU0dkLw+r1FvUJgijMSApF4w74EpYMudlKz6TWALDhpiHna7wiX z9W/ZYslwn5a5KBNbM3+gyjRcfMGvfBJaFzusgiSyrnUtMLgLmM+gZQKp3nvC04+ZcOV bFlg== X-Received: by 10.112.217.2 with SMTP id ou2mr15162703lbc.15.1434114793308; Fri, 12 Jun 2015 06:13:13 -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 3sm830691lak.14.2015.06.12.06.13.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 06:13:12 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Guennadi Liakhovetski , linux-media@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [RFC v2 26/27] Docbook: media: new ioctl VIDIOC_G_DEF_EXT_CTRLS Date: Fri, 12 Jun 2015 15:12:20 +0200 Message-Id: <1434114742-7420-27-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434114742-7420-1-git-send-email-ricardo.ribalda@gmail.com> References: <1434114742-7420-1-git-send-email-ricardo.ribalda@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 --- Documentation/DocBook/media/v4l/v4l2.xml | 8 ++++++++ Documentation/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, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e98caa1c39bd..027cf8408382 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -153,6 +153,14 @@ structs, ioctls) must be noted in more detail in the history chapter applications. --> + 4.2 + 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