1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun.. _camera-controls: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun************************ 6*4882a593SmuzhiyunCamera Control Reference 7*4882a593Smuzhiyun************************ 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunThe Camera class includes controls for mechanical (or equivalent 10*4882a593Smuzhiyundigital) features of a device such as controllable lenses or sensors. 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun.. _camera-control-id: 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunCamera Control IDs 16*4882a593Smuzhiyun================== 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun``V4L2_CID_CAMERA_CLASS (class)`` 19*4882a593Smuzhiyun The Camera class descriptor. Calling 20*4882a593Smuzhiyun :ref:`VIDIOC_QUERYCTRL` for this control will 21*4882a593Smuzhiyun return a description of this control class. 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun.. _v4l2-exposure-auto-type: 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun``V4L2_CID_EXPOSURE_AUTO`` 26*4882a593Smuzhiyun (enum) 27*4882a593Smuzhiyun 28*4882a593Smuzhiyunenum v4l2_exposure_auto_type - 29*4882a593Smuzhiyun Enables automatic adjustments of the exposure time and/or iris 30*4882a593Smuzhiyun aperture. The effect of manual changes of the exposure time or iris 31*4882a593Smuzhiyun aperture while these features are enabled is undefined, drivers 32*4882a593Smuzhiyun should ignore such requests. Possible values are: 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun.. flat-table:: 37*4882a593Smuzhiyun :header-rows: 0 38*4882a593Smuzhiyun :stub-columns: 0 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_AUTO`` 41*4882a593Smuzhiyun - Automatic exposure time, automatic iris aperture. 42*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_MANUAL`` 43*4882a593Smuzhiyun - Manual exposure time, manual iris. 44*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_SHUTTER_PRIORITY`` 45*4882a593Smuzhiyun - Manual exposure time, auto iris. 46*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_APERTURE_PRIORITY`` 47*4882a593Smuzhiyun - Auto exposure time, manual iris. 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun``V4L2_CID_EXPOSURE_ABSOLUTE (integer)`` 52*4882a593Smuzhiyun Determines the exposure time of the camera sensor. The exposure time 53*4882a593Smuzhiyun is limited by the frame interval. Drivers should interpret the 54*4882a593Smuzhiyun values as 100 µs units, where the value 1 stands for 1/10000th of a 55*4882a593Smuzhiyun second, 10000 for 1 second and 100000 for 10 seconds. 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun``V4L2_CID_EXPOSURE_AUTO_PRIORITY (boolean)`` 58*4882a593Smuzhiyun When ``V4L2_CID_EXPOSURE_AUTO`` is set to ``AUTO`` or 59*4882a593Smuzhiyun ``APERTURE_PRIORITY``, this control determines if the device may 60*4882a593Smuzhiyun dynamically vary the frame rate. By default this feature is disabled 61*4882a593Smuzhiyun (0) and the frame rate must remain constant. 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun``V4L2_CID_AUTO_EXPOSURE_BIAS (integer menu)`` 64*4882a593Smuzhiyun Determines the automatic exposure compensation, it is effective only 65*4882a593Smuzhiyun when ``V4L2_CID_EXPOSURE_AUTO`` control is set to ``AUTO``, 66*4882a593Smuzhiyun ``SHUTTER_PRIORITY`` or ``APERTURE_PRIORITY``. It is expressed in 67*4882a593Smuzhiyun terms of EV, drivers should interpret the values as 0.001 EV units, 68*4882a593Smuzhiyun where the value 1000 stands for +1 EV. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun Increasing the exposure compensation value is equivalent to 71*4882a593Smuzhiyun decreasing the exposure value (EV) and will increase the amount of 72*4882a593Smuzhiyun light at the image sensor. The camera performs the exposure 73*4882a593Smuzhiyun compensation by adjusting absolute exposure time and/or aperture. 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun.. _v4l2-exposure-metering: 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun``V4L2_CID_EXPOSURE_METERING`` 78*4882a593Smuzhiyun (enum) 79*4882a593Smuzhiyun 80*4882a593Smuzhiyunenum v4l2_exposure_metering - 81*4882a593Smuzhiyun Determines how the camera measures the amount of light available for 82*4882a593Smuzhiyun the frame exposure. Possible values are: 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun.. tabularcolumns:: |p{8.7cm}|p{8.8cm}| 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun.. flat-table:: 87*4882a593Smuzhiyun :header-rows: 0 88*4882a593Smuzhiyun :stub-columns: 0 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_METERING_AVERAGE`` 91*4882a593Smuzhiyun - Use the light information coming from the entire frame and average 92*4882a593Smuzhiyun giving no weighting to any particular portion of the metered area. 93*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED`` 94*4882a593Smuzhiyun - Average the light information coming from the entire frame giving 95*4882a593Smuzhiyun priority to the center of the metered area. 96*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_METERING_SPOT`` 97*4882a593Smuzhiyun - Measure only very small area at the center of the frame. 98*4882a593Smuzhiyun * - ``V4L2_EXPOSURE_METERING_MATRIX`` 99*4882a593Smuzhiyun - A multi-zone metering. The light intensity is measured in several 100*4882a593Smuzhiyun points of the frame and the results are combined. The algorithm of 101*4882a593Smuzhiyun the zones selection and their significance in calculating the 102*4882a593Smuzhiyun final value is device dependent. 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun``V4L2_CID_PAN_RELATIVE (integer)`` 107*4882a593Smuzhiyun This control turns the camera horizontally by the specified amount. 108*4882a593Smuzhiyun The unit is undefined. A positive value moves the camera to the 109*4882a593Smuzhiyun right (clockwise when viewed from above), a negative value to the 110*4882a593Smuzhiyun left. A value of zero does not cause motion. This is a write-only 111*4882a593Smuzhiyun control. 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun``V4L2_CID_TILT_RELATIVE (integer)`` 114*4882a593Smuzhiyun This control turns the camera vertically by the specified amount. 115*4882a593Smuzhiyun The unit is undefined. A positive value moves the camera up, a 116*4882a593Smuzhiyun negative value down. A value of zero does not cause motion. This is 117*4882a593Smuzhiyun a write-only control. 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun``V4L2_CID_PAN_RESET (button)`` 120*4882a593Smuzhiyun When this control is set, the camera moves horizontally to the 121*4882a593Smuzhiyun default position. 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun``V4L2_CID_TILT_RESET (button)`` 124*4882a593Smuzhiyun When this control is set, the camera moves vertically to the default 125*4882a593Smuzhiyun position. 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun``V4L2_CID_PAN_ABSOLUTE (integer)`` 128*4882a593Smuzhiyun This control turns the camera horizontally to the specified 129*4882a593Smuzhiyun position. Positive values move the camera to the right (clockwise 130*4882a593Smuzhiyun when viewed from above), negative values to the left. Drivers should 131*4882a593Smuzhiyun interpret the values as arc seconds, with valid values between -180 132*4882a593Smuzhiyun * 3600 and +180 * 3600 inclusive. 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun``V4L2_CID_TILT_ABSOLUTE (integer)`` 135*4882a593Smuzhiyun This control turns the camera vertically to the specified position. 136*4882a593Smuzhiyun Positive values move the camera up, negative values down. Drivers 137*4882a593Smuzhiyun should interpret the values as arc seconds, with valid values 138*4882a593Smuzhiyun between -180 * 3600 and +180 * 3600 inclusive. 139*4882a593Smuzhiyun 140*4882a593Smuzhiyun``V4L2_CID_FOCUS_ABSOLUTE (integer)`` 141*4882a593Smuzhiyun This control sets the focal point of the camera to the specified 142*4882a593Smuzhiyun position. The unit is undefined. Positive values set the focus 143*4882a593Smuzhiyun closer to the camera, negative values towards infinity. 144*4882a593Smuzhiyun 145*4882a593Smuzhiyun``V4L2_CID_FOCUS_RELATIVE (integer)`` 146*4882a593Smuzhiyun This control moves the focal point of the camera by the specified 147*4882a593Smuzhiyun amount. The unit is undefined. Positive values move the focus closer 148*4882a593Smuzhiyun to the camera, negative values towards infinity. This is a 149*4882a593Smuzhiyun write-only control. 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun``V4L2_CID_FOCUS_AUTO (boolean)`` 152*4882a593Smuzhiyun Enables continuous automatic focus adjustments. The effect of manual 153*4882a593Smuzhiyun focus adjustments while this feature is enabled is undefined, 154*4882a593Smuzhiyun drivers should ignore such requests. 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun``V4L2_CID_AUTO_FOCUS_START (button)`` 157*4882a593Smuzhiyun Starts single auto focus process. The effect of setting this control 158*4882a593Smuzhiyun when ``V4L2_CID_FOCUS_AUTO`` is set to ``TRUE`` (1) is undefined, 159*4882a593Smuzhiyun drivers should ignore such requests. 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun``V4L2_CID_AUTO_FOCUS_STOP (button)`` 162*4882a593Smuzhiyun Aborts automatic focusing started with ``V4L2_CID_AUTO_FOCUS_START`` 163*4882a593Smuzhiyun control. It is effective only when the continuous autofocus is 164*4882a593Smuzhiyun disabled, that is when ``V4L2_CID_FOCUS_AUTO`` control is set to 165*4882a593Smuzhiyun ``FALSE`` (0). 166*4882a593Smuzhiyun 167*4882a593Smuzhiyun.. _v4l2-auto-focus-status: 168*4882a593Smuzhiyun 169*4882a593Smuzhiyun``V4L2_CID_AUTO_FOCUS_STATUS (bitmask)`` 170*4882a593Smuzhiyun The automatic focus status. This is a read-only control. 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun Setting ``V4L2_LOCK_FOCUS`` lock bit of the ``V4L2_CID_3A_LOCK`` 173*4882a593Smuzhiyun control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS`` 174*4882a593Smuzhiyun control value. 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun.. tabularcolumns:: |p{6.7cm}|p{10.8cm}| 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun.. flat-table:: 179*4882a593Smuzhiyun :header-rows: 0 180*4882a593Smuzhiyun :stub-columns: 0 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_STATUS_IDLE`` 183*4882a593Smuzhiyun - Automatic focus is not active. 184*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_STATUS_BUSY`` 185*4882a593Smuzhiyun - Automatic focusing is in progress. 186*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_STATUS_REACHED`` 187*4882a593Smuzhiyun - Focus has been reached. 188*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_STATUS_FAILED`` 189*4882a593Smuzhiyun - Automatic focus has failed, the driver will not transition from 190*4882a593Smuzhiyun this state until another action is performed by an application. 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun 193*4882a593Smuzhiyun 194*4882a593Smuzhiyun.. _v4l2-auto-focus-range: 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun``V4L2_CID_AUTO_FOCUS_RANGE`` 197*4882a593Smuzhiyun (enum) 198*4882a593Smuzhiyun 199*4882a593Smuzhiyunenum v4l2_auto_focus_range - 200*4882a593Smuzhiyun Determines auto focus distance range for which lens may be adjusted. 201*4882a593Smuzhiyun 202*4882a593Smuzhiyun.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| 203*4882a593Smuzhiyun 204*4882a593Smuzhiyun.. flat-table:: 205*4882a593Smuzhiyun :header-rows: 0 206*4882a593Smuzhiyun :stub-columns: 0 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_RANGE_AUTO`` 209*4882a593Smuzhiyun - The camera automatically selects the focus range. 210*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_RANGE_NORMAL`` 211*4882a593Smuzhiyun - Normal distance range, limited for best automatic focus 212*4882a593Smuzhiyun performance. 213*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_RANGE_MACRO`` 214*4882a593Smuzhiyun - Macro (close-up) auto focus. The camera will use its minimum 215*4882a593Smuzhiyun possible distance for auto focus. 216*4882a593Smuzhiyun * - ``V4L2_AUTO_FOCUS_RANGE_INFINITY`` 217*4882a593Smuzhiyun - The lens is set to focus on an object at infinite distance. 218*4882a593Smuzhiyun 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun``V4L2_CID_ZOOM_ABSOLUTE (integer)`` 222*4882a593Smuzhiyun Specify the objective lens focal length as an absolute value. The 223*4882a593Smuzhiyun zoom unit is driver-specific and its value should be a positive 224*4882a593Smuzhiyun integer. 225*4882a593Smuzhiyun 226*4882a593Smuzhiyun``V4L2_CID_ZOOM_RELATIVE (integer)`` 227*4882a593Smuzhiyun Specify the objective lens focal length relatively to the current 228*4882a593Smuzhiyun value. Positive values move the zoom lens group towards the 229*4882a593Smuzhiyun telephoto direction, negative values towards the wide-angle 230*4882a593Smuzhiyun direction. The zoom unit is driver-specific. This is a write-only 231*4882a593Smuzhiyun control. 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun``V4L2_CID_ZOOM_CONTINUOUS (integer)`` 234*4882a593Smuzhiyun Move the objective lens group at the specified speed until it 235*4882a593Smuzhiyun reaches physical device limits or until an explicit request to stop 236*4882a593Smuzhiyun the movement. A positive value moves the zoom lens group towards the 237*4882a593Smuzhiyun telephoto direction. A value of zero stops the zoom lens group 238*4882a593Smuzhiyun movement. A negative value moves the zoom lens group towards the 239*4882a593Smuzhiyun wide-angle direction. The zoom speed unit is driver-specific. 240*4882a593Smuzhiyun 241*4882a593Smuzhiyun``V4L2_CID_IRIS_ABSOLUTE (integer)`` 242*4882a593Smuzhiyun This control sets the camera's aperture to the specified value. The 243*4882a593Smuzhiyun unit is undefined. Larger values open the iris wider, smaller values 244*4882a593Smuzhiyun close it. 245*4882a593Smuzhiyun 246*4882a593Smuzhiyun``V4L2_CID_IRIS_RELATIVE (integer)`` 247*4882a593Smuzhiyun This control modifies the camera's aperture by the specified amount. 248*4882a593Smuzhiyun The unit is undefined. Positive values open the iris one step 249*4882a593Smuzhiyun further, negative values close it one step further. This is a 250*4882a593Smuzhiyun write-only control. 251*4882a593Smuzhiyun 252*4882a593Smuzhiyun``V4L2_CID_PRIVACY (boolean)`` 253*4882a593Smuzhiyun Prevent video from being acquired by the camera. When this control 254*4882a593Smuzhiyun is set to ``TRUE`` (1), no image can be captured by the camera. 255*4882a593Smuzhiyun Common means to enforce privacy are mechanical obturation of the 256*4882a593Smuzhiyun sensor and firmware image processing, but the device is not 257*4882a593Smuzhiyun restricted to these methods. Devices that implement the privacy 258*4882a593Smuzhiyun control must support read access and may support write access. 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun``V4L2_CID_BAND_STOP_FILTER (integer)`` 261*4882a593Smuzhiyun Switch the band-stop filter of a camera sensor on or off, or specify 262*4882a593Smuzhiyun its strength. Such band-stop filters can be used, for example, to 263*4882a593Smuzhiyun filter out the fluorescent light component. 264*4882a593Smuzhiyun 265*4882a593Smuzhiyun.. _v4l2-auto-n-preset-white-balance: 266*4882a593Smuzhiyun 267*4882a593Smuzhiyun``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE`` 268*4882a593Smuzhiyun (enum) 269*4882a593Smuzhiyun 270*4882a593Smuzhiyunenum v4l2_auto_n_preset_white_balance - 271*4882a593Smuzhiyun Sets white balance to automatic, manual or a preset. The presets 272*4882a593Smuzhiyun determine color temperature of the light as a hint to the camera for 273*4882a593Smuzhiyun white balance adjustments resulting in most accurate color 274*4882a593Smuzhiyun representation. The following white balance presets are listed in 275*4882a593Smuzhiyun order of increasing color temperature. 276*4882a593Smuzhiyun 277*4882a593Smuzhiyun.. tabularcolumns:: |p{7.2 cm}|p{10.3cm}| 278*4882a593Smuzhiyun 279*4882a593Smuzhiyun.. flat-table:: 280*4882a593Smuzhiyun :header-rows: 0 281*4882a593Smuzhiyun :stub-columns: 0 282*4882a593Smuzhiyun 283*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_MANUAL`` 284*4882a593Smuzhiyun - Manual white balance. 285*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_AUTO`` 286*4882a593Smuzhiyun - Automatic white balance adjustments. 287*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_INCANDESCENT`` 288*4882a593Smuzhiyun - White balance setting for incandescent (tungsten) lighting. It 289*4882a593Smuzhiyun generally cools down the colors and corresponds approximately to 290*4882a593Smuzhiyun 2500...3500 K color temperature range. 291*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_FLUORESCENT`` 292*4882a593Smuzhiyun - White balance preset for fluorescent lighting. It corresponds 293*4882a593Smuzhiyun approximately to 4000...5000 K color temperature. 294*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_FLUORESCENT_H`` 295*4882a593Smuzhiyun - With this setting the camera will compensate for fluorescent H 296*4882a593Smuzhiyun lighting. 297*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_HORIZON`` 298*4882a593Smuzhiyun - White balance setting for horizon daylight. It corresponds 299*4882a593Smuzhiyun approximately to 5000 K color temperature. 300*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_DAYLIGHT`` 301*4882a593Smuzhiyun - White balance preset for daylight (with clear sky). It corresponds 302*4882a593Smuzhiyun approximately to 5000...6500 K color temperature. 303*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_FLASH`` 304*4882a593Smuzhiyun - With this setting the camera will compensate for the flash light. 305*4882a593Smuzhiyun It slightly warms up the colors and corresponds roughly to 306*4882a593Smuzhiyun 5000...5500 K color temperature. 307*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_CLOUDY`` 308*4882a593Smuzhiyun - White balance preset for moderately overcast sky. This option 309*4882a593Smuzhiyun corresponds approximately to 6500...8000 K color temperature 310*4882a593Smuzhiyun range. 311*4882a593Smuzhiyun * - ``V4L2_WHITE_BALANCE_SHADE`` 312*4882a593Smuzhiyun - White balance preset for shade or heavily overcast sky. It 313*4882a593Smuzhiyun corresponds approximately to 9000...10000 K color temperature. 314*4882a593Smuzhiyun 315*4882a593Smuzhiyun 316*4882a593Smuzhiyun 317*4882a593Smuzhiyun.. _v4l2-wide-dynamic-range: 318*4882a593Smuzhiyun 319*4882a593Smuzhiyun``V4L2_CID_WIDE_DYNAMIC_RANGE (boolean)`` 320*4882a593Smuzhiyun Enables or disables the camera's wide dynamic range feature. This 321*4882a593Smuzhiyun feature allows to obtain clear images in situations where intensity 322*4882a593Smuzhiyun of the illumination varies significantly throughout the scene, i.e. 323*4882a593Smuzhiyun there are simultaneously very dark and very bright areas. It is most 324*4882a593Smuzhiyun commonly realized in cameras by combining two subsequent frames with 325*4882a593Smuzhiyun different exposure times. [#f1]_ 326*4882a593Smuzhiyun 327*4882a593Smuzhiyun.. _v4l2-image-stabilization: 328*4882a593Smuzhiyun 329*4882a593Smuzhiyun``V4L2_CID_IMAGE_STABILIZATION (boolean)`` 330*4882a593Smuzhiyun Enables or disables image stabilization. 331*4882a593Smuzhiyun 332*4882a593Smuzhiyun``V4L2_CID_ISO_SENSITIVITY (integer menu)`` 333*4882a593Smuzhiyun Determines ISO equivalent of an image sensor indicating the sensor's 334*4882a593Smuzhiyun sensitivity to light. The numbers are expressed in arithmetic scale, 335*4882a593Smuzhiyun as per :ref:`iso12232` standard, where doubling the sensor 336*4882a593Smuzhiyun sensitivity is represented by doubling the numerical ISO value. 337*4882a593Smuzhiyun Applications should interpret the values as standard ISO values 338*4882a593Smuzhiyun multiplied by 1000, e.g. control value 800 stands for ISO 0.8. 339*4882a593Smuzhiyun Drivers will usually support only a subset of standard ISO values. 340*4882a593Smuzhiyun The effect of setting this control while the 341*4882a593Smuzhiyun ``V4L2_CID_ISO_SENSITIVITY_AUTO`` control is set to a value other 342*4882a593Smuzhiyun than ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` is undefined, drivers 343*4882a593Smuzhiyun should ignore such requests. 344*4882a593Smuzhiyun 345*4882a593Smuzhiyun.. _v4l2-iso-sensitivity-auto-type: 346*4882a593Smuzhiyun 347*4882a593Smuzhiyun``V4L2_CID_ISO_SENSITIVITY_AUTO`` 348*4882a593Smuzhiyun (enum) 349*4882a593Smuzhiyun 350*4882a593Smuzhiyunenum v4l2_iso_sensitivity_type - 351*4882a593Smuzhiyun Enables or disables automatic ISO sensitivity adjustments. 352*4882a593Smuzhiyun 353*4882a593Smuzhiyun 354*4882a593Smuzhiyun 355*4882a593Smuzhiyun.. flat-table:: 356*4882a593Smuzhiyun :header-rows: 0 357*4882a593Smuzhiyun :stub-columns: 0 358*4882a593Smuzhiyun 359*4882a593Smuzhiyun * - ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` 360*4882a593Smuzhiyun - Manual ISO sensitivity. 361*4882a593Smuzhiyun * - ``V4L2_CID_ISO_SENSITIVITY_AUTO`` 362*4882a593Smuzhiyun - Automatic ISO sensitivity adjustments. 363*4882a593Smuzhiyun 364*4882a593Smuzhiyun 365*4882a593Smuzhiyun 366*4882a593Smuzhiyun.. _v4l2-scene-mode: 367*4882a593Smuzhiyun 368*4882a593Smuzhiyun``V4L2_CID_SCENE_MODE`` 369*4882a593Smuzhiyun (enum) 370*4882a593Smuzhiyun 371*4882a593Smuzhiyunenum v4l2_scene_mode - 372*4882a593Smuzhiyun This control allows to select scene programs as the camera automatic 373*4882a593Smuzhiyun modes optimized for common shooting scenes. Within these modes the 374*4882a593Smuzhiyun camera determines best exposure, aperture, focusing, light metering, 375*4882a593Smuzhiyun white balance and equivalent sensitivity. The controls of those 376*4882a593Smuzhiyun parameters are influenced by the scene mode control. An exact 377*4882a593Smuzhiyun behavior in each mode is subject to the camera specification. 378*4882a593Smuzhiyun 379*4882a593Smuzhiyun When the scene mode feature is not used, this control should be set 380*4882a593Smuzhiyun to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related 381*4882a593Smuzhiyun controls are accessible. The following scene programs are defined: 382*4882a593Smuzhiyun 383*4882a593Smuzhiyun.. raw:: latex 384*4882a593Smuzhiyun 385*4882a593Smuzhiyun \small 386*4882a593Smuzhiyun 387*4882a593Smuzhiyun.. tabularcolumns:: |p{5.9cm}|p{11.5cm}| 388*4882a593Smuzhiyun 389*4882a593Smuzhiyun.. flat-table:: 390*4882a593Smuzhiyun :header-rows: 0 391*4882a593Smuzhiyun :stub-columns: 0 392*4882a593Smuzhiyun 393*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_NONE`` 394*4882a593Smuzhiyun - The scene mode feature is disabled. 395*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_BACKLIGHT`` 396*4882a593Smuzhiyun - Backlight. Compensates for dark shadows when light is coming from 397*4882a593Smuzhiyun behind a subject, also by automatically turning on the flash. 398*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_BEACH_SNOW`` 399*4882a593Smuzhiyun - Beach and snow. This mode compensates for all-white or bright 400*4882a593Smuzhiyun scenes, which tend to look gray and low contrast, when camera's 401*4882a593Smuzhiyun automatic exposure is based on an average scene brightness. To 402*4882a593Smuzhiyun compensate, this mode automatically slightly overexposes the 403*4882a593Smuzhiyun frames. The white balance may also be adjusted to compensate for 404*4882a593Smuzhiyun the fact that reflected snow looks bluish rather than white. 405*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_CANDLELIGHT`` 406*4882a593Smuzhiyun - Candle light. The camera generally raises the ISO sensitivity and 407*4882a593Smuzhiyun lowers the shutter speed. This mode compensates for relatively 408*4882a593Smuzhiyun close subject in the scene. The flash is disabled in order to 409*4882a593Smuzhiyun preserve the ambiance of the light. 410*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_DAWN_DUSK`` 411*4882a593Smuzhiyun - Dawn and dusk. Preserves the colors seen in low natural light 412*4882a593Smuzhiyun before dusk and after down. The camera may turn off the flash, and 413*4882a593Smuzhiyun automatically focus at infinity. It will usually boost saturation 414*4882a593Smuzhiyun and lower the shutter speed. 415*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_FALL_COLORS`` 416*4882a593Smuzhiyun - Fall colors. Increases saturation and adjusts white balance for 417*4882a593Smuzhiyun color enhancement. Pictures of autumn leaves get saturated reds 418*4882a593Smuzhiyun and yellows. 419*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_FIREWORKS`` 420*4882a593Smuzhiyun - Fireworks. Long exposure times are used to capture the expanding 421*4882a593Smuzhiyun burst of light from a firework. The camera may invoke image 422*4882a593Smuzhiyun stabilization. 423*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_LANDSCAPE`` 424*4882a593Smuzhiyun - Landscape. The camera may choose a small aperture to provide deep 425*4882a593Smuzhiyun depth of field and long exposure duration to help capture detail 426*4882a593Smuzhiyun in dim light conditions. The focus is fixed at infinity. Suitable 427*4882a593Smuzhiyun for distant and wide scenery. 428*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_NIGHT`` 429*4882a593Smuzhiyun - Night, also known as Night Landscape. Designed for low light 430*4882a593Smuzhiyun conditions, it preserves detail in the dark areas without blowing 431*4882a593Smuzhiyun out bright objects. The camera generally sets itself to a 432*4882a593Smuzhiyun medium-to-high ISO sensitivity, with a relatively long exposure 433*4882a593Smuzhiyun time, and turns flash off. As such, there will be increased image 434*4882a593Smuzhiyun noise and the possibility of blurred image. 435*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_PARTY_INDOOR`` 436*4882a593Smuzhiyun - Party and indoor. Designed to capture indoor scenes that are lit 437*4882a593Smuzhiyun by indoor background lighting as well as the flash. The camera 438*4882a593Smuzhiyun usually increases ISO sensitivity, and adjusts exposure for the 439*4882a593Smuzhiyun low light conditions. 440*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_PORTRAIT`` 441*4882a593Smuzhiyun - Portrait. The camera adjusts the aperture so that the depth of 442*4882a593Smuzhiyun field is reduced, which helps to isolate the subject against a 443*4882a593Smuzhiyun smooth background. Most cameras recognize the presence of faces in 444*4882a593Smuzhiyun the scene and focus on them. The color hue is adjusted to enhance 445*4882a593Smuzhiyun skin tones. The intensity of the flash is often reduced. 446*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_SPORTS`` 447*4882a593Smuzhiyun - Sports. Significantly increases ISO and uses a fast shutter speed 448*4882a593Smuzhiyun to freeze motion of rapidly-moving subjects. Increased image noise 449*4882a593Smuzhiyun may be seen in this mode. 450*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_SUNSET`` 451*4882a593Smuzhiyun - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps 452*4882a593Smuzhiyun up the saturation. 453*4882a593Smuzhiyun * - ``V4L2_SCENE_MODE_TEXT`` 454*4882a593Smuzhiyun - Text. It applies extra contrast and sharpness, it is typically a 455*4882a593Smuzhiyun black-and-white mode optimized for readability. Automatic focus 456*4882a593Smuzhiyun may be switched to close-up mode and this setting may also involve 457*4882a593Smuzhiyun some lens-distortion correction. 458*4882a593Smuzhiyun 459*4882a593Smuzhiyun.. raw:: latex 460*4882a593Smuzhiyun 461*4882a593Smuzhiyun \normalsize 462*4882a593Smuzhiyun 463*4882a593Smuzhiyun 464*4882a593Smuzhiyun``V4L2_CID_3A_LOCK (bitmask)`` 465*4882a593Smuzhiyun This control locks or unlocks the automatic focus, exposure and 466*4882a593Smuzhiyun white balance. The automatic adjustments can be paused independently 467*4882a593Smuzhiyun by setting the corresponding lock bit to 1. The camera then retains 468*4882a593Smuzhiyun the settings until the lock bit is cleared. The following lock bits 469*4882a593Smuzhiyun are defined: 470*4882a593Smuzhiyun 471*4882a593Smuzhiyun When a given algorithm is not enabled, drivers should ignore 472*4882a593Smuzhiyun requests to lock it and should return no error. An example might be 473*4882a593Smuzhiyun an application setting bit ``V4L2_LOCK_WHITE_BALANCE`` when the 474*4882a593Smuzhiyun ``V4L2_CID_AUTO_WHITE_BALANCE`` control is set to ``FALSE``. The 475*4882a593Smuzhiyun value of this control may be changed by exposure, white balance or 476*4882a593Smuzhiyun focus controls. 477*4882a593Smuzhiyun 478*4882a593Smuzhiyun 479*4882a593Smuzhiyun 480*4882a593Smuzhiyun.. flat-table:: 481*4882a593Smuzhiyun :header-rows: 0 482*4882a593Smuzhiyun :stub-columns: 0 483*4882a593Smuzhiyun 484*4882a593Smuzhiyun * - ``V4L2_LOCK_EXPOSURE`` 485*4882a593Smuzhiyun - Automatic exposure adjustments lock. 486*4882a593Smuzhiyun * - ``V4L2_LOCK_WHITE_BALANCE`` 487*4882a593Smuzhiyun - Automatic white balance adjustments lock. 488*4882a593Smuzhiyun * - ``V4L2_LOCK_FOCUS`` 489*4882a593Smuzhiyun - Automatic focus lock. 490*4882a593Smuzhiyun 491*4882a593Smuzhiyun 492*4882a593Smuzhiyun 493*4882a593Smuzhiyun``V4L2_CID_PAN_SPEED (integer)`` 494*4882a593Smuzhiyun This control turns the camera horizontally at the specific speed. 495*4882a593Smuzhiyun The unit is undefined. A positive value moves the camera to the 496*4882a593Smuzhiyun right (clockwise when viewed from above), a negative value to the 497*4882a593Smuzhiyun left. A value of zero stops the motion if one is in progress and has 498*4882a593Smuzhiyun no effect otherwise. 499*4882a593Smuzhiyun 500*4882a593Smuzhiyun``V4L2_CID_TILT_SPEED (integer)`` 501*4882a593Smuzhiyun This control turns the camera vertically at the specified speed. The 502*4882a593Smuzhiyun unit is undefined. A positive value moves the camera up, a negative 503*4882a593Smuzhiyun value down. A value of zero stops the motion if one is in progress 504*4882a593Smuzhiyun and has no effect otherwise. 505*4882a593Smuzhiyun 506*4882a593Smuzhiyun``V4L2_CID_CAMERA_ORIENTATION (menu)`` 507*4882a593Smuzhiyun This read-only control describes the camera orientation by reporting its 508*4882a593Smuzhiyun mounting position on the device where the camera is installed. The control 509*4882a593Smuzhiyun value is constant and not modifiable by software. This control is 510*4882a593Smuzhiyun particularly meaningful for devices which have a well defined orientation, 511*4882a593Smuzhiyun such as phones, laptops and portable devices since the control is expressed 512*4882a593Smuzhiyun as a position relative to the device's intended usage orientation. For 513*4882a593Smuzhiyun example, a camera installed on the user-facing side of a phone, a tablet or 514*4882a593Smuzhiyun a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT`` 515*4882a593Smuzhiyun orientation, while a camera installed on the opposite side of the front one 516*4882a593Smuzhiyun is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera 517*4882a593Smuzhiyun sensors not directly attached to the device, or attached in a way that 518*4882a593Smuzhiyun allows them to move freely, such as webcams and digital cameras, are said to 519*4882a593Smuzhiyun have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation. 520*4882a593Smuzhiyun 521*4882a593Smuzhiyun 522*4882a593Smuzhiyun 523*4882a593Smuzhiyun.. flat-table:: 524*4882a593Smuzhiyun :header-rows: 0 525*4882a593Smuzhiyun :stub-columns: 0 526*4882a593Smuzhiyun 527*4882a593Smuzhiyun * - ``V4L2_CAMERA_ORIENTATION_FRONT`` 528*4882a593Smuzhiyun - The camera is oriented towards the user facing side of the device. 529*4882a593Smuzhiyun * - ``V4L2_CAMERA_ORIENTATION_BACK`` 530*4882a593Smuzhiyun - The camera is oriented towards the back facing side of the device. 531*4882a593Smuzhiyun * - ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` 532*4882a593Smuzhiyun - The camera is not directly attached to the device and is freely movable. 533*4882a593Smuzhiyun 534*4882a593Smuzhiyun 535*4882a593Smuzhiyun 536*4882a593Smuzhiyun``V4L2_CID_CAMERA_SENSOR_ROTATION (integer)`` 537*4882a593Smuzhiyun This read-only control describes the rotation correction in degrees in the 538*4882a593Smuzhiyun counter-clockwise direction to be applied to the captured images once 539*4882a593Smuzhiyun captured to memory to compensate for the camera sensor mounting rotation. 540*4882a593Smuzhiyun 541*4882a593Smuzhiyun For a precise definition of the sensor mounting rotation refer to the 542*4882a593Smuzhiyun extensive description of the 'rotation' properties in the device tree 543*4882a593Smuzhiyun bindings file 'video-interfaces.txt'. 544*4882a593Smuzhiyun 545*4882a593Smuzhiyun A few examples are below reported, using a shark swimming from left to 546*4882a593Smuzhiyun right in front of the user as the example scene to capture. :: 547*4882a593Smuzhiyun 548*4882a593Smuzhiyun 0 X-axis 549*4882a593Smuzhiyun 0 +-------------------------------------> 550*4882a593Smuzhiyun ! 551*4882a593Smuzhiyun ! 552*4882a593Smuzhiyun ! 553*4882a593Smuzhiyun ! |\____)\___ 554*4882a593Smuzhiyun ! ) _____ __`< 555*4882a593Smuzhiyun ! |/ )/ 556*4882a593Smuzhiyun ! 557*4882a593Smuzhiyun ! 558*4882a593Smuzhiyun ! 559*4882a593Smuzhiyun V 560*4882a593Smuzhiyun Y-axis 561*4882a593Smuzhiyun 562*4882a593Smuzhiyun Example one - Webcam 563*4882a593Smuzhiyun 564*4882a593Smuzhiyun Assuming you can bring your laptop with you while swimming with sharks, 565*4882a593Smuzhiyun the camera module of the laptop is installed on the user facing part of a 566*4882a593Smuzhiyun laptop screen casing, and is typically used for video calls. The captured 567*4882a593Smuzhiyun images are meant to be displayed in landscape mode (width > height) on the 568*4882a593Smuzhiyun laptop screen. 569*4882a593Smuzhiyun 570*4882a593Smuzhiyun The camera is typically mounted upside-down to compensate the lens optical 571*4882a593Smuzhiyun inversion effect. In this case the value of the 572*4882a593Smuzhiyun V4L2_CID_CAMERA_SENSOR_ROTATION control is 0, no rotation is required to 573*4882a593Smuzhiyun display images correctly to the user. 574*4882a593Smuzhiyun 575*4882a593Smuzhiyun If the camera sensor is not mounted upside-down it is required to compensate 576*4882a593Smuzhiyun the lens optical inversion effect and the value of the 577*4882a593Smuzhiyun V4L2_CID_CAMERA_SENSOR_ROTATION control is 180 degrees, as images will 578*4882a593Smuzhiyun result rotated when captured to memory. :: 579*4882a593Smuzhiyun 580*4882a593Smuzhiyun +--------------------------------------+ 581*4882a593Smuzhiyun ! ! 582*4882a593Smuzhiyun ! ! 583*4882a593Smuzhiyun ! ! 584*4882a593Smuzhiyun ! __/(_____/| ! 585*4882a593Smuzhiyun ! >.___ ____ ( ! 586*4882a593Smuzhiyun ! \( \| ! 587*4882a593Smuzhiyun ! ! 588*4882a593Smuzhiyun ! ! 589*4882a593Smuzhiyun ! ! 590*4882a593Smuzhiyun +--------------------------------------+ 591*4882a593Smuzhiyun 592*4882a593Smuzhiyun A software rotation correction of 180 degrees has to be applied to correctly 593*4882a593Smuzhiyun display the image on the user screen. :: 594*4882a593Smuzhiyun 595*4882a593Smuzhiyun +--------------------------------------+ 596*4882a593Smuzhiyun ! ! 597*4882a593Smuzhiyun ! ! 598*4882a593Smuzhiyun ! ! 599*4882a593Smuzhiyun ! |\____)\___ ! 600*4882a593Smuzhiyun ! ) _____ __`< ! 601*4882a593Smuzhiyun ! |/ )/ ! 602*4882a593Smuzhiyun ! ! 603*4882a593Smuzhiyun ! ! 604*4882a593Smuzhiyun ! ! 605*4882a593Smuzhiyun +--------------------------------------+ 606*4882a593Smuzhiyun 607*4882a593Smuzhiyun Example two - Phone camera 608*4882a593Smuzhiyun 609*4882a593Smuzhiyun It is more handy to go and swim with sharks with only your mobile phone 610*4882a593Smuzhiyun with you and take pictures with the camera that is installed on the back 611*4882a593Smuzhiyun side of the device, facing away from the user. The captured images are meant 612*4882a593Smuzhiyun to be displayed in portrait mode (height > width) to match the device screen 613*4882a593Smuzhiyun orientation and the device usage orientation used when taking the picture. 614*4882a593Smuzhiyun 615*4882a593Smuzhiyun The camera sensor is typically mounted with its pixel array longer side 616*4882a593Smuzhiyun aligned to the device longer side, upside-down mounted to compensate for 617*4882a593Smuzhiyun the lens optical inversion effect. 618*4882a593Smuzhiyun 619*4882a593Smuzhiyun The images once captured to memory will be rotated and the value of the 620*4882a593Smuzhiyun V4L2_CID_CAMERA_SENSOR_ROTATION will report a 90 degree rotation. :: 621*4882a593Smuzhiyun 622*4882a593Smuzhiyun 623*4882a593Smuzhiyun +-------------------------------------+ 624*4882a593Smuzhiyun | _ _ | 625*4882a593Smuzhiyun | \ / | 626*4882a593Smuzhiyun | | | | 627*4882a593Smuzhiyun | | | | 628*4882a593Smuzhiyun | | > | 629*4882a593Smuzhiyun | < | | 630*4882a593Smuzhiyun | | | | 631*4882a593Smuzhiyun | . | 632*4882a593Smuzhiyun | V | 633*4882a593Smuzhiyun +-------------------------------------+ 634*4882a593Smuzhiyun 635*4882a593Smuzhiyun A correction of 90 degrees in counter-clockwise direction has to be 636*4882a593Smuzhiyun applied to correctly display the image in portrait mode on the device 637*4882a593Smuzhiyun screen. :: 638*4882a593Smuzhiyun 639*4882a593Smuzhiyun +--------------------+ 640*4882a593Smuzhiyun | | 641*4882a593Smuzhiyun | | 642*4882a593Smuzhiyun | | 643*4882a593Smuzhiyun | | 644*4882a593Smuzhiyun | | 645*4882a593Smuzhiyun | | 646*4882a593Smuzhiyun | |\____)\___ | 647*4882a593Smuzhiyun | ) _____ __`< | 648*4882a593Smuzhiyun | |/ )/ | 649*4882a593Smuzhiyun | | 650*4882a593Smuzhiyun | | 651*4882a593Smuzhiyun | | 652*4882a593Smuzhiyun | | 653*4882a593Smuzhiyun | | 654*4882a593Smuzhiyun +--------------------+ 655*4882a593Smuzhiyun 656*4882a593Smuzhiyun 657*4882a593Smuzhiyun.. [#f1] 658*4882a593Smuzhiyun This control may be changed to a menu control in the future, if more 659*4882a593Smuzhiyun options are required. 660