aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/videodev2.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-01-11 04:45:05 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-23 13:34:27 -0500
commit583aa3a9b5ca846a84f7dd87bdc4b75dca07b011 (patch)
treea86d9d5f2e9817e9faf9d2e06d212d4380924fe9 /include/linux/videodev2.h
parent93596ef7db3e9bcc9306c3e93cf28ce1048858b6 (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 'include/linux/videodev2.h')
-rw-r--r--include/linux/videodev2.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 5e11f8a1f867..0db05033c2ec 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -235,16 +235,25 @@ struct v4l2_fract {
235 __u32 denominator; 235 __u32 denominator;
236}; 236};
237 237
238/* 238/**
239 * D R I V E R C A P A B I L I T I E S 239 * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
240 */ 240 *
241 * @driver: name of the driver module (e.g. "bttv")
242 * @card: name of the card (e.g. "Hauppauge WinTV")
243 * @bus_info: name of the bus (e.g. "PCI:" + pci_name(pci_dev) )
244 * @version: KERNEL_VERSION
245 * @capabilities: capabilities of the physical device as a whole
246 * @device_caps: capabilities accessed via this particular device (node)
247 * @reserved: reserved fields for future extensions
248 */
241struct v4l2_capability { 249struct v4l2_capability {
242 __u8 driver[16]; /* i.e. "bttv" */ 250 __u8 driver[16];
243 __u8 card[32]; /* i.e. "Hauppauge WinTV" */ 251 __u8 card[32];
244 __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ 252 __u8 bus_info[32];
245 __u32 version; /* should use KERNEL_VERSION() */ 253 __u32 version;
246 __u32 capabilities; /* Device capabilities */ 254 __u32 capabilities;
247 __u32 reserved[4]; 255 __u32 device_caps;
256 __u32 reserved[3];
248}; 257};
249 258
250/* Values for 'capabilities' field */ 259/* Values for 'capabilities' field */
@@ -274,6 +283,8 @@ struct v4l2_capability {
274#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ 283#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
275#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ 284#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
276 285
286#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
287
277/* 288/*
278 * V I D E O I M A G E F O R M A T 289 * V I D E O I M A G E F O R M A T
279 */ 290 */