xref: /openbmc/linux/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
254f38fcaSMauro Carvalho Chehab
354f38fcaSMauro Carvalho Chehab.. _camera-controls:
454f38fcaSMauro Carvalho Chehab
554f38fcaSMauro Carvalho Chehab************************
654f38fcaSMauro Carvalho ChehabCamera Control Reference
754f38fcaSMauro Carvalho Chehab************************
854f38fcaSMauro Carvalho Chehab
954f38fcaSMauro Carvalho ChehabThe Camera class includes controls for mechanical (or equivalent
1054f38fcaSMauro Carvalho Chehabdigital) features of a device such as controllable lenses or sensors.
1154f38fcaSMauro Carvalho Chehab
1254f38fcaSMauro Carvalho Chehab
1354f38fcaSMauro Carvalho Chehab.. _camera-control-id:
1454f38fcaSMauro Carvalho Chehab
1554f38fcaSMauro Carvalho ChehabCamera Control IDs
1654f38fcaSMauro Carvalho Chehab==================
1754f38fcaSMauro Carvalho Chehab
1854f38fcaSMauro Carvalho Chehab``V4L2_CID_CAMERA_CLASS (class)``
1954f38fcaSMauro Carvalho Chehab    The Camera class descriptor. Calling
2054f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_QUERYCTRL` for this control will
2154f38fcaSMauro Carvalho Chehab    return a description of this control class.
2254f38fcaSMauro Carvalho Chehab
2354f38fcaSMauro Carvalho Chehab.. _v4l2-exposure-auto-type:
2454f38fcaSMauro Carvalho Chehab
2554f38fcaSMauro Carvalho Chehab``V4L2_CID_EXPOSURE_AUTO``
2654f38fcaSMauro Carvalho Chehab    (enum)
2754f38fcaSMauro Carvalho Chehab
2854f38fcaSMauro Carvalho Chehabenum v4l2_exposure_auto_type -
2954f38fcaSMauro Carvalho Chehab    Enables automatic adjustments of the exposure time and/or iris
3054f38fcaSMauro Carvalho Chehab    aperture. The effect of manual changes of the exposure time or iris
3154f38fcaSMauro Carvalho Chehab    aperture while these features are enabled is undefined, drivers
3254f38fcaSMauro Carvalho Chehab    should ignore such requests. Possible values are:
3354f38fcaSMauro Carvalho Chehab
3454f38fcaSMauro Carvalho Chehab
35fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{7.1cm}|p{10.4cm}|
3654f38fcaSMauro Carvalho Chehab
3754f38fcaSMauro Carvalho Chehab.. flat-table::
3854f38fcaSMauro Carvalho Chehab    :header-rows:  0
3954f38fcaSMauro Carvalho Chehab    :stub-columns: 0
4054f38fcaSMauro Carvalho Chehab
4154f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_AUTO``
4254f38fcaSMauro Carvalho Chehab      - Automatic exposure time, automatic iris aperture.
4354f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_MANUAL``
4454f38fcaSMauro Carvalho Chehab      - Manual exposure time, manual iris.
4554f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_SHUTTER_PRIORITY``
4654f38fcaSMauro Carvalho Chehab      - Manual exposure time, auto iris.
4754f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_APERTURE_PRIORITY``
4854f38fcaSMauro Carvalho Chehab      - Auto exposure time, manual iris.
4954f38fcaSMauro Carvalho Chehab
5054f38fcaSMauro Carvalho Chehab
5154f38fcaSMauro Carvalho Chehab
5254f38fcaSMauro Carvalho Chehab``V4L2_CID_EXPOSURE_ABSOLUTE (integer)``
5354f38fcaSMauro Carvalho Chehab    Determines the exposure time of the camera sensor. The exposure time
5454f38fcaSMauro Carvalho Chehab    is limited by the frame interval. Drivers should interpret the
5554f38fcaSMauro Carvalho Chehab    values as 100 µs units, where the value 1 stands for 1/10000th of a
5654f38fcaSMauro Carvalho Chehab    second, 10000 for 1 second and 100000 for 10 seconds.
5754f38fcaSMauro Carvalho Chehab
5854f38fcaSMauro Carvalho Chehab``V4L2_CID_EXPOSURE_AUTO_PRIORITY (boolean)``
5954f38fcaSMauro Carvalho Chehab    When ``V4L2_CID_EXPOSURE_AUTO`` is set to ``AUTO`` or
6054f38fcaSMauro Carvalho Chehab    ``APERTURE_PRIORITY``, this control determines if the device may
6154f38fcaSMauro Carvalho Chehab    dynamically vary the frame rate. By default this feature is disabled
6254f38fcaSMauro Carvalho Chehab    (0) and the frame rate must remain constant.
6354f38fcaSMauro Carvalho Chehab
6454f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_EXPOSURE_BIAS (integer menu)``
6554f38fcaSMauro Carvalho Chehab    Determines the automatic exposure compensation, it is effective only
6654f38fcaSMauro Carvalho Chehab    when ``V4L2_CID_EXPOSURE_AUTO`` control is set to ``AUTO``,
6754f38fcaSMauro Carvalho Chehab    ``SHUTTER_PRIORITY`` or ``APERTURE_PRIORITY``. It is expressed in
6854f38fcaSMauro Carvalho Chehab    terms of EV, drivers should interpret the values as 0.001 EV units,
6954f38fcaSMauro Carvalho Chehab    where the value 1000 stands for +1 EV.
7054f38fcaSMauro Carvalho Chehab
7154f38fcaSMauro Carvalho Chehab    Increasing the exposure compensation value is equivalent to
7254f38fcaSMauro Carvalho Chehab    decreasing the exposure value (EV) and will increase the amount of
7354f38fcaSMauro Carvalho Chehab    light at the image sensor. The camera performs the exposure
7454f38fcaSMauro Carvalho Chehab    compensation by adjusting absolute exposure time and/or aperture.
7554f38fcaSMauro Carvalho Chehab
7654f38fcaSMauro Carvalho Chehab.. _v4l2-exposure-metering:
7754f38fcaSMauro Carvalho Chehab
7854f38fcaSMauro Carvalho Chehab``V4L2_CID_EXPOSURE_METERING``
7954f38fcaSMauro Carvalho Chehab    (enum)
8054f38fcaSMauro Carvalho Chehab
8154f38fcaSMauro Carvalho Chehabenum v4l2_exposure_metering -
8254f38fcaSMauro Carvalho Chehab    Determines how the camera measures the amount of light available for
8354f38fcaSMauro Carvalho Chehab    the frame exposure. Possible values are:
8454f38fcaSMauro Carvalho Chehab
85fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{8.7cm}|p{8.7cm}|
8654f38fcaSMauro Carvalho Chehab
8754f38fcaSMauro Carvalho Chehab.. flat-table::
8854f38fcaSMauro Carvalho Chehab    :header-rows:  0
8954f38fcaSMauro Carvalho Chehab    :stub-columns: 0
9054f38fcaSMauro Carvalho Chehab
9154f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_METERING_AVERAGE``
9254f38fcaSMauro Carvalho Chehab      - Use the light information coming from the entire frame and average
9354f38fcaSMauro Carvalho Chehab	giving no weighting to any particular portion of the metered area.
9454f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
9554f38fcaSMauro Carvalho Chehab      - Average the light information coming from the entire frame giving
9654f38fcaSMauro Carvalho Chehab	priority to the center of the metered area.
9754f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_METERING_SPOT``
9854f38fcaSMauro Carvalho Chehab      - Measure only very small area at the center of the frame.
9954f38fcaSMauro Carvalho Chehab    * - ``V4L2_EXPOSURE_METERING_MATRIX``
10054f38fcaSMauro Carvalho Chehab      - A multi-zone metering. The light intensity is measured in several
10154f38fcaSMauro Carvalho Chehab	points of the frame and the results are combined. The algorithm of
10254f38fcaSMauro Carvalho Chehab	the zones selection and their significance in calculating the
10354f38fcaSMauro Carvalho Chehab	final value is device dependent.
10454f38fcaSMauro Carvalho Chehab
10554f38fcaSMauro Carvalho Chehab
10654f38fcaSMauro Carvalho Chehab
10754f38fcaSMauro Carvalho Chehab``V4L2_CID_PAN_RELATIVE (integer)``
10854f38fcaSMauro Carvalho Chehab    This control turns the camera horizontally by the specified amount.
10954f38fcaSMauro Carvalho Chehab    The unit is undefined. A positive value moves the camera to the
11054f38fcaSMauro Carvalho Chehab    right (clockwise when viewed from above), a negative value to the
11154f38fcaSMauro Carvalho Chehab    left. A value of zero does not cause motion. This is a write-only
11254f38fcaSMauro Carvalho Chehab    control.
11354f38fcaSMauro Carvalho Chehab
11454f38fcaSMauro Carvalho Chehab``V4L2_CID_TILT_RELATIVE (integer)``
11554f38fcaSMauro Carvalho Chehab    This control turns the camera vertically by the specified amount.
11654f38fcaSMauro Carvalho Chehab    The unit is undefined. A positive value moves the camera up, a
11754f38fcaSMauro Carvalho Chehab    negative value down. A value of zero does not cause motion. This is
11854f38fcaSMauro Carvalho Chehab    a write-only control.
11954f38fcaSMauro Carvalho Chehab
12054f38fcaSMauro Carvalho Chehab``V4L2_CID_PAN_RESET (button)``
12154f38fcaSMauro Carvalho Chehab    When this control is set, the camera moves horizontally to the
12254f38fcaSMauro Carvalho Chehab    default position.
12354f38fcaSMauro Carvalho Chehab
12454f38fcaSMauro Carvalho Chehab``V4L2_CID_TILT_RESET (button)``
12554f38fcaSMauro Carvalho Chehab    When this control is set, the camera moves vertically to the default
12654f38fcaSMauro Carvalho Chehab    position.
12754f38fcaSMauro Carvalho Chehab
12854f38fcaSMauro Carvalho Chehab``V4L2_CID_PAN_ABSOLUTE (integer)``
12954f38fcaSMauro Carvalho Chehab    This control turns the camera horizontally to the specified
13054f38fcaSMauro Carvalho Chehab    position. Positive values move the camera to the right (clockwise
13154f38fcaSMauro Carvalho Chehab    when viewed from above), negative values to the left. Drivers should
13254f38fcaSMauro Carvalho Chehab    interpret the values as arc seconds, with valid values between -180
13354f38fcaSMauro Carvalho Chehab    * 3600 and +180 * 3600 inclusive.
13454f38fcaSMauro Carvalho Chehab
13554f38fcaSMauro Carvalho Chehab``V4L2_CID_TILT_ABSOLUTE (integer)``
13654f38fcaSMauro Carvalho Chehab    This control turns the camera vertically to the specified position.
13754f38fcaSMauro Carvalho Chehab    Positive values move the camera up, negative values down. Drivers
13854f38fcaSMauro Carvalho Chehab    should interpret the values as arc seconds, with valid values
13954f38fcaSMauro Carvalho Chehab    between -180 * 3600 and +180 * 3600 inclusive.
14054f38fcaSMauro Carvalho Chehab
14154f38fcaSMauro Carvalho Chehab``V4L2_CID_FOCUS_ABSOLUTE (integer)``
14254f38fcaSMauro Carvalho Chehab    This control sets the focal point of the camera to the specified
14354f38fcaSMauro Carvalho Chehab    position. The unit is undefined. Positive values set the focus
14454f38fcaSMauro Carvalho Chehab    closer to the camera, negative values towards infinity.
14554f38fcaSMauro Carvalho Chehab
14654f38fcaSMauro Carvalho Chehab``V4L2_CID_FOCUS_RELATIVE (integer)``
14754f38fcaSMauro Carvalho Chehab    This control moves the focal point of the camera by the specified
14854f38fcaSMauro Carvalho Chehab    amount. The unit is undefined. Positive values move the focus closer
14954f38fcaSMauro Carvalho Chehab    to the camera, negative values towards infinity. This is a
15054f38fcaSMauro Carvalho Chehab    write-only control.
15154f38fcaSMauro Carvalho Chehab
15254f38fcaSMauro Carvalho Chehab``V4L2_CID_FOCUS_AUTO (boolean)``
15354f38fcaSMauro Carvalho Chehab    Enables continuous automatic focus adjustments. The effect of manual
15454f38fcaSMauro Carvalho Chehab    focus adjustments while this feature is enabled is undefined,
15554f38fcaSMauro Carvalho Chehab    drivers should ignore such requests.
15654f38fcaSMauro Carvalho Chehab
15754f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_FOCUS_START (button)``
15854f38fcaSMauro Carvalho Chehab    Starts single auto focus process. The effect of setting this control
15954f38fcaSMauro Carvalho Chehab    when ``V4L2_CID_FOCUS_AUTO`` is set to ``TRUE`` (1) is undefined,
16054f38fcaSMauro Carvalho Chehab    drivers should ignore such requests.
16154f38fcaSMauro Carvalho Chehab
16254f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_FOCUS_STOP (button)``
16354f38fcaSMauro Carvalho Chehab    Aborts automatic focusing started with ``V4L2_CID_AUTO_FOCUS_START``
16454f38fcaSMauro Carvalho Chehab    control. It is effective only when the continuous autofocus is
16554f38fcaSMauro Carvalho Chehab    disabled, that is when ``V4L2_CID_FOCUS_AUTO`` control is set to
16654f38fcaSMauro Carvalho Chehab    ``FALSE`` (0).
16754f38fcaSMauro Carvalho Chehab
16854f38fcaSMauro Carvalho Chehab.. _v4l2-auto-focus-status:
16954f38fcaSMauro Carvalho Chehab
17054f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_FOCUS_STATUS (bitmask)``
17154f38fcaSMauro Carvalho Chehab    The automatic focus status. This is a read-only control.
17254f38fcaSMauro Carvalho Chehab
17354f38fcaSMauro Carvalho Chehab    Setting ``V4L2_LOCK_FOCUS`` lock bit of the ``V4L2_CID_3A_LOCK``
17454f38fcaSMauro Carvalho Chehab    control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS``
17554f38fcaSMauro Carvalho Chehab    control value.
17654f38fcaSMauro Carvalho Chehab
177fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{6.8cm}|p{10.7cm}|
17854f38fcaSMauro Carvalho Chehab
17954f38fcaSMauro Carvalho Chehab.. flat-table::
18054f38fcaSMauro Carvalho Chehab    :header-rows:  0
18154f38fcaSMauro Carvalho Chehab    :stub-columns: 0
18254f38fcaSMauro Carvalho Chehab
18354f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_STATUS_IDLE``
18454f38fcaSMauro Carvalho Chehab      - Automatic focus is not active.
18554f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_STATUS_BUSY``
18654f38fcaSMauro Carvalho Chehab      - Automatic focusing is in progress.
18754f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_STATUS_REACHED``
18854f38fcaSMauro Carvalho Chehab      - Focus has been reached.
18954f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_STATUS_FAILED``
19054f38fcaSMauro Carvalho Chehab      - Automatic focus has failed, the driver will not transition from
19154f38fcaSMauro Carvalho Chehab	this state until another action is performed by an application.
19254f38fcaSMauro Carvalho Chehab
19354f38fcaSMauro Carvalho Chehab
19454f38fcaSMauro Carvalho Chehab
19554f38fcaSMauro Carvalho Chehab.. _v4l2-auto-focus-range:
19654f38fcaSMauro Carvalho Chehab
19754f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_FOCUS_RANGE``
19854f38fcaSMauro Carvalho Chehab    (enum)
19954f38fcaSMauro Carvalho Chehab
20054f38fcaSMauro Carvalho Chehabenum v4l2_auto_focus_range -
20154f38fcaSMauro Carvalho Chehab    Determines auto focus distance range for which lens may be adjusted.
20254f38fcaSMauro Carvalho Chehab
203fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{6.9cm}|p{10.6cm}|
20454f38fcaSMauro Carvalho Chehab
20554f38fcaSMauro Carvalho Chehab.. flat-table::
20654f38fcaSMauro Carvalho Chehab    :header-rows:  0
20754f38fcaSMauro Carvalho Chehab    :stub-columns: 0
20854f38fcaSMauro Carvalho Chehab
20954f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_RANGE_AUTO``
21054f38fcaSMauro Carvalho Chehab      - The camera automatically selects the focus range.
21154f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
21254f38fcaSMauro Carvalho Chehab      - Normal distance range, limited for best automatic focus
21354f38fcaSMauro Carvalho Chehab	performance.
21454f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_RANGE_MACRO``
21554f38fcaSMauro Carvalho Chehab      - Macro (close-up) auto focus. The camera will use its minimum
21654f38fcaSMauro Carvalho Chehab	possible distance for auto focus.
21754f38fcaSMauro Carvalho Chehab    * - ``V4L2_AUTO_FOCUS_RANGE_INFINITY``
21854f38fcaSMauro Carvalho Chehab      - The lens is set to focus on an object at infinite distance.
21954f38fcaSMauro Carvalho Chehab
22054f38fcaSMauro Carvalho Chehab
22154f38fcaSMauro Carvalho Chehab
22254f38fcaSMauro Carvalho Chehab``V4L2_CID_ZOOM_ABSOLUTE (integer)``
22354f38fcaSMauro Carvalho Chehab    Specify the objective lens focal length as an absolute value. The
22454f38fcaSMauro Carvalho Chehab    zoom unit is driver-specific and its value should be a positive
22554f38fcaSMauro Carvalho Chehab    integer.
22654f38fcaSMauro Carvalho Chehab
22754f38fcaSMauro Carvalho Chehab``V4L2_CID_ZOOM_RELATIVE (integer)``
22854f38fcaSMauro Carvalho Chehab    Specify the objective lens focal length relatively to the current
22954f38fcaSMauro Carvalho Chehab    value. Positive values move the zoom lens group towards the
23054f38fcaSMauro Carvalho Chehab    telephoto direction, negative values towards the wide-angle
23154f38fcaSMauro Carvalho Chehab    direction. The zoom unit is driver-specific. This is a write-only
23254f38fcaSMauro Carvalho Chehab    control.
23354f38fcaSMauro Carvalho Chehab
23454f38fcaSMauro Carvalho Chehab``V4L2_CID_ZOOM_CONTINUOUS (integer)``
23554f38fcaSMauro Carvalho Chehab    Move the objective lens group at the specified speed until it
23654f38fcaSMauro Carvalho Chehab    reaches physical device limits or until an explicit request to stop
23754f38fcaSMauro Carvalho Chehab    the movement. A positive value moves the zoom lens group towards the
23854f38fcaSMauro Carvalho Chehab    telephoto direction. A value of zero stops the zoom lens group
23954f38fcaSMauro Carvalho Chehab    movement. A negative value moves the zoom lens group towards the
24054f38fcaSMauro Carvalho Chehab    wide-angle direction. The zoom speed unit is driver-specific.
24154f38fcaSMauro Carvalho Chehab
24254f38fcaSMauro Carvalho Chehab``V4L2_CID_IRIS_ABSOLUTE (integer)``
24354f38fcaSMauro Carvalho Chehab    This control sets the camera's aperture to the specified value. The
24454f38fcaSMauro Carvalho Chehab    unit is undefined. Larger values open the iris wider, smaller values
24554f38fcaSMauro Carvalho Chehab    close it.
24654f38fcaSMauro Carvalho Chehab
24754f38fcaSMauro Carvalho Chehab``V4L2_CID_IRIS_RELATIVE (integer)``
24854f38fcaSMauro Carvalho Chehab    This control modifies the camera's aperture by the specified amount.
24954f38fcaSMauro Carvalho Chehab    The unit is undefined. Positive values open the iris one step
25054f38fcaSMauro Carvalho Chehab    further, negative values close it one step further. This is a
25154f38fcaSMauro Carvalho Chehab    write-only control.
25254f38fcaSMauro Carvalho Chehab
25354f38fcaSMauro Carvalho Chehab``V4L2_CID_PRIVACY (boolean)``
25454f38fcaSMauro Carvalho Chehab    Prevent video from being acquired by the camera. When this control
25554f38fcaSMauro Carvalho Chehab    is set to ``TRUE`` (1), no image can be captured by the camera.
25654f38fcaSMauro Carvalho Chehab    Common means to enforce privacy are mechanical obturation of the
25754f38fcaSMauro Carvalho Chehab    sensor and firmware image processing, but the device is not
25854f38fcaSMauro Carvalho Chehab    restricted to these methods. Devices that implement the privacy
25954f38fcaSMauro Carvalho Chehab    control must support read access and may support write access.
26054f38fcaSMauro Carvalho Chehab
26154f38fcaSMauro Carvalho Chehab``V4L2_CID_BAND_STOP_FILTER (integer)``
26254f38fcaSMauro Carvalho Chehab    Switch the band-stop filter of a camera sensor on or off, or specify
26354f38fcaSMauro Carvalho Chehab    its strength. Such band-stop filters can be used, for example, to
26454f38fcaSMauro Carvalho Chehab    filter out the fluorescent light component.
26554f38fcaSMauro Carvalho Chehab
26654f38fcaSMauro Carvalho Chehab.. _v4l2-auto-n-preset-white-balance:
26754f38fcaSMauro Carvalho Chehab
26854f38fcaSMauro Carvalho Chehab``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``
26954f38fcaSMauro Carvalho Chehab    (enum)
27054f38fcaSMauro Carvalho Chehab
27154f38fcaSMauro Carvalho Chehabenum v4l2_auto_n_preset_white_balance -
27254f38fcaSMauro Carvalho Chehab    Sets white balance to automatic, manual or a preset. The presets
27354f38fcaSMauro Carvalho Chehab    determine color temperature of the light as a hint to the camera for
27454f38fcaSMauro Carvalho Chehab    white balance adjustments resulting in most accurate color
27554f38fcaSMauro Carvalho Chehab    representation. The following white balance presets are listed in
27654f38fcaSMauro Carvalho Chehab    order of increasing color temperature.
27754f38fcaSMauro Carvalho Chehab
278fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{7.4cm}|p{10.1cm}|
27954f38fcaSMauro Carvalho Chehab
28054f38fcaSMauro Carvalho Chehab.. flat-table::
28154f38fcaSMauro Carvalho Chehab    :header-rows:  0
28254f38fcaSMauro Carvalho Chehab    :stub-columns: 0
28354f38fcaSMauro Carvalho Chehab
28454f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_MANUAL``
28554f38fcaSMauro Carvalho Chehab      - Manual white balance.
28654f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_AUTO``
28754f38fcaSMauro Carvalho Chehab      - Automatic white balance adjustments.
28854f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_INCANDESCENT``
28954f38fcaSMauro Carvalho Chehab      - White balance setting for incandescent (tungsten) lighting. It
29054f38fcaSMauro Carvalho Chehab	generally cools down the colors and corresponds approximately to
29154f38fcaSMauro Carvalho Chehab	2500...3500 K color temperature range.
29254f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_FLUORESCENT``
29354f38fcaSMauro Carvalho Chehab      - White balance preset for fluorescent lighting. It corresponds
29454f38fcaSMauro Carvalho Chehab	approximately to 4000...5000 K color temperature.
29554f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
29654f38fcaSMauro Carvalho Chehab      - With this setting the camera will compensate for fluorescent H
29754f38fcaSMauro Carvalho Chehab	lighting.
29854f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_HORIZON``
29954f38fcaSMauro Carvalho Chehab      - White balance setting for horizon daylight. It corresponds
30054f38fcaSMauro Carvalho Chehab	approximately to 5000 K color temperature.
30154f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_DAYLIGHT``
30254f38fcaSMauro Carvalho Chehab      - White balance preset for daylight (with clear sky). It corresponds
30354f38fcaSMauro Carvalho Chehab	approximately to 5000...6500 K color temperature.
30454f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_FLASH``
30554f38fcaSMauro Carvalho Chehab      - With this setting the camera will compensate for the flash light.
30654f38fcaSMauro Carvalho Chehab	It slightly warms up the colors and corresponds roughly to
30754f38fcaSMauro Carvalho Chehab	5000...5500 K color temperature.
30854f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_CLOUDY``
30954f38fcaSMauro Carvalho Chehab      - White balance preset for moderately overcast sky. This option
31054f38fcaSMauro Carvalho Chehab	corresponds approximately to 6500...8000 K color temperature
31154f38fcaSMauro Carvalho Chehab	range.
31254f38fcaSMauro Carvalho Chehab    * - ``V4L2_WHITE_BALANCE_SHADE``
31354f38fcaSMauro Carvalho Chehab      - White balance preset for shade or heavily overcast sky. It
31454f38fcaSMauro Carvalho Chehab	corresponds approximately to 9000...10000 K color temperature.
31554f38fcaSMauro Carvalho Chehab
31654f38fcaSMauro Carvalho Chehab
31754f38fcaSMauro Carvalho Chehab
31854f38fcaSMauro Carvalho Chehab.. _v4l2-wide-dynamic-range:
31954f38fcaSMauro Carvalho Chehab
32054f38fcaSMauro Carvalho Chehab``V4L2_CID_WIDE_DYNAMIC_RANGE (boolean)``
32154f38fcaSMauro Carvalho Chehab    Enables or disables the camera's wide dynamic range feature. This
32254f38fcaSMauro Carvalho Chehab    feature allows to obtain clear images in situations where intensity
32354f38fcaSMauro Carvalho Chehab    of the illumination varies significantly throughout the scene, i.e.
32454f38fcaSMauro Carvalho Chehab    there are simultaneously very dark and very bright areas. It is most
32554f38fcaSMauro Carvalho Chehab    commonly realized in cameras by combining two subsequent frames with
32654f38fcaSMauro Carvalho Chehab    different exposure times.  [#f1]_
32754f38fcaSMauro Carvalho Chehab
32854f38fcaSMauro Carvalho Chehab.. _v4l2-image-stabilization:
32954f38fcaSMauro Carvalho Chehab
33054f38fcaSMauro Carvalho Chehab``V4L2_CID_IMAGE_STABILIZATION (boolean)``
33154f38fcaSMauro Carvalho Chehab    Enables or disables image stabilization.
33254f38fcaSMauro Carvalho Chehab
33354f38fcaSMauro Carvalho Chehab``V4L2_CID_ISO_SENSITIVITY (integer menu)``
33454f38fcaSMauro Carvalho Chehab    Determines ISO equivalent of an image sensor indicating the sensor's
33554f38fcaSMauro Carvalho Chehab    sensitivity to light. The numbers are expressed in arithmetic scale,
33654f38fcaSMauro Carvalho Chehab    as per :ref:`iso12232` standard, where doubling the sensor
33754f38fcaSMauro Carvalho Chehab    sensitivity is represented by doubling the numerical ISO value.
33854f38fcaSMauro Carvalho Chehab    Applications should interpret the values as standard ISO values
33954f38fcaSMauro Carvalho Chehab    multiplied by 1000, e.g. control value 800 stands for ISO 0.8.
34054f38fcaSMauro Carvalho Chehab    Drivers will usually support only a subset of standard ISO values.
34154f38fcaSMauro Carvalho Chehab    The effect of setting this control while the
34254f38fcaSMauro Carvalho Chehab    ``V4L2_CID_ISO_SENSITIVITY_AUTO`` control is set to a value other
34354f38fcaSMauro Carvalho Chehab    than ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` is undefined, drivers
34454f38fcaSMauro Carvalho Chehab    should ignore such requests.
34554f38fcaSMauro Carvalho Chehab
34654f38fcaSMauro Carvalho Chehab.. _v4l2-iso-sensitivity-auto-type:
34754f38fcaSMauro Carvalho Chehab
34854f38fcaSMauro Carvalho Chehab``V4L2_CID_ISO_SENSITIVITY_AUTO``
34954f38fcaSMauro Carvalho Chehab    (enum)
35054f38fcaSMauro Carvalho Chehab
35154f38fcaSMauro Carvalho Chehabenum v4l2_iso_sensitivity_type -
35254f38fcaSMauro Carvalho Chehab    Enables or disables automatic ISO sensitivity adjustments.
35354f38fcaSMauro Carvalho Chehab
35454f38fcaSMauro Carvalho Chehab
35554f38fcaSMauro Carvalho Chehab
35654f38fcaSMauro Carvalho Chehab.. flat-table::
35754f38fcaSMauro Carvalho Chehab    :header-rows:  0
35854f38fcaSMauro Carvalho Chehab    :stub-columns: 0
35954f38fcaSMauro Carvalho Chehab
36054f38fcaSMauro Carvalho Chehab    * - ``V4L2_CID_ISO_SENSITIVITY_MANUAL``
36154f38fcaSMauro Carvalho Chehab      - Manual ISO sensitivity.
36254f38fcaSMauro Carvalho Chehab    * - ``V4L2_CID_ISO_SENSITIVITY_AUTO``
36354f38fcaSMauro Carvalho Chehab      - Automatic ISO sensitivity adjustments.
36454f38fcaSMauro Carvalho Chehab
36554f38fcaSMauro Carvalho Chehab
36654f38fcaSMauro Carvalho Chehab
36754f38fcaSMauro Carvalho Chehab.. _v4l2-scene-mode:
36854f38fcaSMauro Carvalho Chehab
36954f38fcaSMauro Carvalho Chehab``V4L2_CID_SCENE_MODE``
37054f38fcaSMauro Carvalho Chehab    (enum)
37154f38fcaSMauro Carvalho Chehab
37254f38fcaSMauro Carvalho Chehabenum v4l2_scene_mode -
37354f38fcaSMauro Carvalho Chehab    This control allows to select scene programs as the camera automatic
37454f38fcaSMauro Carvalho Chehab    modes optimized for common shooting scenes. Within these modes the
37554f38fcaSMauro Carvalho Chehab    camera determines best exposure, aperture, focusing, light metering,
37654f38fcaSMauro Carvalho Chehab    white balance and equivalent sensitivity. The controls of those
37754f38fcaSMauro Carvalho Chehab    parameters are influenced by the scene mode control. An exact
37854f38fcaSMauro Carvalho Chehab    behavior in each mode is subject to the camera specification.
37954f38fcaSMauro Carvalho Chehab
38054f38fcaSMauro Carvalho Chehab    When the scene mode feature is not used, this control should be set
38154f38fcaSMauro Carvalho Chehab    to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related
38254f38fcaSMauro Carvalho Chehab    controls are accessible. The following scene programs are defined:
38354f38fcaSMauro Carvalho Chehab
38454f38fcaSMauro Carvalho Chehab.. raw:: latex
38554f38fcaSMauro Carvalho Chehab
38654f38fcaSMauro Carvalho Chehab    \small
38754f38fcaSMauro Carvalho Chehab
388fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{5.9cm}|p{11.6cm}|
389fea13a69SMauro Carvalho Chehab
390fea13a69SMauro Carvalho Chehab.. cssclass:: longtable
39154f38fcaSMauro Carvalho Chehab
39254f38fcaSMauro Carvalho Chehab.. flat-table::
39354f38fcaSMauro Carvalho Chehab    :header-rows:  0
39454f38fcaSMauro Carvalho Chehab    :stub-columns: 0
39554f38fcaSMauro Carvalho Chehab
39654f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_NONE``
39754f38fcaSMauro Carvalho Chehab      - The scene mode feature is disabled.
39854f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_BACKLIGHT``
39954f38fcaSMauro Carvalho Chehab      - Backlight. Compensates for dark shadows when light is coming from
40054f38fcaSMauro Carvalho Chehab	behind a subject, also by automatically turning on the flash.
40154f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_BEACH_SNOW``
40254f38fcaSMauro Carvalho Chehab      - Beach and snow. This mode compensates for all-white or bright
40354f38fcaSMauro Carvalho Chehab	scenes, which tend to look gray and low contrast, when camera's
40454f38fcaSMauro Carvalho Chehab	automatic exposure is based on an average scene brightness. To
40554f38fcaSMauro Carvalho Chehab	compensate, this mode automatically slightly overexposes the
40654f38fcaSMauro Carvalho Chehab	frames. The white balance may also be adjusted to compensate for
40754f38fcaSMauro Carvalho Chehab	the fact that reflected snow looks bluish rather than white.
40854f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_CANDLELIGHT``
40954f38fcaSMauro Carvalho Chehab      - Candle light. The camera generally raises the ISO sensitivity and
41054f38fcaSMauro Carvalho Chehab	lowers the shutter speed. This mode compensates for relatively
41154f38fcaSMauro Carvalho Chehab	close subject in the scene. The flash is disabled in order to
41254f38fcaSMauro Carvalho Chehab	preserve the ambiance of the light.
41354f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_DAWN_DUSK``
41454f38fcaSMauro Carvalho Chehab      - Dawn and dusk. Preserves the colors seen in low natural light
41554f38fcaSMauro Carvalho Chehab	before dusk and after down. The camera may turn off the flash, and
41654f38fcaSMauro Carvalho Chehab	automatically focus at infinity. It will usually boost saturation
41754f38fcaSMauro Carvalho Chehab	and lower the shutter speed.
41854f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_FALL_COLORS``
41954f38fcaSMauro Carvalho Chehab      - Fall colors. Increases saturation and adjusts white balance for
42054f38fcaSMauro Carvalho Chehab	color enhancement. Pictures of autumn leaves get saturated reds
42154f38fcaSMauro Carvalho Chehab	and yellows.
42254f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_FIREWORKS``
42354f38fcaSMauro Carvalho Chehab      - Fireworks. Long exposure times are used to capture the expanding
42454f38fcaSMauro Carvalho Chehab	burst of light from a firework. The camera may invoke image
42554f38fcaSMauro Carvalho Chehab	stabilization.
42654f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_LANDSCAPE``
42754f38fcaSMauro Carvalho Chehab      - Landscape. The camera may choose a small aperture to provide deep
42854f38fcaSMauro Carvalho Chehab	depth of field and long exposure duration to help capture detail
42954f38fcaSMauro Carvalho Chehab	in dim light conditions. The focus is fixed at infinity. Suitable
43054f38fcaSMauro Carvalho Chehab	for distant and wide scenery.
43154f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_NIGHT``
43254f38fcaSMauro Carvalho Chehab      - Night, also known as Night Landscape. Designed for low light
43354f38fcaSMauro Carvalho Chehab	conditions, it preserves detail in the dark areas without blowing
43454f38fcaSMauro Carvalho Chehab	out bright objects. The camera generally sets itself to a
43554f38fcaSMauro Carvalho Chehab	medium-to-high ISO sensitivity, with a relatively long exposure
43654f38fcaSMauro Carvalho Chehab	time, and turns flash off. As such, there will be increased image
43754f38fcaSMauro Carvalho Chehab	noise and the possibility of blurred image.
43854f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_PARTY_INDOOR``
43954f38fcaSMauro Carvalho Chehab      - Party and indoor. Designed to capture indoor scenes that are lit
44054f38fcaSMauro Carvalho Chehab	by indoor background lighting as well as the flash. The camera
44154f38fcaSMauro Carvalho Chehab	usually increases ISO sensitivity, and adjusts exposure for the
44254f38fcaSMauro Carvalho Chehab	low light conditions.
44354f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_PORTRAIT``
44454f38fcaSMauro Carvalho Chehab      - Portrait. The camera adjusts the aperture so that the depth of
44554f38fcaSMauro Carvalho Chehab	field is reduced, which helps to isolate the subject against a
44654f38fcaSMauro Carvalho Chehab	smooth background. Most cameras recognize the presence of faces in
44754f38fcaSMauro Carvalho Chehab	the scene and focus on them. The color hue is adjusted to enhance
44854f38fcaSMauro Carvalho Chehab	skin tones. The intensity of the flash is often reduced.
44954f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_SPORTS``
45054f38fcaSMauro Carvalho Chehab      - Sports. Significantly increases ISO and uses a fast shutter speed
45154f38fcaSMauro Carvalho Chehab	to freeze motion of rapidly-moving subjects. Increased image noise
45254f38fcaSMauro Carvalho Chehab	may be seen in this mode.
45354f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_SUNSET``
45454f38fcaSMauro Carvalho Chehab      - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
45554f38fcaSMauro Carvalho Chehab	up the saturation.
45654f38fcaSMauro Carvalho Chehab    * - ``V4L2_SCENE_MODE_TEXT``
45754f38fcaSMauro Carvalho Chehab      - Text. It applies extra contrast and sharpness, it is typically a
45854f38fcaSMauro Carvalho Chehab	black-and-white mode optimized for readability. Automatic focus
45954f38fcaSMauro Carvalho Chehab	may be switched to close-up mode and this setting may also involve
46054f38fcaSMauro Carvalho Chehab	some lens-distortion correction.
46154f38fcaSMauro Carvalho Chehab
46254f38fcaSMauro Carvalho Chehab.. raw:: latex
46354f38fcaSMauro Carvalho Chehab
46454f38fcaSMauro Carvalho Chehab    \normalsize
46554f38fcaSMauro Carvalho Chehab
46654f38fcaSMauro Carvalho Chehab
46754f38fcaSMauro Carvalho Chehab``V4L2_CID_3A_LOCK (bitmask)``
46854f38fcaSMauro Carvalho Chehab    This control locks or unlocks the automatic focus, exposure and
46954f38fcaSMauro Carvalho Chehab    white balance. The automatic adjustments can be paused independently
47054f38fcaSMauro Carvalho Chehab    by setting the corresponding lock bit to 1. The camera then retains
47154f38fcaSMauro Carvalho Chehab    the settings until the lock bit is cleared. The following lock bits
47254f38fcaSMauro Carvalho Chehab    are defined:
47354f38fcaSMauro Carvalho Chehab
47454f38fcaSMauro Carvalho Chehab    When a given algorithm is not enabled, drivers should ignore
47554f38fcaSMauro Carvalho Chehab    requests to lock it and should return no error. An example might be
47654f38fcaSMauro Carvalho Chehab    an application setting bit ``V4L2_LOCK_WHITE_BALANCE`` when the
47754f38fcaSMauro Carvalho Chehab    ``V4L2_CID_AUTO_WHITE_BALANCE`` control is set to ``FALSE``. The
47854f38fcaSMauro Carvalho Chehab    value of this control may be changed by exposure, white balance or
47954f38fcaSMauro Carvalho Chehab    focus controls.
48054f38fcaSMauro Carvalho Chehab
48154f38fcaSMauro Carvalho Chehab
48254f38fcaSMauro Carvalho Chehab
48354f38fcaSMauro Carvalho Chehab.. flat-table::
48454f38fcaSMauro Carvalho Chehab    :header-rows:  0
48554f38fcaSMauro Carvalho Chehab    :stub-columns: 0
48654f38fcaSMauro Carvalho Chehab
48754f38fcaSMauro Carvalho Chehab    * - ``V4L2_LOCK_EXPOSURE``
48854f38fcaSMauro Carvalho Chehab      - Automatic exposure adjustments lock.
48954f38fcaSMauro Carvalho Chehab    * - ``V4L2_LOCK_WHITE_BALANCE``
49054f38fcaSMauro Carvalho Chehab      - Automatic white balance adjustments lock.
49154f38fcaSMauro Carvalho Chehab    * - ``V4L2_LOCK_FOCUS``
49254f38fcaSMauro Carvalho Chehab      - Automatic focus lock.
49354f38fcaSMauro Carvalho Chehab
49454f38fcaSMauro Carvalho Chehab
49554f38fcaSMauro Carvalho Chehab
49654f38fcaSMauro Carvalho Chehab``V4L2_CID_PAN_SPEED (integer)``
49754f38fcaSMauro Carvalho Chehab    This control turns the camera horizontally at the specific speed.
49854f38fcaSMauro Carvalho Chehab    The unit is undefined. A positive value moves the camera to the
49954f38fcaSMauro Carvalho Chehab    right (clockwise when viewed from above), a negative value to the
50054f38fcaSMauro Carvalho Chehab    left. A value of zero stops the motion if one is in progress and has
50154f38fcaSMauro Carvalho Chehab    no effect otherwise.
50254f38fcaSMauro Carvalho Chehab
50354f38fcaSMauro Carvalho Chehab``V4L2_CID_TILT_SPEED (integer)``
50454f38fcaSMauro Carvalho Chehab    This control turns the camera vertically at the specified speed. The
50554f38fcaSMauro Carvalho Chehab    unit is undefined. A positive value moves the camera up, a negative
50654f38fcaSMauro Carvalho Chehab    value down. A value of zero stops the motion if one is in progress
50754f38fcaSMauro Carvalho Chehab    and has no effect otherwise.
50854f38fcaSMauro Carvalho Chehab
509*71511a24SSakari Ailus.. _v4l2-camera-sensor-orientation:
510*71511a24SSakari Ailus
5119397a83fSJacopo Mondi``V4L2_CID_CAMERA_ORIENTATION (menu)``
5129397a83fSJacopo Mondi    This read-only control describes the camera orientation by reporting its
5139397a83fSJacopo Mondi    mounting position on the device where the camera is installed. The control
5149397a83fSJacopo Mondi    value is constant and not modifiable by software. This control is
5159397a83fSJacopo Mondi    particularly meaningful for devices which have a well defined orientation,
5169397a83fSJacopo Mondi    such as phones, laptops and portable devices since the control is expressed
5179397a83fSJacopo Mondi    as a position relative to the device's intended usage orientation. For
5189397a83fSJacopo Mondi    example, a camera installed on the user-facing side of a phone, a tablet or
5199397a83fSJacopo Mondi    a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT``
5209397a83fSJacopo Mondi    orientation, while a camera installed on the opposite side of the front one
5219397a83fSJacopo Mondi    is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera
5229397a83fSJacopo Mondi    sensors not directly attached to the device, or attached in a way that
5239397a83fSJacopo Mondi    allows them to move freely, such as webcams and digital cameras, are said to
5249397a83fSJacopo Mondi    have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation.
5259397a83fSJacopo Mondi
5269397a83fSJacopo Mondi
527fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{7.7cm}|p{9.8cm}|
5289397a83fSJacopo Mondi
5299397a83fSJacopo Mondi.. flat-table::
5309397a83fSJacopo Mondi    :header-rows:  0
5319397a83fSJacopo Mondi    :stub-columns: 0
5329397a83fSJacopo Mondi
5339397a83fSJacopo Mondi    * - ``V4L2_CAMERA_ORIENTATION_FRONT``
5349397a83fSJacopo Mondi      - The camera is oriented towards the user facing side of the device.
5359397a83fSJacopo Mondi    * - ``V4L2_CAMERA_ORIENTATION_BACK``
5369397a83fSJacopo Mondi      - The camera is oriented towards the back facing side of the device.
5379397a83fSJacopo Mondi    * - ``V4L2_CAMERA_ORIENTATION_EXTERNAL``
5389397a83fSJacopo Mondi      - The camera is not directly attached to the device and is freely movable.
5399397a83fSJacopo Mondi
5409397a83fSJacopo Mondi
541*71511a24SSakari Ailus.. _v4l2-camera-sensor-rotation:
5429397a83fSJacopo Mondi
5439926c224SJacopo Mondi``V4L2_CID_CAMERA_SENSOR_ROTATION (integer)``
5449926c224SJacopo Mondi    This read-only control describes the rotation correction in degrees in the
5459926c224SJacopo Mondi    counter-clockwise direction to be applied to the captured images once
5469926c224SJacopo Mondi    captured to memory to compensate for the camera sensor mounting rotation.
5479926c224SJacopo Mondi
5489926c224SJacopo Mondi    For a precise definition of the sensor mounting rotation refer to the
5499926c224SJacopo Mondi    extensive description of the 'rotation' properties in the device tree
5509926c224SJacopo Mondi    bindings file 'video-interfaces.txt'.
5519926c224SJacopo Mondi
5529926c224SJacopo Mondi    A few examples are below reported, using a shark swimming from left to
5539926c224SJacopo Mondi    right in front of the user as the example scene to capture. ::
5549926c224SJacopo Mondi
5559926c224SJacopo Mondi                 0               X-axis
5569926c224SJacopo Mondi               0 +------------------------------------->
5579926c224SJacopo Mondi                 !
5589926c224SJacopo Mondi                 !
5599926c224SJacopo Mondi                 !
5609926c224SJacopo Mondi                 !           |\____)\___
5619926c224SJacopo Mondi                 !           ) _____  __`<
5629926c224SJacopo Mondi                 !           |/     )/
5639926c224SJacopo Mondi                 !
5649926c224SJacopo Mondi                 !
5659926c224SJacopo Mondi                 !
5669926c224SJacopo Mondi                 V
5679926c224SJacopo Mondi               Y-axis
5689926c224SJacopo Mondi
5699926c224SJacopo Mondi    Example one - Webcam
5709926c224SJacopo Mondi
5719926c224SJacopo Mondi    Assuming you can bring your laptop with you while swimming with sharks,
5729926c224SJacopo Mondi    the camera module of the laptop is installed on the user facing part of a
5739926c224SJacopo Mondi    laptop screen casing, and is typically used for video calls. The captured
5749926c224SJacopo Mondi    images are meant to be displayed in landscape mode (width > height) on the
5759926c224SJacopo Mondi    laptop screen.
5769926c224SJacopo Mondi
5779926c224SJacopo Mondi    The camera is typically mounted upside-down to compensate the lens optical
5789926c224SJacopo Mondi    inversion effect. In this case the value of the
5799926c224SJacopo Mondi    V4L2_CID_CAMERA_SENSOR_ROTATION control is 0, no rotation is required to
5809926c224SJacopo Mondi    display images correctly to the user.
5819926c224SJacopo Mondi
5829926c224SJacopo Mondi    If the camera sensor is not mounted upside-down it is required to compensate
5839926c224SJacopo Mondi    the lens optical inversion effect and the value of the
5849926c224SJacopo Mondi    V4L2_CID_CAMERA_SENSOR_ROTATION control is 180 degrees, as images will
5859926c224SJacopo Mondi    result rotated when captured to memory. ::
5869926c224SJacopo Mondi
5879926c224SJacopo Mondi                 +--------------------------------------+
5889926c224SJacopo Mondi                 !                                      !
5899926c224SJacopo Mondi                 !                                      !
5909926c224SJacopo Mondi                 !                                      !
5919926c224SJacopo Mondi                 !              __/(_____/|             !
5929926c224SJacopo Mondi                 !            >.___  ____ (             !
5939926c224SJacopo Mondi                 !                 \(    \|             !
5949926c224SJacopo Mondi                 !                                      !
5959926c224SJacopo Mondi                 !                                      !
5969926c224SJacopo Mondi                 !                                      !
5979926c224SJacopo Mondi                 +--------------------------------------+
5989926c224SJacopo Mondi
5999926c224SJacopo Mondi    A software rotation correction of 180 degrees has to be applied to correctly
6009926c224SJacopo Mondi    display the image on the user screen. ::
6019926c224SJacopo Mondi
6029926c224SJacopo Mondi                 +--------------------------------------+
6039926c224SJacopo Mondi                 !                                      !
6049926c224SJacopo Mondi                 !                                      !
6059926c224SJacopo Mondi                 !                                      !
6069926c224SJacopo Mondi                 !             |\____)\___              !
6079926c224SJacopo Mondi                 !             ) _____  __`<            !
6089926c224SJacopo Mondi                 !             |/     )/                !
6099926c224SJacopo Mondi                 !                                      !
6109926c224SJacopo Mondi                 !                                      !
6119926c224SJacopo Mondi                 !                                      !
6129926c224SJacopo Mondi                 +--------------------------------------+
6139926c224SJacopo Mondi
6149926c224SJacopo Mondi    Example two - Phone camera
6159926c224SJacopo Mondi
6169926c224SJacopo Mondi    It is more handy to go and swim with sharks with only your mobile phone
6179926c224SJacopo Mondi    with you and take pictures with the camera that is installed on the back
6189926c224SJacopo Mondi    side of the device, facing away from the user. The captured images are meant
6199926c224SJacopo Mondi    to be displayed in portrait mode (height > width) to match the device screen
6209926c224SJacopo Mondi    orientation and the device usage orientation used when taking the picture.
6219926c224SJacopo Mondi
6229926c224SJacopo Mondi    The camera sensor is typically mounted with its pixel array longer side
6239926c224SJacopo Mondi    aligned to the device longer side, upside-down mounted to compensate for
6249926c224SJacopo Mondi    the lens optical inversion effect.
6259926c224SJacopo Mondi
6269926c224SJacopo Mondi    The images once captured to memory will be rotated and the value of the
6279926c224SJacopo Mondi    V4L2_CID_CAMERA_SENSOR_ROTATION will report a 90 degree rotation. ::
6289926c224SJacopo Mondi
6299926c224SJacopo Mondi
6309926c224SJacopo Mondi                 +-------------------------------------+
6319926c224SJacopo Mondi                 |                 _ _                 |
6329926c224SJacopo Mondi                 |                \   /                |
6339926c224SJacopo Mondi                 |                 | |                 |
6349926c224SJacopo Mondi                 |                 | |                 |
6359926c224SJacopo Mondi                 |                 |  >                |
6369926c224SJacopo Mondi                 |                <  |                 |
6379926c224SJacopo Mondi                 |                 | |                 |
6389926c224SJacopo Mondi                 |                   .                 |
6399926c224SJacopo Mondi                 |                  V                  |
6409926c224SJacopo Mondi                 +-------------------------------------+
6419926c224SJacopo Mondi
6429926c224SJacopo Mondi    A correction of 90 degrees in counter-clockwise direction has to be
6439926c224SJacopo Mondi    applied to correctly display the image in portrait mode on the device
6449926c224SJacopo Mondi    screen. ::
6459926c224SJacopo Mondi
6469926c224SJacopo Mondi                          +--------------------+
6479926c224SJacopo Mondi                          |                    |
6489926c224SJacopo Mondi                          |                    |
6499926c224SJacopo Mondi                          |                    |
6509926c224SJacopo Mondi                          |                    |
6519926c224SJacopo Mondi                          |                    |
6529926c224SJacopo Mondi                          |                    |
6539926c224SJacopo Mondi                          |   |\____)\___      |
6549926c224SJacopo Mondi                          |   ) _____  __`<    |
6559926c224SJacopo Mondi                          |   |/     )/        |
6569926c224SJacopo Mondi                          |                    |
6579926c224SJacopo Mondi                          |                    |
6589926c224SJacopo Mondi                          |                    |
6599926c224SJacopo Mondi                          |                    |
6609926c224SJacopo Mondi                          |                    |
6619926c224SJacopo Mondi                          +--------------------+
6629926c224SJacopo Mondi
6639926c224SJacopo Mondi
66454f38fcaSMauro Carvalho Chehab.. [#f1]
66554f38fcaSMauro Carvalho Chehab   This control may be changed to a menu control in the future, if more
66654f38fcaSMauro Carvalho Chehab   options are required.
6677673f305SBenjamin Mugnier
6687673f305SBenjamin Mugnier``V4L2_CID_HDR_SENSOR_MODE (menu)``
6697673f305SBenjamin Mugnier    Change the sensor HDR mode. A HDR picture is obtained by merging two
6707673f305SBenjamin Mugnier    captures of the same scene using two different exposure periods. HDR mode
6717673f305SBenjamin Mugnier    describes the way these two captures are merged in the sensor.
6727673f305SBenjamin Mugnier
6737673f305SBenjamin Mugnier    As modes differ for each sensor, menu items are not standardized by this
6747673f305SBenjamin Mugnier    control and are left to the programmer.
675