aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-06-10 03:14:50 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 09:38:44 -0400
commit5082c2417841e64df975789011e182ce99a9dacd (patch)
treea7d7cabbd6688db9685fa4ef2ac4970664e7ad1e /include/uapi/linux
parent7e6a68210784dcea8e39fd9d4c9966f9c733ba09 (diff)
[media] videodev2.h: add struct v4l2_query_ext_ctrl and VIDIOC_QUERY_EXT_CTRL
Add a new struct and ioctl to extend the amount of information you can get for a control. The range is now a s64 type, and array dimensions and element size can be reported through nr_of_dims/dims/elems/elem_size. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/videodev2.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 438c4a65c5b2..0297980fe491 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1269,6 +1269,7 @@ struct v4l2_ext_controls {
1269#define V4L2_CTRL_ID_MASK (0x0fffffff) 1269#define V4L2_CTRL_ID_MASK (0x0fffffff)
1270#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 1270#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
1271#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) 1271#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
1272#define V4L2_CTRL_MAX_DIMS (4)
1272 1273
1273enum v4l2_ctrl_type { 1274enum v4l2_ctrl_type {
1274 V4L2_CTRL_TYPE_INTEGER = 1, 1275 V4L2_CTRL_TYPE_INTEGER = 1,
@@ -1298,6 +1299,23 @@ struct v4l2_queryctrl {
1298 __u32 reserved[2]; 1299 __u32 reserved[2];
1299}; 1300};
1300 1301
1302/* Used in the VIDIOC_QUERY_EXT_CTRL ioctl for querying extended controls */
1303struct v4l2_query_ext_ctrl {
1304 __u32 id;
1305 __u32 type;
1306 char name[32];
1307 __s64 minimum;
1308 __s64 maximum;
1309 __u64 step;
1310 __s64 default_value;
1311 __u32 flags;
1312 __u32 elem_size;
1313 __u32 elems;
1314 __u32 nr_of_dims;
1315 __u32 dims[V4L2_CTRL_MAX_DIMS];
1316 __u32 reserved[32];
1317};
1318
1301/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ 1319/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
1302struct v4l2_querymenu { 1320struct v4l2_querymenu {
1303 __u32 id; 1321 __u32 id;
@@ -2011,6 +2029,8 @@ struct v4l2_create_buffers {
2011 Never use these in applications! */ 2029 Never use these in applications! */
2012#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) 2030#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
2013 2031
2032#define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl)
2033
2014/* Reminder: when adding new ioctls please add support for them to 2034/* Reminder: when adding new ioctls please add support for them to
2015 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 2035 drivers/media/video/v4l2-compat-ioctl32.c as well! */
2016 2036