From patchwork Fri May 6 10:53:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9031941 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 6ACBE9F372 for ; Fri, 6 May 2016 10:57:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82DD020389 for ; Fri, 6 May 2016 10:57:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A86820390 for ; Fri, 6 May 2016 10:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758405AbcEFK5P (ORCPT ); Fri, 6 May 2016 06:57:15 -0400 Received: from mga14.intel.com ([192.55.52.115]:19796 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758247AbcEFK4m (ORCPT ); Fri, 6 May 2016 06:56:42 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 06 May 2016 03:56:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,586,1455004800"; d="scan'208";a="800269140" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga003.jf.intel.com with ESMTP; 06 May 2016 03:56:39 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id E70D421273; Fri, 6 May 2016 13:56:36 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 2512520168; Fri, 6 May 2016 13:53:38 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, mchehab@osg.samsung.com Subject: [RFC 21/22] DocBook: media: Document media events (MEDIA_IOC_DQEVENT IOCTL) Date: Fri, 6 May 2016 13:53:30 +0300 Message-Id: <1462532011-15527-22-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462532011-15527-1-git-send-email-sakari.ailus@linux.intel.com> References: <1462532011-15527-1-git-send-email-sakari.ailus@linux.intel.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=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Add DocBook documentation for media events. Signed-off-by: Sakari Ailus --- .../DocBook/media/v4l/media-controller.xml | 1 + .../DocBook/media/v4l/media-ioc-dqevent.xml | 155 +++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 Documentation/DocBook/media/v4l/media-ioc-dqevent.xml diff --git a/Documentation/DocBook/media/v4l/media-controller.xml b/Documentation/DocBook/media/v4l/media-controller.xml index 2a5a5d0..aa78fcb 100644 --- a/Documentation/DocBook/media/v4l/media-controller.xml +++ b/Documentation/DocBook/media/v4l/media-controller.xml @@ -98,6 +98,7 @@ &sub-media-func-ioctl; &sub-media-ioc-device-info; + &sub-media-ioc-dqevent; &sub-media-ioc-g-topology; &sub-media-ioc-enum-entities; &sub-media-ioc-enum-links; diff --git a/Documentation/DocBook/media/v4l/media-ioc-dqevent.xml b/Documentation/DocBook/media/v4l/media-ioc-dqevent.xml new file mode 100644 index 0000000..7d58491 --- /dev/null +++ b/Documentation/DocBook/media/v4l/media-ioc-dqevent.xml @@ -0,0 +1,155 @@ + + + ioctl MEDIA_IOC_DQEVENT + &manvol; + + + + MEDIA_IOC_DQEVENT + Dequeue a media event + + + + + + int ioctl + int fd + int request + struct media_event *argp + + + + + + Arguments + + + + fd + + File descriptor returned by + open(). + + + + request + + MEDIA_IOC_DQEVENT + + + + argp + + + + + + + + + Description + + Dequeue a media event from a media device. Both non-blocking + and blocking access is supported. poll(2) + IOCTL may be used with poll event type + POLLPRI to learn about dequeueable + events. + + Media events are specific to file handle: they are delivered + to and dequeued from each file handle separately. + + + struct <structname>media_event</structname> + + &cs-str; + + + __u32 + type + + Type of the media event. Set by the driver. See + for available media + event types. + + + __u32 + sequence + + Event sequence number. The sequence number is file + handle specific and counts from zero until it wraps around + after reaching 32^2-1. + + + union + + + Anonymous union for event type specific data. + + + + struct &media_event_request_complete; + req_complete + Event data for + MEDIA_EVENT_REQUEST_COMPLETE event. + + + + +
+ + + Media event types + + &cs-def; + + + MEDIA_EVENT_REQUEST_COMPLETE + 1 + A request has been completed. This media event type + has &media-event-request-complete; associated with it. The + event is only queued to the file handle from which the + event was queued. + + + + +
+ + + struct <structname>media_event_request_complete</structname> + + &cs-str; + + + __u32 + id + Request ID. The identifier of the request which has + been completed. + + + __s32 + status + Negative error code of the completed request. See errno(2) + for possible error codes. + + + +
+ +
+ + + &return-value; + + + + ENOENT + + No events are available for dequeueing. This is returned + only when non-blocking I/O is used. + + + + + +