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/DocBook/media/v4l/vidioc-querycap.xml | |
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/DocBook/media/v4l/vidioc-querycap.xml')
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-querycap.xml | 36 |
1 files changed, 33 insertions, 3 deletions
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> |