From patchwork Thu Oct 29 10:10:32 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: 7517971 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E70E9F37F for ; Thu, 29 Oct 2015 10:11:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 773AD209D8 for ; Thu, 29 Oct 2015 10:11:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7951A2068D for ; Thu, 29 Oct 2015 10:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756802AbbJ2KK4 (ORCPT ); Thu, 29 Oct 2015 06:10:56 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34908 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756108AbbJ2KKq (ORCPT ); Thu, 29 Oct 2015 06:10:46 -0400 Received: by lfu67 with SMTP id 67so1409696lfu.2; Thu, 29 Oct 2015 03:10:44 -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=wjk7hFTsJyPid+NfRzn8tesYoH9cPXsWhx7MUQxwCCY=; b=zugGhy8yZaSe7tHZLmEq7hfo7dFTM+ywliNfeuAEhj27/PkEWy2CI5h/n4RlhGTZeI tKEWi+NBtKMCxBaIfaNEauzWJ1488tpKls2M/WWvGftOTxoanzbjpipOCUbwB/STfAjb OZms6hppUrBbtdph40WWAkMb5Na1NU/CB7wqEkSn9lsnkshNI4M7IGoPyi4FvAuZ4bIW HwH2mZmb+35RyMI74m32RQ8noNYxw1kb2vSjYv9b8EJjo6iqbmREhomvVJ6au/kWIUEA e2zwGceGvyNiQGHyink7qONLCKnBB5yY50bJH8x8rQfAygb57UBmm3hf1S4UypMxRt3j aEIA== X-Received: by 10.25.152.70 with SMTP id a67mr328079lfe.100.1446113444747; Thu, 29 Oct 2015 03:10:44 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id r77sm164022lfr.30.2015.10.29.03.10.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Oct 2015 03:10:43 -0700 (PDT) From: Ricardo Ribalda Delgado To: 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 Cc: Ricardo Ribalda Delgado Subject: [PATCH v2 6/6] Docbook: media: Document changes on struct v4l2_ext_controls Date: Thu, 29 Oct 2015 11:10:32 +0100 Message-Id: <1446113432-27390-7-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1446113432-27390-1-git-send-email-ricardo.ribalda@gmail.com> References: <1446113432-27390-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, 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 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 | 10 ++++++++++ .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 7e61643358de..42e626d6c936 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -152,6 +152,16 @@ structs, ioctls) must be noted in more detail in the history chapter (compat.xml), along with the possible impact on existing drivers and applications. --> + 4.5 + 2015-10-29 + 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. + + + + 4.4 2015-05-26 ap diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index 47f9fee91442..eb82f7e7d06b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml @@ -223,7 +223,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 @@ -235,6 +240,23 @@ with a count of 0. If that succeeds, then the driver supports this feature. + + __u32 + which + Which value of the control to get/set/try. V4L2_CTRL_WHICH_CUR_VAL +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 you can only get the default value of the +control, you cannot set or try it. +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. + + + __u32 count The number of controls in the controls array. May