diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-25 13:11:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:16 -0400 |
commit | c20eb18ce1db6792db69f0574f7e955e9f92a213 (patch) | |
tree | 2dd4b7aae9a3b18a0d01652a61090f637fe4289d /Documentation/DocBook | |
parent | 29834c1ac7589c72996c5d02349d63fd397ef131 (diff) |
[media] DocBook/v4l: Document the new system-wide version behavior
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media/v4l/common.xml | 10 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/v4l2.xml | 6 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-querycap.xml | 15 |
3 files changed, 24 insertions, 7 deletions
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.</para> | |||
236 | <para>The &VIDIOC-QUERYCAP; ioctl is available to check if the kernel | 236 | <para>The &VIDIOC-QUERYCAP; ioctl is available to check if the kernel |
237 | device is compatible with this specification, and to query the <link | 237 | device is compatible with this specification, and to query the <link |
238 | linkend="devices">functions</link> and <link linkend="io">I/O | 238 | linkend="devices">functions</link> and <link linkend="io">I/O |
239 | methods</link> supported by the device. Other features can be queried | 239 | methods</link> supported by the device.</para> |
240 | |||
241 | <para>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the | ||
242 | V4L2 API version used by the driver, with generally matches the Kernel version. | ||
243 | There's no need of using &VIDIOC-QUERYCAP; to check if an specific ioctl is | ||
244 | supported, the V4L2 core now returns ENOIOCTLCMD if a driver doesn't provide | ||
245 | support for an ioctl.</para> | ||
246 | |||
247 | <para>Other features can be queried | ||
240 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; | 248 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; |
241 | to learn about the number, types and names of video connectors on the | 249 | to learn about the number, types and names of video connectors on the |
242 | device. Although abstraction is a major objective of this API, the | 250 | 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 | |||
@@ -128,6 +128,12 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
128 | applications. --> | 128 | applications. --> |
129 | 129 | ||
130 | <revision> | 130 | <revision> |
131 | <revnumber>3.1</revnumber> | ||
132 | <date>2011-06-27</date> | ||
133 | <authorinitials>mcc, po</authorinitials> | ||
134 | <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.</revremark> | ||
135 | </revision> | ||
136 | <revision> | ||
131 | <revnumber>2.6.39</revnumber> | 137 | <revnumber>2.6.39</revnumber> |
132 | <date>2011-03-01</date> | 138 | <date>2011-03-01</date> |
133 | <authorinitials>mcc, po</authorinitials> | 139 | <authorinitials>mcc, po</authorinitials> |
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 | |||
67 | <entry><para>Name of the driver, a unique NUL-terminated | 67 | <entry><para>Name of the driver, a unique NUL-terminated |
68 | ASCII string. For example: "bttv". Driver specific applications can | 68 | ASCII string. For example: "bttv". Driver specific applications can |
69 | use this information to verify the driver identity. It is also useful | 69 | use this information to verify the driver identity. It is also useful |
70 | to work around known bugs, or to identify drivers in error reports. | 70 | to work around known bugs, or to identify drivers in error reports.</para> |
71 | The driver version is stored in the <structfield>version</structfield> | 71 | <para>Storing strings in fixed sized arrays is bad |
72 | field.</para><para>Storing strings in fixed sized arrays is bad | ||
73 | practice but unavoidable here. Drivers and applications should take | 72 | practice but unavoidable here. Drivers and applications should take |
74 | precautions to never read or write beyond the end of the array and to | 73 | precautions to never read or write beyond the end of the array and to |
75 | make sure the strings are properly NUL-terminated.</para></entry> | 74 | make sure the strings are properly NUL-terminated.</para></entry> |
@@ -100,9 +99,13 @@ empty string (<structfield>bus_info</structfield>[0] = 0).<!-- XXX pci_dev->slot | |||
100 | <row> | 99 | <row> |
101 | <entry>__u32</entry> | 100 | <entry>__u32</entry> |
102 | <entry><structfield>version</structfield></entry> | 101 | <entry><structfield>version</structfield></entry> |
103 | <entry><para>Version number of the driver. Together with | 102 | <entry><para>Version number of the driver.</para> |
104 | the <structfield>driver</structfield> field this identifies a | 103 | <para>Starting on kernel 3.1, the version reported is provided per |
105 | particular driver. The version number is formatted using the | 104 | V4L2 subsystem, following the same Kernel numberation scheme. However, it |
105 | should not always return the same version as the kernel, if, for example, | ||
106 | an stable or distribution-modified kernel uses the V4L2 stack from a | ||
107 | newer kernel.</para> | ||
108 | <para>The version number is formatted using the | ||
106 | <constant>KERNEL_VERSION()</constant> macro:</para></entry> | 109 | <constant>KERNEL_VERSION()</constant> macro:</para></entry> |
107 | </row> | 110 | </row> |
108 | <row> | 111 | <row> |