diff options
author | Lad, Prabhakar <prabhakar.lad@ti.com> | 2012-09-18 14:54:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 20:48:03 -0400 |
commit | 117a711a2c37a0309a3e39fbd13486642b63453b (patch) | |
tree | 27fc0524ae0d20d5280a42d391ec36cc93036acb /include/media | |
parent | 5ebef0fbe0f72fa911088800c5d0bc7a872c35de (diff) |
[media] media: v4l2-ctrl: add a helper function to add standard control with driver specific menu
Add helper function v4l2_ctrl_new_std_menu_items(), which adds
a standard menu control, with driver specific menu.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-ctrls.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 801adb466bd2..96509119f28f 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h | |||
@@ -351,6 +351,29 @@ struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, | |||
351 | const struct v4l2_ctrl_ops *ops, | 351 | const struct v4l2_ctrl_ops *ops, |
352 | u32 id, s32 max, s32 mask, s32 def); | 352 | u32 id, s32 max, s32 mask, s32 def); |
353 | 353 | ||
354 | /** v4l2_ctrl_new_std_menu_items() - Create a new standard V4L2 menu control | ||
355 | * with driver specific menu. | ||
356 | * @hdl: The control handler. | ||
357 | * @ops: The control ops. | ||
358 | * @id: The control ID. | ||
359 | * @max: The control's maximum value. | ||
360 | * @mask: The control's skip mask for menu controls. This makes it | ||
361 | * easy to skip menu items that are not valid. If bit X is set, | ||
362 | * then menu item X is skipped. Of course, this only works for | ||
363 | * menus with <= 32 menu items. There are no menus that come | ||
364 | * close to that number, so this is OK. Should we ever need more, | ||
365 | * then this will have to be extended to a u64 or a bit array. | ||
366 | * @def: The control's default value. | ||
367 | * @qmenu: The new menu. | ||
368 | * | ||
369 | * Same as v4l2_ctrl_new_std_menu(), but @qmenu will be the driver specific | ||
370 | * menu of this control. | ||
371 | * | ||
372 | */ | ||
373 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items(struct v4l2_ctrl_handler *hdl, | ||
374 | const struct v4l2_ctrl_ops *ops, u32 id, s32 max, | ||
375 | s32 mask, s32 def, const char * const *qmenu); | ||
376 | |||
354 | /** v4l2_ctrl_new_int_menu() - Create a new standard V4L2 integer menu control. | 377 | /** v4l2_ctrl_new_int_menu() - Create a new standard V4L2 integer menu control. |
355 | * @hdl: The control handler. | 378 | * @hdl: The control handler. |
356 | * @ops: The control ops. | 379 | * @ops: The control ops. |