From: Mauro Carvalho Chehab Date: Sat, 25 Jun 2011 17:11:52 +0000 (-0300) Subject: [media] DocBook/v4l: Document the new system-wide version behavior X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c20eb18ce1db6792db69f0574f7e955e9f92a213;p=deliverable%2Flinux.git [media] DocBook/v4l: Document the new system-wide version behavior Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 9028721438dc..a86f7a045529 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml @@ -236,7 +236,15 @@ important parts of the API. The &VIDIOC-QUERYCAP; ioctl is available to check if the kernel device is compatible with this specification, and to query the functions and I/O -methods supported by the device. Other features can be queried +methods supported by the device. + + Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the +V4L2 API version used by the driver, with generally matches the Kernel version. +There's no need of using &VIDIOC-QUERYCAP; to check if an specific ioctl is +supported, the V4L2 core now returns ENOIOCTLCMD if a driver doesn't provide +support for an ioctl. + + Other features can be queried by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; to learn about the number, types and names of video connectors on the device. Although abstraction is a major objective of this API, the diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index a7fd76d0dac1..c5ee3982cff5 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -127,6 +127,12 @@ structs, ioctls) must be noted in more detail in the history chapter (compat.xml), along with the possible impact on existing drivers and applications. --> + + 3.1 + 2011-06-27 + mcc, po + Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one. + 2.6.39 2011-03-01 diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index f29f1b86213c..7aa697323c79 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml @@ -67,9 +67,8 @@ driver is not compatible with this specification the ioctl returns an Name of the driver, a unique NUL-terminated ASCII string. For example: "bttv". Driver specific applications can use this information to verify the driver identity. It is also useful -to work around known bugs, or to identify drivers in error reports. -The driver version is stored in the version -field.Storing strings in fixed sized arrays is bad +to work around known bugs, or to identify drivers in error reports. +Storing strings in fixed sized arrays is bad practice but unavoidable here. Drivers and applications should take precautions to never read or write beyond the end of the array and to make sure the strings are properly NUL-terminated. @@ -100,9 +99,13 @@ empty string (bus_info[0] = 0).