diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-01-11 04:45:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-23 13:34:27 -0500 |
commit | 583aa3a9b5ca846a84f7dd87bdc4b75dca07b011 (patch) | |
tree | a86d9d5f2e9817e9faf9d2e06d212d4380924fe9 /Documentation | |
parent | 93596ef7db3e9bcc9306c3e93cf28ce1048858b6 (diff) |
[media] V4L2: Add per-device-node capabilities
If V4L2_CAP_DEVICE_CAPS is set, then the new device_caps field is filled with
the capabilities of the opened device node.
The capabilities field traditionally contains the capabilities of the physical
device, being a superset of all capabilities available at the several device
nodes. E.g., if you open /dev/video0, then if it contains VBI caps then that means
that there is a corresponding vbi node as well. And the capabilities field of
both the video and vbi nodes should contain identical caps.
However, it would be very useful to also have a capabilities field that contains
just the caps for the currently open device, hence the new CAP bit and field.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 4 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/v4l2.xml | 9 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-querycap.xml | 36 |
3 files changed, 45 insertions, 4 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index c736380b4647..c93298ff3279 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2393,6 +2393,10 @@ details.</para> | |||
2393 | to the <link linkend="control">User controls class</link>. | 2393 | to the <link linkend="control">User controls class</link>. |
2394 | </para> | 2394 | </para> |
2395 | </listitem> | 2395 | </listitem> |
2396 | <listitem> | ||
2397 | <para>Added the device_caps field to struct v4l2_capabilities and added the new | ||
2398 | V4L2_CAP_DEVICE_CAPS capability.</para> | ||
2399 | </listitem> | ||
2396 | </orderedlist> | 2400 | </orderedlist> |
2397 | </section> | 2401 | </section> |
2398 | 2402 | ||
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e97c512861bb..dce3fef15bc9 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -128,6 +128,13 @@ 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.3</revnumber> | ||
132 | <date>2012-01-11</date> | ||
133 | <authorinitials>hv</authorinitials> | ||
134 | <revremark>Added device_caps field to struct v4l2_capabilities.</revremark> | ||
135 | </revision> | ||
136 | |||
137 | <revision> | ||
131 | <revnumber>3.2</revnumber> | 138 | <revnumber>3.2</revnumber> |
132 | <date>2011-08-26</date> | 139 | <date>2011-08-26</date> |
133 | <authorinitials>hv</authorinitials> | 140 | <authorinitials>hv</authorinitials> |
@@ -417,7 +424,7 @@ and discussions on the V4L mailing list.</revremark> | |||
417 | </partinfo> | 424 | </partinfo> |
418 | 425 | ||
419 | <title>Video for Linux Two API Specification</title> | 426 | <title>Video for Linux Two API Specification</title> |
420 | <subtitle>Revision 3.2</subtitle> | 427 | <subtitle>Revision 3.3</subtitle> |
421 | 428 | ||
422 | <chapter id="common"> | 429 | <chapter id="common"> |
423 | &sub-common; | 430 | &sub-common; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index e3664d6f2de4..4643505cd4ca 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml | |||
@@ -124,12 +124,35 @@ printf ("Version: %u.%u.%u\n", | |||
124 | <row> | 124 | <row> |
125 | <entry>__u32</entry> | 125 | <entry>__u32</entry> |
126 | <entry><structfield>capabilities</structfield></entry> | 126 | <entry><structfield>capabilities</structfield></entry> |
127 | <entry>Device capabilities, see <xref | 127 | <entry>Available capabilities of the physical device as a whole, see <xref |
128 | linkend="device-capabilities" />.</entry> | 128 | linkend="device-capabilities" />. The same physical device can export |
129 | multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and /dev/radioZ). | ||
130 | The <structfield>capabilities</structfield> field should contain a union | ||
131 | of all capabilities available around the several V4L2 devices exported | ||
132 | to userspace. | ||
133 | For all those devices the <structfield>capabilities</structfield> field | ||
134 | returns the same set of capabilities. This allows applications to open | ||
135 | just one of the devices (typically the video device) and discover whether | ||
136 | video, vbi and/or radio are also supported. | ||
137 | </entry> | ||
129 | </row> | 138 | </row> |
130 | <row> | 139 | <row> |
131 | <entry>__u32</entry> | 140 | <entry>__u32</entry> |
132 | <entry><structfield>reserved</structfield>[4]</entry> | 141 | <entry><structfield>device_caps</structfield></entry> |
142 | <entry>Device capabilities of the opened device, see <xref | ||
143 | linkend="device-capabilities" />. Should contain the available capabilities | ||
144 | of that specific device node. So, for example, <structfield>device_caps</structfield> | ||
145 | of a radio device will only contain radio related capabilities and | ||
146 | no video or vbi capabilities. This field is only set if the <structfield>capabilities</structfield> | ||
147 | field contains the <constant>V4L2_CAP_DEVICE_CAPS</constant> capability. | ||
148 | Only the <structfield>capabilities</structfield> field can have the | ||
149 | <constant>V4L2_CAP_DEVICE_CAPS</constant> capability, <structfield>device_caps</structfield> | ||
150 | will never set <constant>V4L2_CAP_DEVICE_CAPS</constant>. | ||
151 | </entry> | ||
152 | </row> | ||
153 | <row> | ||
154 | <entry>__u32</entry> | ||
155 | <entry><structfield>reserved</structfield>[3]</entry> | ||
133 | <entry>Reserved for future extensions. Drivers must set | 156 | <entry>Reserved for future extensions. Drivers must set |
134 | this array to zero.</entry> | 157 | this array to zero.</entry> |
135 | </row> | 158 | </row> |
@@ -276,6 +299,13 @@ linkend="async">asynchronous</link> I/O methods.</entry> | |||
276 | <entry>The device supports the <link | 299 | <entry>The device supports the <link |
277 | linkend="mmap">streaming</link> I/O method.</entry> | 300 | linkend="mmap">streaming</link> I/O method.</entry> |
278 | </row> | 301 | </row> |
302 | <row> | ||
303 | <entry><constant>V4L2_CAP_DEVICE_CAPS</constant></entry> | ||
304 | <entry>0x80000000</entry> | ||
305 | <entry>The driver fills the <structfield>device_caps</structfield> | ||
306 | field. This capability can only appear in the <structfield>capabilities</structfield> | ||
307 | field and never in the <structfield>device_caps</structfield> field.</entry> | ||
308 | </row> | ||
279 | </tbody> | 309 | </tbody> |
280 | </tgroup> | 310 | </tgroup> |
281 | </table> | 311 | </table> |