diff options
-rw-r--r-- | drivers/media/video/v4l2-compat-ioctl32.c | 3 | ||||
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 3 | ||||
-rw-r--r-- | include/linux/videodev2.h | 26 |
3 files changed, 32 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index f77f84bfe714..9004a5fe7643 100644 --- a/drivers/media/video/v4l2-compat-ioctl32.c +++ b/drivers/media/video/v4l2-compat-ioctl32.c | |||
@@ -1086,6 +1086,9 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
1086 | case VIDIOC_QUERY_DV_PRESET: | 1086 | case VIDIOC_QUERY_DV_PRESET: |
1087 | case VIDIOC_S_DV_TIMINGS: | 1087 | case VIDIOC_S_DV_TIMINGS: |
1088 | case VIDIOC_G_DV_TIMINGS: | 1088 | case VIDIOC_G_DV_TIMINGS: |
1089 | case VIDIOC_DQEVENT: | ||
1090 | case VIDIOC_SUBSCRIBE_EVENT: | ||
1091 | case VIDIOC_UNSUBSCRIBE_EVENT: | ||
1089 | ret = do_video_ioctl(file, cmd, arg); | 1092 | ret = do_video_ioctl(file, cmd, arg); |
1090 | break; | 1093 | break; |
1091 | 1094 | ||
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 3da8d8f041d8..2ceaa152a450 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -291,6 +291,9 @@ static const char *v4l2_ioctls[] = { | |||
291 | [_IOC_NR(VIDIOC_QUERY_DV_PRESET)] = "VIDIOC_QUERY_DV_PRESET", | 291 | [_IOC_NR(VIDIOC_QUERY_DV_PRESET)] = "VIDIOC_QUERY_DV_PRESET", |
292 | [_IOC_NR(VIDIOC_S_DV_TIMINGS)] = "VIDIOC_S_DV_TIMINGS", | 292 | [_IOC_NR(VIDIOC_S_DV_TIMINGS)] = "VIDIOC_S_DV_TIMINGS", |
293 | [_IOC_NR(VIDIOC_G_DV_TIMINGS)] = "VIDIOC_G_DV_TIMINGS", | 293 | [_IOC_NR(VIDIOC_G_DV_TIMINGS)] = "VIDIOC_G_DV_TIMINGS", |
294 | [_IOC_NR(VIDIOC_DQEVENT)] = "VIDIOC_DQEVENT", | ||
295 | [_IOC_NR(VIDIOC_SUBSCRIBE_EVENT)] = "VIDIOC_SUBSCRIBE_EVENT", | ||
296 | [_IOC_NR(VIDIOC_UNSUBSCRIBE_EVENT)] = "VIDIOC_UNSUBSCRIBE_EVENT", | ||
294 | }; | 297 | }; |
295 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) | 298 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
296 | 299 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index e878056952c7..0f627c5b986b 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1637,6 +1637,29 @@ struct v4l2_streamparm { | |||
1637 | }; | 1637 | }; |
1638 | 1638 | ||
1639 | /* | 1639 | /* |
1640 | * E V E N T S | ||
1641 | */ | ||
1642 | |||
1643 | struct v4l2_event { | ||
1644 | __u32 type; | ||
1645 | union { | ||
1646 | __u8 data[64]; | ||
1647 | } u; | ||
1648 | __u32 pending; | ||
1649 | __u32 sequence; | ||
1650 | struct timespec timestamp; | ||
1651 | __u32 reserved[9]; | ||
1652 | }; | ||
1653 | |||
1654 | struct v4l2_event_subscription { | ||
1655 | __u32 type; | ||
1656 | __u32 reserved[7]; | ||
1657 | }; | ||
1658 | |||
1659 | #define V4L2_EVENT_ALL 0 | ||
1660 | #define V4L2_EVENT_PRIVATE_START 0x08000000 | ||
1661 | |||
1662 | /* | ||
1640 | * A D V A N C E D D E B U G G I N G | 1663 | * A D V A N C E D D E B U G G I N G |
1641 | * | 1664 | * |
1642 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! | 1665 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! |
@@ -1758,6 +1781,9 @@ struct v4l2_dbg_chip_ident { | |||
1758 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) | 1781 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) |
1759 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) | 1782 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) |
1760 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) | 1783 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) |
1784 | #define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) | ||
1785 | #define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription) | ||
1786 | #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) | ||
1761 | 1787 | ||
1762 | /* Reminder: when adding new ioctls please add support for them to | 1788 | /* Reminder: when adding new ioctls please add support for them to |
1763 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1789 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |