From patchwork Tue Jun 28 11:26:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 924262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5SBSefn003532 for ; Tue, 28 Jun 2011 11:29:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755503Ab1F1L1z (ORCPT ); Tue, 28 Jun 2011 07:27:55 -0400 Received: from smtp-vbr10.xs4all.nl ([194.109.24.30]:2228 "EHLO smtp-vbr10.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757318Ab1F1L0T (ORCPT ); Tue, 28 Jun 2011 07:26:19 -0400 Received: from tschai (64-103-25-233.cisco.com [64.103.25.233]) (authenticated bits=0) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id p5SBQ9k9032542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jun 2011 13:26:17 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [RFCv2 PATCH 11/13] DocBook: update V4L Event Interface section. Date: Tue, 28 Jun 2011 13:26:03 +0200 Message-Id: <747e03f1172c52f7507731c9ddb0434ed332e5c9.1309260043.git.hans.verkuil@cisco.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1309260365-4831-1-git-send-email-hverkuil@xs4all.nl> References: <1309260365-4831-1-git-send-email-hverkuil@xs4all.nl> In-Reply-To: <3d92b242dcf5e7766d128d6c1f05c0bd837a2633.1309260043.git.hans.verkuil@cisco.com> References: <3d92b242dcf5e7766d128d6c1f05c0bd837a2633.1309260043.git.hans.verkuil@cisco.com> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 28 Jun 2011 11:29:22 +0000 (UTC) From: Hans Verkuil Starting with v3.1 the V4L2 API provides certain guarantees with respect to events. Document these. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/dev-event.xml | 30 ++++++++++++++++--- .../DocBook/media/v4l/vidioc-subscribe-event.xml | 15 +++++++-- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Documentation/DocBook/media/v4l/dev-event.xml b/Documentation/DocBook/media/v4l/dev-event.xml index be5a98f..f14ae3f 100644 --- a/Documentation/DocBook/media/v4l/dev-event.xml +++ b/Documentation/DocBook/media/v4l/dev-event.xml @@ -1,9 +1,10 @@ Event Interface - The V4L2 event interface provides means for user to get + The V4L2 event interface provides a means for a user to get immediately notified on certain conditions taking place on a device. This might include start of frame or loss of signal events, for - example. + example. Changes in the value or state of a V4L2 control can also be + reported through events. To receive events, the events the user is interested in first must @@ -15,12 +16,31 @@ The event subscriptions and event queues are specific to file handles. Subscribing an event on one file handle does not affect - other file handles. - + other file handles. The information on dequeueable events is obtained by using select or poll system calls on video devices. The V4L2 events use POLLPRI events on - poll system call and exceptions on select system call. + poll system call and exceptions on select system call. + + Starting with kernel 3.1 certain guarantees can be given with + regards to events: + + Each subscribed event has its own internal dedicated event queue. +This means that flooding of one event type will not interfere with other +event types. + + + If the internal event queue for a particular subscribed event +becomes full, then the oldest event in that queue will be dropped. + + + Where applicable, certain event types can ensure that the payload +of the oldest event that is about to be dropped will be merged with the payload +of the next oldest event. Thus ensuring that no information is lost, but only an +intermediate step leading up to that information. See the documentation for the +event you want to subscribe to whether this is applicable for that event or not. + +