From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lb3-smtp-cloud2.xs4all.net ([194.109.24.29]:38125 "EHLO lb3-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753469AbbEFG5p (ORCPT ); Wed, 6 May 2015 02:57:45 -0400 From: Hans Verkuil To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, mchehab@osg.samsung.com, Hans Verkuil Subject: [RFCv2 PATCH 2/8] DocBook/media: document VIDIOC_SUBDEV_QUERYCAP Date: Wed, 6 May 2015 08:57:17 +0200 Message-Id: <1430895443-41839-3-git-send-email-hverkuil@xs4all.nl> In-Reply-To: <1430895443-41839-1-git-send-email-hverkuil@xs4all.nl> References: <1430895443-41839-1-git-send-email-hverkuil@xs4all.nl> Sender: linux-media-owner@vger.kernel.org List-ID: 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 | 125 +++++++++++++++++++++ 2 files changed, 126 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..7c4fceb --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-querycap.xml @@ -0,0 +1,125 @@ + + + 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 +error, most likely the &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 + reserved[50] + 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. If this +capability is set, then you can call &MEDIA-IOC-DEVICE-INFO;. + + + +
+
+ + + &return-value; + +
-- 2.1.4