summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Ribalda <ricardo.ribalda@gmail.com>2015-10-29 08:10:27 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-17 14:42:42 -0200
commit35ec2a2fa5a362b07b590ae1568dc35e47a7b846 (patch)
tree85ca614f00129e6881cadc5e0bd7dfc6e3232d26
parentdc5e02050b8574393d921ed76d37eb359b55f39a (diff)
downloadlwn-35ec2a2fa5a362b07b590ae1568dc35e47a7b846.tar.gz
lwn-35ec2a2fa5a362b07b590ae1568dc35e47a7b846.zip
[media] videodev2.h: Extend struct v4l2_ext_controls
So it can be used to get the default value of a control. Without this change it is not possible to get the default value of array controls. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--include/uapi/linux/videodev2.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index a0e87d16b726..4d88ee2d268e 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1476,7 +1476,10 @@ struct v4l2_ext_control {
} __attribute__ ((packed));
struct v4l2_ext_controls {
- __u32 ctrl_class;
+ union {
+ __u32 ctrl_class;
+ __u32 which;
+ };
__u32 count;
__u32 error_idx;
__u32 reserved[2];
@@ -1487,6 +1490,8 @@ struct v4l2_ext_controls {
#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
#define V4L2_CTRL_MAX_DIMS (4)
+#define V4L2_CTRL_WHICH_CUR_VAL 0
+#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000
enum v4l2_ctrl_type {
V4L2_CTRL_TYPE_INTEGER = 1,