From patchwork Thu Jul 2 13:27:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 6709761 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 E72FF9F54C for ; Thu, 2 Jul 2015 13:29:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D45E1206B8 for ; Thu, 2 Jul 2015 13:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A188206F2 for ; Thu, 2 Jul 2015 13:29:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753248AbbGBN3Q (ORCPT ); Thu, 2 Jul 2015 09:29:16 -0400 Received: from lb3-smtp-cloud6.xs4all.net ([194.109.24.31]:51082 "EHLO lb3-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbbGBN3M (ORCPT ); Thu, 2 Jul 2015 09:29:12 -0400 Received: from tschai.lan ([80.203.20.209]) by smtp-cloud6.xs4all.net with ESMTP id nRV61q00B4Wfp8Y01RVBnN; Thu, 02 Jul 2015 15:29:11 +0200 Received: from cobaltpc1.cisco.com (unknown [173.38.220.51]) by tschai.lan (Postfix) with ESMTPSA id 731D42A066C; Thu, 2 Jul 2015 15:28:27 +0200 (CEST) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [RFCv3 PATCH 2/2] DocBook/media: document VIDIOC_SUBDEV_QUERYCAP Date: Thu, 2 Jul 2015 15:27:50 +0200 Message-Id: <42a19929d8a64d5e276459692750575f44642a5c.1435842920.git.hans.verkuil@cisco.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Hans Verkuil Add documentation for the new VIDIOC_SUBDEV_QUERYCAP ioctl. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/v4l2.xml | 1 + .../DocBook/media/v4l/vidioc-subdev-querycap.xml | 133 +++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 Documentation/DocBook/media/v4l/vidioc-subdev-querycap.xml diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e98caa1..23607bc 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -669,6 +669,7 @@ and discussions on the V4L mailing list. &sub-subdev-g-fmt; &sub-subdev-g-frame-interval; &sub-subdev-g-selection; + &sub-subdev-querycap; &sub-subscribe-event; &sub-mmap; diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-querycap.xml new file mode 100644 index 0000000..2c091d0 --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-querycap.xml @@ -0,0 +1,133 @@ + + + ioctl VIDIOC_SUBDEV_QUERYCAP + &manvol; + + + + VIDIOC_SUBDEV_QUERYCAP + Query sub-device capabilities + + + + + + int ioctl + int fd + int request + struct v4l2_subdev_capability *argp + + + + + + Arguments + + + + fd + + &fd; + + + + request + + VIDIOC_SUBDEV_QUERYCAP + + + + argp + + + + + + + + + Description + + All V4L2 sub-devices support the +VIDIOC_SUBDEV_QUERYCAP ioctl. It is used to identify +kernel devices compatible with this specification and to obtain +information about driver and hardware capabilities. The ioctl takes a +pointer to a &v4l2-subdev-capability; which is filled by the driver. When the +driver is not compatible with this specification the ioctl returns an +&ENOTTY;. + + + struct <structname>v4l2_subdev_capability</structname> + + &cs-str; + + + __u32 + version + Version number of the driver. +The version reported is provided by the +V4L2 subsystem following the kernel numbering scheme. However, it +may not always return the same version as the kernel if, for example, +a stable or distribution-modified kernel uses the V4L2 stack from a +newer kernel. +The version number is formatted using the +KERNEL_VERSION() macro: + + + + +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) + +__u32 version = KERNEL_VERSION(0, 8, 1); + +printf ("Version: %u.%u.%u\n", + (version >> 16) & 0xFF, + (version >> 8) & 0xFF, + version & 0xFF); + + + + __u32 + device_caps + Sub-device capabilities of the opened device, see . + + + + __u32 + entity_id + The media controller entity ID of the sub-device. This is only valid if + the V4L2_SUBDEV_CAP_ENTITY capability is set. + + + + __u32 + reserved[29] + Reserved for future extensions. Drivers must set +this array to zero. + + + +
+ + + Sub-Device Capabilities Flags + + &cs-def; + + + V4L2_SUBDEV_CAP_ENTITY + 0x00000001 + The sub-device is a media controller entity and + the entity_id field of &v4l2-subdev-capability; + is valid. + + + +
+
+ + + &return-value; + +