diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-07-09 00:24:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-18 06:12:59 -0400 |
commit | d1e9b7c12b745af715101578a677e4a6b16c09e4 (patch) | |
tree | 6ccfe5745fc9bdc28c14fbab746f973608b39f8d /Documentation/video4linux/v4l2-controls.txt | |
parent | debe6267b718526ee9715501b8f52a0295e3712a (diff) |
[media] V4L: Add support for integer menu controls with standard menu items
The patch modifies the helper function v4l2_ctrl_new_std_menu
to accept integer menu controls with standard menu items.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/video4linux/v4l2-controls.txt')
-rw-r--r-- | Documentation/video4linux/v4l2-controls.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 676f87366025..06cf3ac83631 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt | |||
@@ -124,26 +124,27 @@ You add non-menu controls by calling v4l2_ctrl_new_std: | |||
124 | const struct v4l2_ctrl_ops *ops, | 124 | const struct v4l2_ctrl_ops *ops, |
125 | u32 id, s32 min, s32 max, u32 step, s32 def); | 125 | u32 id, s32 min, s32 max, u32 step, s32 def); |
126 | 126 | ||
127 | Menu controls are added by calling v4l2_ctrl_new_std_menu: | 127 | Menu and integer menu controls are added by calling v4l2_ctrl_new_std_menu: |
128 | 128 | ||
129 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, | 129 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, |
130 | const struct v4l2_ctrl_ops *ops, | 130 | const struct v4l2_ctrl_ops *ops, |
131 | u32 id, s32 max, s32 skip_mask, s32 def); | 131 | u32 id, s32 max, s32 skip_mask, s32 def); |
132 | 132 | ||
133 | Or alternatively for integer menu controls, by calling v4l2_ctrl_new_int_menu: | 133 | Menu controls with a driver specific menu are added by calling |
134 | v4l2_ctrl_new_std_menu_items: | ||
135 | |||
136 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items( | ||
137 | struct v4l2_ctrl_handler *hdl, | ||
138 | const struct v4l2_ctrl_ops *ops, u32 id, s32 max, | ||
139 | s32 skip_mask, s32 def, const char * const *qmenu); | ||
140 | |||
141 | Integer menu controls with a driver specific menu can be added by calling | ||
142 | v4l2_ctrl_new_int_menu: | ||
134 | 143 | ||
135 | struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl, | 144 | struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl, |
136 | const struct v4l2_ctrl_ops *ops, | 145 | const struct v4l2_ctrl_ops *ops, |
137 | u32 id, s32 max, s32 def, const s64 *qmenu_int); | 146 | u32 id, s32 max, s32 def, const s64 *qmenu_int); |
138 | 147 | ||
139 | Standard menu controls with a driver specific menu are added by calling | ||
140 | v4l2_ctrl_new_std_menu_items: | ||
141 | |||
142 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items( | ||
143 | struct v4l2_ctrl_handler *hdl, | ||
144 | const struct v4l2_ctrl_ops *ops, u32 id, s32 max, | ||
145 | s32 skip_mask, s32 def, const char * const *qmenu); | ||
146 | |||
147 | These functions are typically called right after the v4l2_ctrl_handler_init: | 148 | These functions are typically called right after the v4l2_ctrl_handler_init: |
148 | 149 | ||
149 | static const s64 exp_bias_qmenu[] = { | 150 | static const s64 exp_bias_qmenu[] = { |