From patchwork Tue Feb 17 14:41:30 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: 5840211 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 D05FE9F30C for ; Tue, 17 Feb 2015 14:42:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 05710201E4 for ; Tue, 17 Feb 2015 14:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F2D0201D3 for ; Tue, 17 Feb 2015 14:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbbBQOlz (ORCPT ); Tue, 17 Feb 2015 09:41:55 -0500 Received: from mail-lb0-f169.google.com ([209.85.217.169]:44416 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbbBQOlh (ORCPT ); Tue, 17 Feb 2015 09:41:37 -0500 Received: by lbiz12 with SMTP id z12so4781257lbi.11; Tue, 17 Feb 2015 06:41:35 -0800 (PST) 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=pbre5X2+YgtGdpy4p30voxYL8mU1q/zhjcdnRNX0SOM=; b=nUjhWGiR7VW895vcof5TbojlluI4AqgpaRLM8KCiYQgCuihm9q7Ahasqt66H6EOkbi u8BmCSZYbLOVkJjUUmQgW/CPNXVpgB8FKt5ms7gA6SwVdUVXzGrTKxCCi/aPrTJjvedP 6rlIbi0kUC4rHJPKYRKaxjvq6fIsnuGbBlMuXg0oEPUO5QaLP1dW1RzyO1IdL34JNvZW wobmmy/mfwGiIeImwjCNs4rYz+GBADVdZZ6cFRcd9C5JQLRztRdEebmkL3ep4xtxrjSQ 4va2ggZj0PVtcHbjMfJdNm9E3nXBFRB8ZTeK9hU7unVuuEGWY9IkjxH0mBJiYyCQUaIX uv1A== X-Received: by 10.152.178.132 with SMTP id cy4mr29246531lac.10.1424184095444; Tue, 17 Feb 2015 06:41:35 -0800 (PST) Received: from neopili.fritz.box (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by mx.google.com with ESMTPSA id c1sm3600884lah.45.2015.02.17.06.41.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Feb 2015 06:41:34 -0800 (PST) From: Ricardo Ribalda Delgado To: Hans Verkuil , Mauro Carvalho Chehab , Jonathan Corbet , Arun Kumar K , Sylwester Nawrocki , Sakari Ailus , Antti Palosaari , linux-media@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 2/2] media/Documentation: Volatile writable Date: Tue, 17 Feb 2015 15:41:30 +0100 Message-Id: <1424184090-14945-2-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424184090-14945-1-git-send-email-ricardo.ribalda@gmail.com> References: <1424184090-14945-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=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 Volatile variables are also writable now. Update the documentation accordingly. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Hans Verkuil --- Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 7 ++++--- Documentation/DocBook/media/v4l/vidioc-queryctrl.xml | 6 ++++-- Documentation/video4linux/v4l2-controls.txt | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml index b036f89..38d907e 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml @@ -318,9 +318,10 @@ V4L2_EVENT_CTRL_CH_VALUE 0x0001 This control event was triggered because the value of the control - changed. Special case: if a button control is pressed, then this - event is sent as well, even though there is not explicit value - associated with a button control. + changed. Special cases: Volatile controls do no generate this event; + If a button control is pressed, then this event is sent as well, + even though there is not explicit value associated with a button + control. V4L2_EVENT_CTRL_CH_FLAGS diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml index 2bd98fd..6e1e98d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml @@ -599,8 +599,10 @@ writing a value will cause the device to carry out a given action This control is volatile, which means that the value of the control changes continuously. A typical example would be the current gain value if the device is in auto-gain mode. In such a case the hardware calculates the gain value based on -the lighting conditions which can change over time. Note that setting a new value for -a volatile control will have no effect. The new value will just be ignored. +the lighting conditions which can change over time. Another example would be an error +flag (missed trigger, invalid voltage on the sensor). In those situations the user +could write to the control to acknowledge the error, but that write will never +generate a V4L2_EVENT_CTRL_CH_VALUE event. V4L2_CTRL_FLAG_HAS_PAYLOAD diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 0f84ce8..5517db6 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt @@ -344,7 +344,9 @@ implement g_volatile_ctrl like this: } Note that you use the 'new value' union as well in g_volatile_ctrl. In general -controls that need to implement g_volatile_ctrl are read-only controls. +controls that need to implement g_volatile_ctrl are read-only controls. If they +are not, a V4L2_EVENT_CTRL_CH_VALUE will not be generated when the control +changes. To mark a control as volatile you have to set V4L2_CTRL_FLAG_VOLATILE: