diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-ctrls.h | 20 | ||||
-rw-r--r-- | include/uapi/linux/videodev2.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index c4cc04136074..91125b6f05a5 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h | |||
@@ -518,6 +518,26 @@ void v4l2_ctrl_activate(struct v4l2_ctrl *ctrl, bool active); | |||
518 | */ | 518 | */ |
519 | void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed); | 519 | void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed); |
520 | 520 | ||
521 | /** v4l2_ctrl_modify_range() - Update the range of a control. | ||
522 | * @ctrl: The control to update. | ||
523 | * @min: The control's minimum value. | ||
524 | * @max: The control's maximum value. | ||
525 | * @step: The control's step value | ||
526 | * @def: The control's default value. | ||
527 | * | ||
528 | * Update the range of a control on the fly. This works for control types | ||
529 | * INTEGER, BOOLEAN, MENU, INTEGER MENU and BITMASK. For menu controls the | ||
530 | * @step value is interpreted as a menu_skip_mask. | ||
531 | * | ||
532 | * An error is returned if one of the range arguments is invalid for this | ||
533 | * control type. | ||
534 | * | ||
535 | * This function assumes that the control handler is not locked and will | ||
536 | * take the lock itself. | ||
537 | */ | ||
538 | int v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, | ||
539 | s32 min, s32 max, u32 step, s32 def); | ||
540 | |||
521 | /** v4l2_ctrl_lock() - Helper function to lock the handler | 541 | /** v4l2_ctrl_lock() - Helper function to lock the handler |
522 | * associated with the control. | 542 | * associated with the control. |
523 | * @ctrl: The control to lock. | 543 | * @ctrl: The control to lock. |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 94cbe26e9f00..928799c2e2d9 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
@@ -1822,6 +1822,7 @@ struct v4l2_event_vsync { | |||
1822 | /* Payload for V4L2_EVENT_CTRL */ | 1822 | /* Payload for V4L2_EVENT_CTRL */ |
1823 | #define V4L2_EVENT_CTRL_CH_VALUE (1 << 0) | 1823 | #define V4L2_EVENT_CTRL_CH_VALUE (1 << 0) |
1824 | #define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1) | 1824 | #define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1) |
1825 | #define V4L2_EVENT_CTRL_CH_RANGE (1 << 2) | ||
1825 | 1826 | ||
1826 | struct v4l2_event_ctrl { | 1827 | struct v4l2_event_ctrl { |
1827 | __u32 changes; | 1828 | __u32 changes; |