Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1211162 > unrolled thread

[PATCH v2 02/10] videodev2.h: Extend struct v4l2_ext_controls

Started byRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
First post2015-08-21 15:30 +0200
Last post2015-08-21 15:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 02/10] videodev2.h: Extend struct v4l2_ext_controls Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2015-08-21 15:30 +0200

#1211162 — [PATCH v2 02/10] videodev2.h: Extend struct v4l2_ext_controls

FromRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date2015-08-21 15:30 +0200
Subject[PATCH v2 02/10] videodev2.h: Extend struct v4l2_ext_controls
Message-ID<pZUyn-4R5-19@gated-at.bofh.it>
So it can be used to get the default value of a control.

Without this change it is not possible to get  get the
default value of array controls.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 include/uapi/linux/videodev2.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 72fa3e490e30..2e857b19a155 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1461,7 +1461,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];
@@ -1472,6 +1475,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,
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web