Home | History | Annotate | Download | only in docs
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2012 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 <metadata xmlns="http://schemas.android.com/service/camera/metadata/"
     17 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     18 xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd">
     19 
     20   <tags>
     21     <tag id="AWB">
     22         Needed for auto white balance
     23     </tag>
     24     <tag id="BC">
     25         Needed for backwards compatibility with old Java API
     26     </tag>
     27     <tag id="V1">
     28         New features for first camera 2 release (API1)
     29     </tag>
     30     <tag id="ADV">
     31       <!-- TODO: fill the tag description -->
     32     </tag>
     33     <tag id="DNG">
     34         Needed for DNG file support
     35     </tag>
     36     <tag id="EXIF">
     37       <!-- TODO: fill the tag description -->
     38     </tag>
     39     <tag id="HAL2">
     40         Entry is only used by camera device HAL 2.x
     41     </tag>
     42     <tag id="FULL">
     43         Entry is required for full hardware level devices, and optional for other hardware levels
     44     </tag>
     45   </tags>
     46 
     47   <types>
     48     <typedef name="rectangle">
     49       <language name="java">android.graphics.Rect</language>
     50     </typedef>
     51     <typedef name="size">
     52       <language name="java">android.hardware.camera2.Size</language>
     53     </typedef>
     54     <typedef name="string">
     55       <language name="java">String</language>
     56     </typedef>
     57     <typedef name="boolean">
     58       <language name="java">boolean</language>
     59     </typedef>
     60     <typedef name="imageFormat">
     61       <language name="java">int</language>
     62     </typedef>
     63   </types>
     64 
     65   <namespace name="android">
     66     <section name="colorCorrection">
     67       <controls>
     68         <entry name="mode" type="byte" visibility="public" enum="true">
     69           <enum>
     70             <value>TRANSFORM_MATRIX
     71               <notes>Use the android.colorCorrection.transform matrix
     72               and android.colorCorrection.gains to do color conversion</notes>
     73             </value>
     74             <value>FAST
     75               <notes>Must not slow down frame rate relative to raw
     76               bayer output</notes>
     77             </value>
     78             <value>HIGH_QUALITY
     79               <notes>Frame rate may be reduced by high
     80               quality</notes>
     81             </value>
     82           </enum>
     83 
     84           <notes>When android.control.awbMode is not OFF, TRANSFORM_MATRIX
     85           should be ignored.</notes>
     86         </entry>
     87         <entry name="transform" type="rational" visibility="public"
     88                type_notes="3x3 rational matrix in row-major order"
     89                container="array">
     90           <array>
     91             <size>3</size>
     92             <size>3</size>
     93           </array>
     94           <description>A color transform matrix to use to transform
     95           from sensor RGB color space to output linear sRGB color space
     96           </description>
     97           <range>Output values are expected to be in the range
     98           (0,1)</range>
     99           <notes>This matrix is either set by HAL when the request
    100           android.colorCorrection.mode is not TRANSFORM_MATRIX, or
    101           directly by the application in the request when the
    102           android.colorCorrection.mode is TRANSFORM_MATRIX.
    103 
    104           In the latter case, the HAL may round the matrix to account
    105           for precision issues; the final rounded matrix should be
    106           reported back in this matrix result metadata.</notes>
    107         </entry>
    108         <entry name="gains" type="float" visibility="public"
    109                type_notes="A 1D array of floats for 4 color channel gains"
    110                container="array">
    111           <array>
    112             <size>4</size>
    113           </array>
    114           <description>Gains applying to Bayer color channels for
    115           white-balance</description>
    116           <notes>The 4-channel white-balance gains are defined in
    117           the order of [R G_even G_odd B], where G_even is the gain
    118           for green pixels on even rows of the output, and G_odd
    119           is the gain for greenpixels on the odd rows. if a HAL
    120           does not support a separate gain for even/odd green channels,
    121           it should use the G_even value,and write G_odd equal to
    122           G_even in the output result metadata.
    123 
    124           This array is either set by HAL when the request
    125           android.colorCorrection.mode is not TRANSFORM_MATRIX, or
    126           directly by the application in the request when the
    127           android.colorCorrection.mode is TRANSFORM_MATRIX.
    128 
    129           The ouput should be the gains actually applied by the HAL to
    130           the current frame.</notes>
    131         </entry>
    132       </controls>
    133       <dynamic>
    134         <clone entry="android.colorCorrection.transform" kind="controls">
    135         </clone>
    136         <clone entry="android.colorCorrection.gains" kind="controls">
    137         </clone>
    138       </dynamic>
    139     </section>
    140     <section name="control">
    141       <controls>
    142         <entry name="aeAntibandingMode" type="byte" visibility="public"
    143                enum="true" >
    144           <enum>
    145             <value>OFF</value>
    146             <value>50HZ</value>
    147             <value>60HZ</value>
    148             <value>AUTO</value>
    149           </enum>
    150           <description>Enum for controlling
    151           antibanding</description>
    152           <range>
    153           android.control.aeAvailableAntibandingModes</range>
    154         </entry>
    155         <entry name="aeExposureCompensation" type="int32" visibility="public">
    156           <description>Adjustment to AE target image
    157           brightness</description>
    158           <units>count of positive/negative EV steps</units>
    159           <notes>For example, if EV step is 0.333, '6' will mean an
    160           exposure compensation of +2 EV; -3 will mean an exposure
    161           compensation of -1</notes>
    162           <tag id="BC" />
    163         </entry>
    164         <entry name="aeLock" type="byte" visibility="public" enum="true"
    165                typedef="boolean">
    166           <enum>
    167             <value>OFF
    168             <notes>Autoexposure lock is disabled; the AE algorithm
    169             is free to update its parameters.</notes></value>
    170             <value>ON
    171             <notes>Autoexposure lock is enabled; the AE algorithm
    172             must not update the exposure and sensitivity parameters
    173             while the lock is active</notes></value>
    174           </enum>
    175           <description>Whether AE is currently locked to its latest
    176           calculated values</description>
    177           <notes>Note that even when AE is locked, the flash may be
    178           fired if the AE mode is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
    179           ON_AUTO_FLASH_REDEYE.</notes>
    180           <tag id="BC" />
    181         </entry>
    182         <entry name="aeMode" type="byte" visibility="public" enum="true">
    183           <enum>
    184             <value>OFF
    185               <notes>Autoexposure is disabled; sensor.exposureTime,
    186               sensor.sensitivity and sensor.frameDuration are used</notes>
    187             </value>
    188             <value>ON
    189               <notes>Autoexposure is active, no flash
    190               control</notes>
    191             </value>
    192             <value>ON_AUTO_FLASH
    193             <notes>if flash exists Autoexposure is active, auto
    194             flash control; flash may be fired when precapture
    195             trigger is activated, and for captures for which
    196             captureIntent = STILL_CAPTURE</notes></value>
    197             <value>ON_ALWAYS_FLASH
    198             <notes>if flash exists Autoexposure is active, auto
    199             flash control for precapture trigger and always flash
    200             when captureIntent = STILL_CAPTURE</notes></value>
    201             <value>ON_AUTO_FLASH_REDEYE
    202             <notes>optional Automatic red eye reduction with flash.
    203             If deemed necessary, red eye reduction sequence should
    204             fire when precapture trigger is activated, and final
    205             flash should fire when captureIntent =
    206             STILL_CAPTURE</notes></value>
    207           </enum>
    208           <description>Whether AE is currently updating the sensor
    209           exposure and sensitivity fields</description>
    210           <range>android.control.aeAvailableModes</range>
    211           <notes>Only effective if android.control.mode =
    212           AUTO</notes>
    213           <tag id="BC" />
    214         </entry>
    215         <entry name="aeRegions" type="int32" visibility="public"
    216                container="array">
    217           <array>
    218             <size>5</size>
    219             <size>area_count</size>
    220           </array>
    221           <description>List of areas to use for
    222           metering</description>
    223           <notes>Each area is a rectangle plus weight: xmin, ymin,
    224           xmax, ymax, weight. The rectangle is defined inclusive of the
    225           specified coordinates.
    226 
    227           The coordinate system is based on the active pixel array,
    228           with (0,0) being the top-left pixel in the active pixel array, and
    229           (android.sensor.info.activeArraySize.width - 1,
    230           android.sensor.info.activeArraySize.height - 1) being the
    231           bottom-right pixel in the active pixel array. The weight
    232           should be nonnegative.
    233 
    234           If all regions have 0 weight, then no specific metering area
    235           needs to be used by the HAL. If the metering region is
    236           outside the current android.scaler.cropRegion, the HAL
    237           should ignore the sections outside the region and output the
    238           used sections in the frame metadata</notes>
    239           <tag id="BC" />
    240         </entry>
    241         <entry name="aeTargetFpsRange" type="int32" visibility="public"
    242                container="array">
    243           <array>
    244             <size>2</size>
    245           </array>
    246           <description>Range over which fps can be adjusted to
    247           maintain exposure</description>
    248           <range>android.control.aeAvailableTargetFpsRanges</range>
    249           <notes>Only constrains AE algorithm, not manual control
    250           of android.sensor.exposureTime</notes>
    251           <tag id="BC" />
    252         </entry>
    253         <entry name="aePrecaptureTrigger" type="byte" visibility="public"
    254                enum="true">
    255           <enum>
    256             <value>IDLE
    257               <notes>The trigger is idle.</notes>
    258             </value>
    259             <value>START
    260               <notes>The precapture metering sequence
    261               must be started. The exact effect of the precapture
    262               trigger depends on the current AE mode and
    263               state.</notes>
    264             </value>
    265           </enum>
    266           <description>Whether the HAL must trigger precapture
    267           metering.</description>
    268           <notes>This entry is normally set to IDLE, or is not
    269           included at all in the request settings. When included and
    270           set to START, the HAL must trigger the autoexposure
    271           precapture metering sequence.
    272 
    273           The effect of AE precapture trigger depends on the current
    274           AE mode and state; see the camera HAL device v3 header for
    275           details.</notes>
    276           <tag id="BC" />
    277         </entry>
    278         <entry name="afMode" type="byte" visibility="public" enum="true">
    279           <enum>
    280             <value>OFF
    281             <notes>The 3A routines do not control the lens;
    282             android.lens.focusDistance is controlled by the
    283             application</notes></value>
    284             <value>AUTO
    285             <notes>if lens is not fixed focus.
    286 
    287             Use android.lens.minimumFocusDistance to determine if lens
    288             is fixed focus In this mode, the lens does not move unless
    289             the autofocus trigger action is called. When that trigger
    290             is activated, AF must transition to ACTIVE_SCAN, then to
    291             the outcome of the scan (FOCUSED or
    292             NOT_FOCUSED).
    293 
    294             Triggering cancel AF resets the lens position to default,
    295             and sets the AF state to INACTIVE.</notes></value>
    296             <value>MACRO
    297             <notes>In this mode, the lens does not move unless the
    298             autofocus trigger action is called.
    299 
    300             When that trigger is activated, AF must transition to
    301             ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
    302             NOT_FOCUSED).  Triggering cancel AF resets the lens
    303             position to default, and sets the AF state to
    304             INACTIVE.</notes></value>
    305             <value>CONTINUOUS_VIDEO
    306             <notes>In this mode, the AF algorithm modifies the lens
    307             position continually to attempt to provide a
    308             constantly-in-focus image stream.
    309 
    310             The focusing behavior should be suitable for good quality
    311             video recording; typically this means slower focus
    312             movement and no overshoots. When the AF trigger is not
    313             involved, the AF algorithm should start in INACTIVE state,
    314             and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
    315             states as appropriate. When the AF trigger is activated,
    316             the algorithm should immediately transition into
    317             AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
    318             lens position until a cancel AF trigger is received.
    319 
    320             Once cancel is received, the algorithm should transition
    321             back to INACTIVE and resume passive scan. Note that this
    322             behavior is not identical to CONTINUOUS_PICTURE, since an
    323             ongoing PASSIVE_SCAN must immediately be
    324             canceled.</notes></value>
    325             <value>CONTINUOUS_PICTURE
    326             <notes>In this mode, the AF algorithm modifies the lens
    327             position continually to attempt to provide a
    328             constantly-in-focus image stream.
    329 
    330             The focusing behavior should be suitable for still image
    331             capture; typically this means focusing as fast as
    332             possible. When the AF trigger is not involved, the AF
    333             algorithm should start in INACTIVE state, and then
    334             transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
    335             appropriate as it attempts to maintain focus. When the AF
    336             trigger is activated, the algorithm should finish its
    337             PASSIVE_SCAN if active, and then transition into
    338             AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
    339             lens position until a cancel AF trigger is received.
    340 
    341             When the AF cancel trigger is activated, the algorithm
    342             should transition back to INACTIVE and then act as if it
    343             has just been started.</notes></value>
    344             <value>EDOF
    345             <notes>Extended depth of field (digital focus). AF
    346             trigger is ignored, AF state should always be
    347             INACTIVE.</notes></value>
    348           </enum>
    349           <description>Whether AF is currently enabled, and what
    350           mode it is set to</description>
    351           <tag id="BC" />
    352         </entry>
    353         <entry name="afRegions" type="int32" visibility="public"
    354                container="array">
    355           <array>
    356             <size>5</size>
    357             <size>area_count</size>
    358           </array>
    359           <description>List of areas to use for focus
    360           estimation</description>
    361           <notes>Each area is a rectangle plus weight: xmin, ymin,
    362           xmax, ymax, weight. The rectangle is defined inclusive of the
    363           specified coordinates.
    364 
    365           The coordinate system is based on the active pixel array,
    366           with (0,0) being the top-left pixel in the active pixel array, and
    367           (android.sensor.info.activeArraySize.width - 1,
    368           android.sensor.info.activeArraySize.height - 1) being the
    369           bottom-right pixel in the active pixel array. The weight
    370           should be nonnegative.
    371 
    372           If all regions have 0 weight, then no specific focus area
    373           needs to be used by the HAL. If the focusing region is
    374           outside the current android.scaler.cropRegion, the HAL
    375           should ignore the sections outside the region and output the
    376           used sections in the frame metadata</notes>
    377           <tag id="BC" />
    378         </entry>
    379         <entry name="afTrigger" type="byte" visibility="public" enum="true">
    380           <enum>
    381             <value>IDLE
    382               <notes>The trigger is idle.</notes>
    383             </value>
    384             <value>START
    385               <notes>Autofocus must trigger now.</notes>
    386             </value>
    387             <value>CANCEL
    388               <notes>Autofocus must return to initial
    389               state, and cancel any active trigger.</notes>
    390             </value>
    391           </enum>
    392           <description>Whether the HAL must trigger autofocus.</description>
    393           <notes>This entry is normally set to IDLE, or is not
    394           included at all in the request settings.
    395 
    396           When included and set to START, the HAL must trigger the
    397           autofocus algorithm. The effect of AF trigger depends on the
    398           current AF mode and state; see the camera HAL device v3
    399           header for details. When set to CANCEL, the HAL must cancel
    400           any active trigger, and return to initial AF state.</notes>
    401           <tag id="BC" />
    402         </entry>
    403         <entry name="awbLock" type="byte" visibility="public" enum="true"
    404                typedef="boolean">
    405           <enum>
    406             <value>OFF
    407             <notes>Auto-whitebalance lock is disabled; the AWB
    408             algorithm is free to update its parameters if in AUTO
    409             mode.</notes></value>
    410             <value>ON
    411             <notes>Auto-whitebalance lock is enabled; the AWB
    412             algorithm must not update the exposure and sensitivity
    413             parameters while the lock is active</notes></value>
    414           </enum>
    415           <description>Whether AWB is currently locked to its
    416           latest calculated values</description>
    417           <notes>Note that AWB lock is only meaningful for AUTO
    418           mode; in other modes, AWB is already fixed to a specific
    419           setting</notes>
    420           <tag id="BC" />
    421         </entry>
    422         <entry name="awbMode" type="byte" visibility="public" enum="true">
    423           <enum>
    424             <value>OFF</value>
    425             <value>AUTO</value>
    426             <value>INCANDESCENT</value>
    427             <value>FLUORESCENT</value>
    428             <value>WARM_FLUORESCENT</value>
    429             <value>DAYLIGHT</value>
    430             <value>CLOUDY_DAYLIGHT</value>
    431             <value>TWILIGHT</value>
    432             <value>SHADE</value>
    433           </enum>
    434           <description>Whether AWB is currently setting the color
    435           transform fields, and what its illumination target
    436           is</description>
    437           <notes>[BC - AWB lock,AWB modes]</notes>
    438           <tag id="BC" />
    439           <tag id="AWB" />
    440         </entry>
    441         <entry name="awbRegions" type="int32" visibility="public"
    442                container="array">
    443           <array>
    444             <size>5</size>
    445             <size>area_count</size>
    446           </array>
    447           <description>List of areas to use for illuminant
    448           estimation</description>
    449           <notes>Only used in AUTO mode.
    450 
    451           Each area is a rectangle plus weight: xmin, ymin,
    452           xmax, ymax, weight. The rectangle is defined inclusive of the
    453           specified coordinates.
    454 
    455           The coordinate system is based on the active pixel array,
    456           with (0,0) being the top-left pixel in the active pixel array, and
    457           (android.sensor.info.activeArraySize.width - 1,
    458           android.sensor.info.activeArraySize.height - 1) being the
    459           bottom-right pixel in the active pixel array. The weight
    460           should be nonnegative.
    461 
    462           If all regions have 0 weight, then no specific metering area
    463           needs to be used by the HAL. If the metering region is
    464           outside the current android.scaler.cropRegion, the HAL
    465           should ignore the sections outside the region and output the
    466           used sections in the frame metadata</notes>
    467           <tag id="BC" />
    468         </entry>
    469         <entry name="captureIntent" type="byte" visibility="public" enum="true">
    470           <enum>
    471             <value>CUSTOM
    472             <notes>This request doesn't fall into the other
    473             categories. Default to preview-like
    474             behavior.</notes></value>
    475             <value>PREVIEW
    476             <notes>This request is for a preview-like usecase. The
    477             precapture trigger may be used to start off a metering
    478             w/flash sequence</notes></value>
    479             <value>STILL_CAPTURE
    480             <notes>This request is for a still capture-type
    481             usecase.</notes></value>
    482             <value>VIDEO_RECORD
    483             <notes>This request is for a video recording
    484             usecase.</notes></value>
    485             <value>VIDEO_SNAPSHOT
    486             <notes>This request is for a video snapshot (still
    487             image while recording video) usecase</notes></value>
    488             <value>ZERO_SHUTTER_LAG
    489             <notes>This request is for a ZSL usecase; the
    490             application will stream full-resolution images and
    491             reprocess one or several later for a final
    492             capture</notes></value>
    493           </enum>
    494           <description>Information to 3A routines about the purpose
    495           of this capture, to help decide optimal 3A
    496           strategy</description>
    497           <range>all must be supported</range>
    498           <notes>Only used if android.control.mode != OFF.</notes>
    499           <tag id="BC" />
    500         </entry>
    501         <entry name="effectMode" type="byte" visibility="public" enum="true">
    502           <enum>
    503             <value>OFF</value>
    504             <value optional="true">MONO</value>
    505             <value optional="true">NEGATIVE</value>
    506             <value optional="true">SOLARIZE</value>
    507             <value optional="true">SEPIA</value>
    508             <value optional="true">POSTERIZE</value>
    509             <value optional="true">WHITEBOARD</value>
    510             <value optional="true">BLACKBOARD</value>
    511             <value optional="true">AQUA</value>
    512           </enum>
    513           <description>Whether any special color effect is in use.
    514           Only used if android.control.mode != OFF</description>
    515           <range>android.control.availableEffects</range>
    516           <tag id="BC" />
    517         </entry>
    518         <entry name="mode" type="byte" visibility="public" enum="true">
    519           <enum>
    520             <value>OFF
    521             <notes>Full application control of pipeline. All 3A
    522             routines are disabled, no other settings in
    523             android.control.* have any effect</notes></value>
    524             <value>AUTO
    525             <notes>Use settings for each individual 3A routine.
    526             Manual control of capture parameters is disabled. All
    527             controls in android.control.* besides sceneMode take
    528             effect</notes></value>
    529             <value>USE_SCENE_MODE
    530             <notes>Use specific scene mode. Enabling this disables
    531             control.aeMode, control.awbMode and control.afMode
    532             controls; the HAL must ignore those settings while
    533             USE_SCENE_MODE is active (except for FACE_PRIORITY
    534             scene mode). Other control entries are still active.
    535             This setting can only be used if availableSceneModes !=
    536             UNSUPPORTED</notes></value>
    537           </enum>
    538           <description>Overall mode of 3A control
    539           routines</description>
    540           <range>all must be supported</range>
    541           <tag id="BC" />
    542         </entry>
    543         <entry name="sceneMode" type="byte" visibility="public" enum="true">
    544           <enum>
    545             <value id="0">UNSUPPORTED</value>
    546             <value>FACE_PRIORITY
    547             <notes>if face detection support exists Use face
    548             detection data to drive 3A routines. If face detection
    549             statistics are disabled, should still operate correctly
    550             (but not return face detection statistics to the
    551             framework).
    552 
    553             Unlike the other scene modes, aeMode, awbMode, and afMode
    554             remain active when FACE_PRIORITY is set. This is due to
    555             compatibility concerns with the old camera
    556             API</notes></value>
    557             <value optional="true">ACTION</value>
    558             <value optional="true">PORTRAIT</value>
    559             <value optional="true">LANDSCAPE</value>
    560             <value optional="true">NIGHT</value>
    561             <value optional="true">NIGHT_PORTRAIT</value>
    562             <value optional="true">THEATRE</value>
    563             <value optional="true">BEACH</value>
    564             <value optional="true">SNOW</value>
    565             <value optional="true">SUNSET</value>
    566             <value optional="true">STEADYPHOTO</value>
    567             <value optional="true">FIREWORKS</value>
    568             <value optional="true">SPORTS</value>
    569             <value optional="true">PARTY</value>
    570             <value optional="true">CANDLELIGHT</value>
    571             <value optional="true">BARCODE</value>
    572           </enum>
    573           <description>Which scene mode is active when
    574           android.control.mode = SCENE_MODE</description>
    575           <range>android.control.availableSceneModes</range>
    576           <tag id="BC" />
    577         </entry>
    578         <entry name="videoStabilizationMode" type="byte" visibility="public"
    579                enum="true" typedef="boolean">
    580           <enum>
    581             <value>OFF</value>
    582             <value>ON</value>
    583           </enum>
    584           <description>Whether video stabilization is
    585           active</description>
    586           <notes>If enabled, video stabilization can modify the
    587           android.scaler.cropRegion to keep the video stream
    588           stabilized</notes>
    589           <tag id="BC" />
    590         </entry>
    591       </controls>
    592       <static>
    593         <entry name="aeAvailableAntibandingModes" type="byte" visibility="public"
    594                type_notes="list of enums" container="array">
    595           <array>
    596             <size>n</size>
    597           </array>
    598           <description>Which set of antibanding modes are
    599           supported</description>
    600         </entry>
    601         <entry name="aeAvailableModes" type="byte"
    602         type_notes="list of enums" container="array">
    603           <array>
    604             <size>n</size>
    605           </array>
    606           <description>Which subset of AE modes is
    607           supported</description>
    608           <range>OFF, ON must be supported.
    609           ON_AUTO_FLASH/ON_ALWAYS_FLASH must be supported if flash
    610           unit is available</range>
    611         </entry>
    612         <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public"
    613                type_notes="list of pairs of frame rates"
    614                container="array">
    615           <array>
    616             <size>2</size>
    617             <size>n</size>
    618           </array>
    619           <description>List of frame rate ranges supported by the
    620           AE algorithm/hardware</description>
    621         </entry>
    622         <entry name="aeCompensationRange" type="int32" visibility="public"
    623                container="array">
    624           <array>
    625             <size>2</size>
    626           </array>
    627           <description>Maximum and minimum exposure compensation
    628           setting, in counts of
    629           android.control.aeCompensationStepSize</description>
    630           <range>At least (-2,2)/(exp compensation step
    631           size)</range>
    632           <tag id="BC" />
    633         </entry>
    634         <entry name="aeCompensationStep" type="rational" visibility="public">
    635           <description>Smallest step by which exposure compensation
    636           can be changed</description>
    637           <range>&lt;= 1/2</range>
    638           <tag id="BC" />
    639         </entry>
    640         <entry name="afAvailableModes" type="byte" visibility="public"
    641         type_notes="List of enums" container="array">
    642           <array>
    643             <size>n</size>
    644           </array>
    645           <description>List of AF modes that can be
    646           selected</description>
    647           <range>OFF must be included. AUTO must be supported if
    648           lens allows for changing focus</range>
    649           <tag id="BC" />
    650         </entry>
    651         <entry name="availableEffects" type="byte" visibility="public"
    652                type_notes="list of enums" container="array">
    653           <array>
    654             <size>n</size>
    655           </array>
    656           <description>what subset of the full color effect enum
    657           list is supported</description>
    658           <range>OFF must be listed</range>
    659           <tag id="BC" />
    660         </entry>
    661         <entry name="availableSceneModes" type="byte" visibility="public"
    662                type_notes="list of enums from android.control.sceneMode, plus UNSUPPORTED to indicate no scene modes are supported"
    663                container="array">
    664           <array>
    665             <size>n</size>
    666           </array>
    667           <description>what subset of the scene mode enum list is
    668           supported.</description>
    669           <range>SCENE_MODE_FACE_PRIORITY must be supported if face
    670           detection is supported</range>
    671           <tag id="BC" />
    672         </entry>
    673         <entry name="availableVideoStabilizationModes" type="byte"
    674                visibility="public" type_notes="List of enums." container="array">
    675           <array>
    676             <size>n</size>
    677           </array>
    678           <description>List of video stabilization modes that can
    679           be supported</description>
    680           <range>OFF must be included</range>
    681           <tag id="BC" />
    682         </entry>
    683         <entry name="awbAvailableModes" type="byte" visibility="public"
    684                type_notes="List of enums (android.control.awbMode)"
    685                container="array">
    686           <array>
    687             <size>n</size>
    688           </array>
    689           <range>OFF, AUTO must be included</range>
    690           <tag id="BC" />
    691         </entry>
    692         <entry name="maxRegions" type="int32" visibility="public">
    693           <description>For AE, AWB, and AF, how many individual
    694           regions can be listed for metering?</description>
    695           <range>&gt;= 1</range>
    696           <tag id="BC" />
    697         </entry>
    698         <entry name="sceneModeOverrides" type="byte" visibility="system"
    699                container="array">
    700           <array>
    701             <size>3</size>
    702             <size>length(availableSceneModes)</size>
    703           </array>
    704           <description>List of AE, AWB, and AF modes to use for
    705           each available scene mode</description>
    706           <range>For each listed scene mode, lists the aeMode,
    707           awbMode, and afMode that the HAL wants to use for that
    708           scene mode.
    709 
    710           For each entry, the order is {aeMode, awbMode, afMode} in
    711           order of increasing index</range>
    712           <notes>When a scene mode is enabled, the HAL is expected
    713           to override aeMode, awbMode, and afMode with its
    714           preferred settings for that scene mode.
    715 
    716           To simplify communication with old camera API applications,
    717           the service wants this override list in the static metadata.
    718           The order of this list matches that of availableSceneModes,
    719           with 3 entires for each scene mode.  The overrides listed
    720           for SCENE_MODE_FACE_PRIORITY are ignored, since for that
    721           mode, the application-set aeMode, awbMode, and afMode are
    722           used instead, like they are when android.control.mode is
    723           AUTO.
    724 
    725           It is recommended that for FACE_PRIORITY, the overrides
    726           should be set to 0. As an example, if availableSceneModes is
    727           { FACE_PRIORITY, ACTION, NIGHT }, then the service expects
    728           this field to have 9 entries; for example { 0 , 0, 0,
    729           ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE, ON_AUTO_FLASH,
    730           INCANDESCENT, AUTO }</notes>
    731           <tag id="BC" />
    732         </entry>
    733       </static>
    734       <dynamic>
    735         <entry name="aePrecaptureId" type="int32" visibility="hidden">
    736           <description>The ID sent with the latest
    737           CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
    738           <notes>Must be 0 if no
    739           CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
    740           by HAL. Always updated even if AE algorithm ignores the
    741           trigger</notes>
    742         </entry>
    743         <clone entry="android.control.aeRegions" kind="controls">
    744         </clone>
    745         <entry name="aeState" type="byte" visibility="public" enum="true">
    746           <enum>
    747             <value>INACTIVE
    748             <notes>AE is off.  When a camera device is opened, it starts in
    749             this state.</notes></value>
    750             <value>SEARCHING
    751             <notes>AE doesn't yet have a good set of control values
    752             for the current scene</notes></value>
    753             <value>CONVERGED
    754             <notes>AE has a good set of control values for the
    755             current scene</notes></value>
    756             <value>LOCKED
    757             <notes>AE has been locked (aeMode =
    758             LOCKED)</notes></value>
    759             <value>FLASH_REQUIRED
    760             <notes>AE has a good set of control values, but flash
    761             needs to be fired for good quality still
    762             capture</notes></value>
    763             <value>PRECAPTURE
    764             <notes>AE has been asked to do a precapture sequence
    765             (through the
    766             trigger_action(CAMERA2_TRIGGER_PRECAPTURE_METERING)
    767             call), and is currently executing it. Once PRECAPTURE
    768             completes, AE will transition to CONVERGED or
    769             FLASH_REQUIRED as appropriate</notes></value>
    770           </enum>
    771           <description>Current state of AE algorithm</description>
    772           <notes>Whenever the AE algorithm state changes, a
    773           MSG_AUTOEXPOSURE notification must be send if a
    774           notification callback is registered.</notes>
    775         </entry>
    776         <clone entry="android.control.afMode" kind="controls">
    777         </clone>
    778         <clone entry="android.control.afRegions" kind="controls">
    779         </clone>
    780         <entry name="afState" type="byte" visibility="public" enum="true">
    781           <enum>
    782             <value>INACTIVE
    783             <notes>AF off or has not yet tried to scan/been asked
    784             to scan.  When a camera device is opened, it starts in
    785             this state.</notes></value>
    786             <value>PASSIVE_SCAN
    787             <notes>if CONTINUOUS_* modes are supported. AF is
    788             currently doing an AF scan initiated by a continuous
    789             autofocus mode</notes></value>
    790             <value>PASSIVE_FOCUSED
    791             <notes>if CONTINUOUS_* modes are supported. AF currently
    792             believes it is in focus, but may restart scanning at
    793             any time.</notes></value>
    794             <value>ACTIVE_SCAN
    795             <notes>if AUTO or MACRO modes are supported. AF is doing
    796             an AF scan because it was triggered by AF
    797             trigger</notes></value>
    798             <value>FOCUSED_LOCKED
    799             <notes>if any AF mode besides OFF is supported. AF
    800             believes it is focused correctly and is
    801             locked</notes></value>
    802             <value>NOT_FOCUSED_LOCKED
    803             <notes>if any AF mode besides OFF is supported. AF has
    804             failed to focus successfully and is
    805             locked</notes></value>
    806             <value>PASSIVE_UNFOCUSED
    807             <notes>if CONTINUOUS_* modes are supported. AF finished a
    808             passive scan without finding focus, and may restart
    809             scanning at any time.</notes></value>
    810           </enum>
    811           <description>Current state of AF algorithm</description>
    812           <notes>Whenever the AF algorithm state changes, a
    813           MSG_AUTOFOCUS notification must be send if a notification
    814           callback is registered.</notes>
    815         </entry>
    816         <entry name="afTriggerId" type="int32" visibility="hidden">
    817           <description>The ID sent with the latest
    818           CAMERA2_TRIGGER_AUTOFOCUS call</description>
    819           <notes>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
    820           received yet by HAL. Always updated even if AF algorithm
    821           ignores the trigger</notes>
    822         </entry>
    823         <clone entry="android.control.awbMode" kind="controls">
    824         </clone>
    825         <clone entry="android.control.awbRegions" kind="controls">
    826         </clone>
    827         <entry name="awbState" type="byte" visibility="public" enum="true">
    828           <enum>
    829             <value>INACTIVE
    830             <notes>AWB is not in auto mode.  When a camera device is opened, it
    831             starts in this state.</notes></value>
    832             <value>SEARCHING
    833             <notes>AWB doesn't yet have a good set of control
    834             values for the current scene</notes></value>
    835             <value>CONVERGED
    836             <notes>AWB has a good set of control values for the
    837             current scene</notes></value>
    838             <value>LOCKED
    839             <notes>AE has been locked (aeMode =
    840             LOCKED)</notes></value>
    841           </enum>
    842           <description>Current state of AWB algorithm</description>
    843           <notes>Whenever the AWB algorithm state changes, a
    844           MSG_AUTOWHITEBALANCE notification must be send if a
    845           notification callback is registered.</notes>
    846         </entry>
    847         <clone entry="android.control.mode" kind="controls">
    848         </clone>
    849       </dynamic>
    850     </section>
    851     <section name="demosaic">
    852       <controls>
    853         <entry name="mode" type="byte" enum="true">
    854           <enum>
    855             <value>FAST
    856             <notes>Minimal or no slowdown of frame rate compared to
    857             Bayer RAW output</notes></value>
    858             <value>HIGH_QUALITY
    859             <notes>High-quality may reduce output frame
    860             rate</notes></value>
    861           </enum>
    862           <description>Controls the quality of the demosaicing
    863           processing</description>
    864           <tag id="V1" />
    865         </entry>
    866       </controls>
    867     </section>
    868     <section name="edge">
    869       <controls>
    870         <entry name="mode" type="byte" visibility="public" enum="true">
    871           <enum>
    872             <value>OFF
    873             <notes>No edge enhancement is applied</notes></value>
    874             <value>FAST
    875             <notes>Must not slow down frame rate relative to raw
    876             bayer output</notes></value>
    877             <value>HIGH_QUALITY
    878             <notes>Frame rate may be reduced by high
    879             quality</notes></value>
    880           </enum>
    881           <description>Operation mode for edge
    882           enhancement</description>
    883         </entry>
    884         <entry name="strength" type="byte">
    885           <description>Control the amount of edge enhancement
    886           applied to the images</description>
    887           <units>1-10; 10 is maximum sharpening</units>
    888         </entry>
    889       </controls>
    890       <dynamic>
    891         <clone entry="android.edge.mode" kind="controls"></clone>
    892       </dynamic>
    893     </section>
    894     <section name="flash">
    895       <controls>
    896         <entry name="firingPower" type="byte">
    897           <description>Power for flash firing/torch</description>
    898           <units>10 is max power; 0 is no flash. Linear</units>
    899           <range>0 - 10</range>
    900           <notes>Power for snapshot may use a different scale than
    901           for torch mode. Only one entry for torch mode will be
    902           used</notes>
    903           <tag id="V1" />
    904         </entry>
    905         <entry name="firingTime" type="int64">
    906           <description>Firing time of flash relative to start of
    907           exposure</description>
    908           <units>nanoseconds</units>
    909           <range>0-(exposure time-flash duration)</range>
    910           <notes>Clamped to (0, exposure time - flash
    911           duration).</notes>
    912           <tag id="V1" />
    913         </entry>
    914         <entry name="mode" type="byte" visibility="public" enum="true">
    915           <enum>
    916             <value>OFF
    917             <notes>Do not fire the flash for this
    918             capture</notes></value>
    919             <value>SINGLE
    920             <notes>if android.flash.available is true Fire flash
    921             for this capture based on firingPower,
    922             firingTime.</notes></value>
    923             <value>TORCH
    924             <notes>if android.flash.available is true Flash
    925             continuously on, power set by
    926             firingPower</notes></value>
    927           </enum>
    928           <description>Select flash operation mode</description>
    929           <tag id="BC" />
    930         </entry>
    931       </controls>
    932       <static>
    933         <namespace name="info">
    934           <entry name="available" type="byte" visibility="public">
    935             <description>Whether this camera has a
    936             flash</description>
    937             <units>boolean (0 = false, otherwise true)</units>
    938             <notes>If no flash, none of the flash controls do
    939             anything. All other metadata should return 0</notes>
    940             <tag id="BC" />
    941           </entry>
    942           <entry name="chargeDuration" type="int64">
    943             <description>Time taken before flash can fire
    944             again</description>
    945             <units>nanoseconds</units>
    946             <range>0-1e9</range>
    947             <notes>1 second too long/too short for recharge? Should
    948             this be power-dependent?</notes>
    949             <tag id="V1" />
    950           </entry>
    951         </namespace>
    952         <entry name="colorTemperature" type="byte">
    953           <description>The x,y whitepoint of the
    954           flash</description>
    955           <units>pair of floats</units>
    956           <range>0-1 for both</range>
    957           <tag id="ADV" />
    958         </entry>
    959         <entry name="maxEnergy" type="byte">
    960           <description>Max energy output of the flash for a full
    961           power single flash</description>
    962           <units>lumen-seconds</units>
    963           <range>&gt;= 0</range>
    964           <tag id="ADV" />
    965         </entry>
    966       </static>
    967       <dynamic>
    968         <clone entry="android.flash.firingPower" kind="controls">
    969         </clone>
    970         <clone entry="android.flash.firingTime" kind="controls">
    971         </clone>
    972         <clone entry="android.flash.mode" kind="controls"></clone>
    973         <entry name="state" type="byte" visibility="public" enum="true">
    974           <enum>
    975             <value>UNAVAILABLE
    976             <notes>No flash on camera</notes></value>
    977             <value>CHARGING
    978             <notes>if android.flash.available is true Flash is
    979             charging and cannot be fired</notes></value>
    980             <value>READY
    981             <notes>if android.flash.available is true Flash is
    982             ready to fire</notes></value>
    983             <value>FIRED
    984             <notes>if android.flash.available is true Flash fired
    985             for this capture</notes></value>
    986           </enum>
    987           <description>Current state of the flash
    988           unit</description>
    989         </entry>
    990       </dynamic>
    991     </section>
    992     <section name="geometric">
    993       <controls>
    994         <entry name="mode" type="byte" enum="true">
    995           <enum>
    996             <value>OFF
    997             <notes>No geometric correction is
    998             applied</notes></value>
    999             <value>FAST
   1000             <notes>Must not slow down frame rate relative to raw
   1001             bayer output</notes></value>
   1002             <value>HIGH_QUALITY
   1003             <notes>Frame rate may be reduced by high
   1004             quality</notes></value>
   1005           </enum>
   1006           <description>Operating mode of geometric
   1007           correction</description>
   1008         </entry>
   1009         <entry name="strength" type="byte">
   1010           <description>Control the amount of shading correction
   1011           applied to the images</description>
   1012           <units>unitless: 1-10; 10 is full shading
   1013           compensation</units>
   1014           <tag id="ADV" />
   1015         </entry>
   1016       </controls>
   1017     </section>
   1018     <section name="hotPixel">
   1019       <controls>
   1020         <entry name="mode" type="byte" enum="true">
   1021           <enum>
   1022             <value>OFF
   1023             <notes>No hot pixel correction can be
   1024             applied</notes></value>
   1025             <value>FAST
   1026             <notes>Frame rate must not be reduced compared to raw
   1027             Bayer output</notes></value>
   1028             <value>HIGH_QUALITY
   1029             <notes>Frame rate may be reduced by high
   1030             quality</notes></value>
   1031           </enum>
   1032           <description>Set operational mode for hot pixel
   1033           correction</description>
   1034           <tag id="V1" />
   1035         </entry>
   1036       </controls>
   1037       <static>
   1038         <namespace name="info">
   1039           <entry name="map" type="int32"
   1040           type_notes="list of coordinates based on android.sensor.pixelArraySize"
   1041           container="array">
   1042             <array>
   1043               <size>2</size>
   1044               <size>n</size>
   1045             </array>
   1046             <description>Location of hot/defective pixels on
   1047             sensor</description>
   1048             <tag id="ADV" />
   1049           </entry>
   1050         </namespace>
   1051       </static>
   1052       <dynamic>
   1053         <clone entry="android.hotPixel.mode" kind="controls">
   1054           <tag id="V1" />
   1055         </clone>
   1056       </dynamic>
   1057     </section>
   1058     <section name="jpeg">
   1059       <controls>
   1060         <entry name="gpsCoordinates" type="double" visibility="public"
   1061         type_notes="latitude, longitude, altitude. First two in degrees, the third in meters"
   1062         container="array">
   1063           <array>
   1064             <size>3</size>
   1065           </array>
   1066           <description>GPS coordinates to include in output JPEG
   1067           EXIF</description>
   1068           <range>(-180 - 180], [-90,90], [-inf, inf]</range>
   1069           <tag id="BC" />
   1070         </entry>
   1071         <entry name="gpsProcessingMethod" type="byte" visibility="public"
   1072                typedef="string">
   1073           <description>32 characters describing GPS algorithm to
   1074           include in EXIF</description>
   1075           <units>UTF-8 null-terminated string</units>
   1076           <tag id="BC" />
   1077         </entry>
   1078         <entry name="gpsTimestamp" type="int64" visibility="public">
   1079           <description>Time GPS fix was made to include in
   1080           EXIF</description>
   1081           <units>UTC in seconds since January 1, 1970</units>
   1082           <tag id="BC" />
   1083         </entry>
   1084         <entry name="orientation" type="int32" visibility="public">
   1085           <description>Orientation of JPEG image to
   1086           write</description>
   1087           <units>Degrees in multiples of 90</units>
   1088           <range>0, 90, 180, 270</range>
   1089           <tag id="BC" />
   1090         </entry>
   1091         <entry name="quality" type="byte" visibility="public">
   1092           <description>Compression quality of the final JPEG
   1093           image</description>
   1094           <range>1-100; larger is higher quality</range>
   1095           <notes>85-95 is typical usage range</notes>
   1096           <tag id="BC" />
   1097         </entry>
   1098         <entry name="thumbnailQuality" type="byte" visibility="public">
   1099           <description>Compression quality of JPEG
   1100           thumbnail</description>
   1101           <range>1-100; larger is higher quality</range>
   1102           <tag id="BC" />
   1103         </entry>
   1104         <entry name="thumbnailSize" type="int32" visibility="public"
   1105         container="array" typedef="size">
   1106           <array>
   1107             <size>2</size>
   1108           </array>
   1109           <description>Resolution of embedded JPEG
   1110           thumbnail</description>
   1111           <range>from android.jpeg.availableThumbnailSizes</range>
   1112           <tag id="BC" />
   1113         </entry>
   1114       </controls>
   1115       <static>
   1116         <entry name="availableThumbnailSizes" type="int32" visibility="public"
   1117         type_notes="list of resolution pairs" container="array" typedef="size">
   1118           <array>
   1119             <size>2</size>
   1120             <size>n</size>
   1121           </array>
   1122           <description>Supported resolutions for the JPEG
   1123           thumbnail</description>
   1124           <range>Must include at least one valid resolution, plus
   1125           (0,0) for no thumbnail generation</range>
   1126           <tag id="BC" />
   1127         </entry>
   1128         <entry name="maxSize" type="int32" visibility="system">
   1129           <description>Maximum size in bytes for the compressed
   1130           JPEG buffer</description>
   1131           <range>Must be large enough to fit any JPEG produced by
   1132           the camera</range>
   1133           <notes>This is used for sizing the gralloc buffers for
   1134           JPEG</notes>
   1135         </entry>
   1136       </static>
   1137       <dynamic>
   1138         <clone entry="android.jpeg.gpsCoordinates" kind="controls">
   1139         </clone>
   1140         <clone entry="android.jpeg.gpsProcessingMethod"
   1141         kind="controls"></clone>
   1142         <clone entry="android.jpeg.gpsTimestamp" kind="controls">
   1143         </clone>
   1144         <clone entry="android.jpeg.orientation" kind="controls">
   1145         </clone>
   1146         <clone entry="android.jpeg.quality" kind="controls">
   1147         </clone>
   1148         <entry name="size" type="int32">
   1149           <description>The size of the compressed JPEG image, in
   1150           bytes</description>
   1151           <range>&gt;= 0</range>
   1152           <notes>If no JPEG output is produced for the request,
   1153           this must be 0.
   1154 
   1155           Otherwise, this describes the real size of the compressed
   1156           JPEG image placed in the output stream.  More specifically,
   1157           if android.jpeg.maxSize = 1000000, and a specific capture
   1158           has android.jpeg.size = 500000, then the output buffer from
   1159           the JPEG stream will be 1000000 bytes, of which the first
   1160           500000 make up the real data.</notes>
   1161         </entry>
   1162         <clone entry="android.jpeg.thumbnailQuality"
   1163         kind="controls"></clone>
   1164         <clone entry="android.jpeg.thumbnailSize" kind="controls">
   1165         </clone>
   1166       </dynamic>
   1167     </section>
   1168     <section name="lens">
   1169       <controls>
   1170         <entry name="aperture" type="float" visibility="public">
   1171           <description>Size of the lens aperture</description>
   1172           <units>f-number (f/NNN)</units>
   1173           <range>android.lens.info.availableApertures</range>
   1174           <notes>Will not be supported on most devices. Can only
   1175           pick from supported list</notes>
   1176           <tag id="V1" />
   1177         </entry>
   1178         <entry name="filterDensity" type="float" visibility="public">
   1179           <description>State of lens neutral density
   1180           filter(s)</description>
   1181           <units>number of stops of filtering</units>
   1182           <range>android.lens.info.availableFilterDensities</range>
   1183           <notes>Will not be supported on most devices. Can only
   1184           pick from supported list</notes>
   1185           <tag id="V1" />
   1186         </entry>
   1187         <entry name="focalLength" type="float" visibility="public">
   1188           <description>Lens optical zoom setting</description>
   1189           <units>focal length in mm</units>
   1190           <range>&gt; 0</range>
   1191           <notes>Will not be supported on most devices.</notes>
   1192           <tag id="V1" />
   1193         </entry>
   1194         <entry name="focusDistance" type="float" visibility="public">
   1195           <description>Distance to plane of sharpest focus,
   1196           measured from frontmost surface of the lens</description>
   1197           <units>diopters (1/m)</units>
   1198           <range>&gt;= 0</range>
   1199           <notes>0 = infinity focus. Used value should be clamped
   1200           to (0,minimum focus distance)</notes>
   1201           <tag id="BC" />
   1202           <tag id="V1" />
   1203         </entry>
   1204         <entry name="opticalStabilizationMode" type="byte" visibility="public"
   1205         enum="true">
   1206           <enum>
   1207             <value>OFF</value>
   1208             <value optional="true">ON</value>
   1209           </enum>
   1210           <description>Whether optical image stabilization is
   1211           enabled.</description>
   1212           <range>android.lens.availableOpticalStabilization</range>
   1213           <notes>Will not be supported on most devices.</notes>
   1214           <tag id="V1" />
   1215         </entry>
   1216       </controls>
   1217       <static>
   1218         <namespace name="info">
   1219           <entry name="availableApertures" type="float" visibility="public"
   1220           container="array">
   1221             <array>
   1222               <size>n</size>
   1223             </array>
   1224             <description>List of supported aperture
   1225             values</description>
   1226             <range>one entry required, &gt; 0</range>
   1227             <notes>If variable aperture not available, only setting
   1228             should be for the fixed aperture</notes>
   1229             <tag id="V1" />
   1230           </entry>
   1231           <entry name="availableFilterDensities" type="float" visibility="public"
   1232           container="array">
   1233             <array>
   1234               <size>n</size>
   1235             </array>
   1236             <description>List of supported ND filter
   1237             values</description>
   1238             <range>one entry required, &gt;= 0</range>
   1239             <notes>If not available, only setting is 0. Otherwise,
   1240             lists the available exposure index values for dimming
   1241             (2 would mean the filter is set to reduce incoming
   1242             light by two stops)</notes>
   1243             <tag id="V1" />
   1244           </entry>
   1245           <entry name="availableFocalLengths" type="float" visibility="public"
   1246           type_notes="the list of available focal lengths"
   1247           container="array">
   1248             <array>
   1249               <size>n</size>
   1250             </array>
   1251             <description>If fitted with optical zoom, what focal
   1252             lengths are available. If not, the static focal
   1253             length</description>
   1254             <range>&gt; 0</range>
   1255             <notes>If optical zoom not supported, only one value
   1256             should be reported</notes>
   1257             <tag id="BC" />
   1258             <tag id="V1" />
   1259           </entry>
   1260           <entry name="availableOpticalStabilization" type="byte"
   1261           visibility="public" type_notes="list of enums" container="array">
   1262             <array>
   1263               <size>n</size>
   1264             </array>
   1265             <description>List of supported optical image
   1266             stabilization modes</description>
   1267             <tag id="V1" />
   1268           </entry>
   1269           <entry name="geometricCorrectionMap" type="float"
   1270           type_notes="2D array of destination coordinate pairs for uniform grid points in source image, per color channel. Size in the range of 2x3x40x30"
   1271           container="array">
   1272             <array>
   1273               <size>2</size>
   1274               <size>3</size>
   1275               <size>n</size>
   1276               <size>m</size>
   1277             </array>
   1278             <description>A low-resolution map for correction of
   1279             geometric distortions and chromatic aberrations, per
   1280             color channel</description>
   1281             <range>N, M &gt;= 2</range>
   1282             <notes>[DNG wants a function instead]. What's easiest
   1283             for implementers? With an array size (M, N), entry (i,
   1284             j) provides the destination for pixel (i/(M-1) * width,
   1285             j/(N-1) * height). Data is row-major, with each array
   1286             entry being ( (X, Y)_r, (X, Y)_g, (X, Y)_b ) )</notes>
   1287             <tag id="DNG" />
   1288           </entry>
   1289           <entry name="geometricCorrectionMapSize" type="int32"
   1290           type_notes="width and height of geometric correction map"
   1291           container="array" typedef="size">
   1292             <array>
   1293               <size>2</size>
   1294             </array>
   1295             <description>Dimensions of geometric correction
   1296             map</description>
   1297             <range>Both values &gt;= 2</range>
   1298             <tag id="V1" />
   1299           </entry>
   1300           <entry name="hyperfocalDistance" type="float" visibility="public">
   1301             <description>Hyperfocal distance for this lens; set to
   1302             0 if fixed focus</description>
   1303             <units>diopters</units>
   1304             <range>&gt;= 0</range>
   1305             <notes>The hyperfocal distance is used for the old
   1306             API's 'fixed' setting</notes>
   1307             <tag id="BC" />
   1308           </entry>
   1309           <entry name="minimumFocusDistance" type="float" visibility="public">
   1310             <description>Shortest distance from frontmost surface
   1311             of the lens that can be focused correctly</description>
   1312             <units>diopters</units>
   1313             <range>&gt;= 0</range>
   1314             <notes>If the lens is fixed-focus, this should be
   1315             0</notes>
   1316             <tag id="V1" />
   1317           </entry>
   1318           <entry name="shadingMapSize" type="int32" visibility="public"
   1319                  type_notes="width and height of lens shading map provided by the HAL. (N, M)"
   1320                  container="array" typedef="size">
   1321             <array>
   1322               <size>2</size>
   1323             </array>
   1324             <description>Dimensions of lens shading
   1325             map</description>
   1326             <range>Both values &gt;= 1</range>
   1327             <tag id="V1" />
   1328           </entry>
   1329         </namespace>
   1330         <entry name="facing" type="byte" visibility="public" enum="true">
   1331           <enum>
   1332             <value>FRONT</value>
   1333             <value>BACK</value>
   1334           </enum>
   1335           <description>Direction the camera faces relative to
   1336           device screen</description>
   1337         </entry>
   1338         <entry name="opticalAxisAngle" type="float"
   1339         type_notes="degrees. First defines the angle of separation between the perpendicular to the screen and the camera optical axis. The second then defines the clockwise rotation of the optical axis from native device up."
   1340         container="array">
   1341           <array>
   1342             <size>2</size>
   1343           </array>
   1344           <description>Relative angle of camera optical axis to the
   1345           perpendicular axis from the display</description>
   1346           <range>[0-90) for first angle, [0-360) for second</range>
   1347           <notes>Examples:
   1348 
   1349           (0,0) means that the camera optical axis
   1350           is perpendicular to the display surface;
   1351 
   1352           (45,0) means that the camera points 45 degrees up when
   1353           device is held upright;
   1354 
   1355           (45,90) means the camera points 45 degrees to the right when
   1356           the device is held upright.
   1357 
   1358           Use FACING field to determine perpendicular outgoing
   1359           direction</notes>
   1360           <tag id="ADV" />
   1361         </entry>
   1362         <entry name="position" type="float" container="array">
   1363           <array>
   1364             <size>3, location in mm, in the sensor coordinate
   1365             system</size>
   1366           </array>
   1367           <description>Coordinates of camera optical axis on
   1368           device</description>
   1369           <tag id="V1" />
   1370         </entry>
   1371       </static>
   1372       <dynamic>
   1373         <clone entry="android.lens.aperture" kind="controls">
   1374           <tag id="V1" />
   1375         </clone>
   1376         <clone entry="android.lens.filterDensity" kind="controls">
   1377           <tag id="V1" />
   1378         </clone>
   1379         <clone entry="android.lens.focalLength" kind="controls">
   1380           <tag id="BC" />
   1381         </clone>
   1382         <clone entry="android.lens.focusDistance" kind="controls">
   1383           <notes>Should be zero for fixed-focus cameras</notes>
   1384           <tag id="BC" />
   1385         </clone>
   1386         <entry name="focusRange" type="float" visibility="public"
   1387         type_notes="Range of scene distances that are in focus"
   1388         container="array">
   1389           <array>
   1390             <size>2</size>
   1391           </array>
   1392           <description>The range of scene distances that are in
   1393           sharp focus (depth of field)</description>
   1394           <units>pair of focus distances in diopters: (near,
   1395           far)</units>
   1396           <range>&gt;=0</range>
   1397           <notes>If variable focus not supported, can still report
   1398           fixed depth of field range</notes>
   1399           <tag id="BC" />
   1400         </entry>
   1401         <clone entry="android.lens.opticalStabilizationMode"
   1402         kind="controls">
   1403           <tag id="V1" />
   1404         </clone>
   1405         <entry name="state" type="byte" visibility="public" enum="true">
   1406           <enum>
   1407             <value>STATIONARY</value>
   1408             <value>MOVING</value>
   1409           </enum>
   1410           <description>Current lens status</description>
   1411           <tag id="V1" />
   1412         </entry>
   1413       </dynamic>
   1414     </section>
   1415     <section name="noiseReduction">
   1416       <controls>
   1417         <entry name="mode" type="byte" visibility="public" enum="true">
   1418           <enum>
   1419             <value>OFF
   1420             <notes>No noise reduction is applied</notes></value>
   1421             <value>FAST
   1422             <notes>Must not slow down frame rate relative to raw
   1423             bayer output</notes></value>
   1424             <value>HIGH_QUALITY
   1425             <notes>May slow down frame rate to provide highest
   1426             quality</notes></value>
   1427           </enum>
   1428           <description>Mode of operation for the noise reduction
   1429           algorithm</description>
   1430           <range>android.noiseReduction.availableModes</range>
   1431           <tag id="V1" />
   1432         </entry>
   1433         <entry name="strength" type="byte">
   1434           <description>Control the amount of noise reduction
   1435           applied to the images</description>
   1436           <units>1-10; 10 is max noise reduction</units>
   1437           <range>1 - 10</range>
   1438         </entry>
   1439       </controls>
   1440       <dynamic>
   1441         <clone entry="android.noiseReduction.mode" kind="controls">
   1442         </clone>
   1443       </dynamic>
   1444     </section>
   1445     <section name="quirks">
   1446       <static>
   1447         <entry name="meteringCropRegion" type="byte" visibility="system" optional="true">
   1448           <description>If set to 1, the camera service does not
   1449           scale 'normalized' coordinates with respect to the crop
   1450           region. This applies to metering input (a{e,f,wb}Region
   1451           and output (face rectangles).</description>
   1452           <notes>Normalized coordinates refer to those in the
   1453           (-1000,1000) range mentioned in the
   1454           android.hardware.Camera API.
   1455 
   1456           HAL implementations should instead always use and emit
   1457           sensor array-relative coordinates for all region data. Does
   1458           not need to be listed in static metadata. Support will be
   1459           removed in future versions of camera service.</notes>
   1460         </entry>
   1461         <entry name="triggerAfWithAuto" type="byte" visibility="system" optional="true">
   1462           <description>If set to 1, then the camera service always
   1463           switches to FOCUS_MODE_AUTO before issuing a AF
   1464           trigger.</description>
   1465           <notes>HAL implementations should implement AF trigger
   1466           modes for AUTO, MACRO, CONTINUOUS_FOCUS, and
   1467           CONTINUOUS_PICTURE modes instead of using this flag. Does
   1468           not need to be listed in static metadata. Support will be
   1469           removed in future versions of camera service</notes>
   1470         </entry>
   1471         <entry name="useZslFormat" type="byte" visibility="system" optional="true">
   1472           <description>If set to 1, the camera service uses
   1473           CAMERA2_PIXEL_FORMAT_ZSL instead of
   1474           HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero
   1475           shutter lag stream</description>
   1476           <notes>HAL implementations should use gralloc usage flags
   1477           to determine that a stream will be used for
   1478           zero-shutter-lag, instead of relying on an explicit
   1479           format setting. Does not need to be listed in static
   1480           metadata. Support will be removed in future versions of
   1481           camera service.</notes>
   1482         </entry>
   1483         <entry name="usePartialResult" type="byte" visibility="hidden" optional="true">
   1484           <description>If set to 1, the HAL will always split result
   1485           metadata for a single capture into multiple buffers,
   1486           returned using multiple process_capture_result calls.
   1487           </description>
   1488           <notes>Does not need to be listed in static
   1489           metadata. Support for partial results will be reworked in
   1490           future versions of camera service. This quirk will stop
   1491           working at that point; DO NOT USE without careful
   1492           consideration of future support.
   1493           </notes>
   1494         </entry>
   1495 
   1496       </static>
   1497       <dynamic>
   1498         <entry name="partialResult" type="byte" visibility="hidden" optional="true" enum="true" typedef="boolean">
   1499           <enum>
   1500             <value>FINAL
   1501             <notes>The last or only metadata result buffer
   1502             for this capture.</notes>
   1503             </value>
   1504             <value>PARTIAL
   1505             <notes>A partial buffer of result metadata for this
   1506             capture. More result buffers for this capture will be sent
   1507             by the HAL, the last of which will be marked
   1508             FINAL.</notes>
   1509             </value>
   1510           </enum>
   1511           <description>Whether a result given to the framework is the
   1512           final one for the capture, or only a partial that contains a
   1513           subset of the full set of dynamic metadata
   1514           values.</description>
   1515           <range>Optional. Default value is FINAL.</range>
   1516           <notes>The entries in the result metadata buffers for a
   1517           single capture may not overlap, except for this entry. The
   1518           FINAL buffers must retain FIFO ordering relative to the
   1519           requests that generate them, so the FINAL buffer for frame 3 must
   1520           always be sent to the framework after the FINAL buffer for frame 2, and
   1521           before the FINAL buffer for frame 4. PARTIAL buffers may be returned
   1522           in any order relative to other frames, but all PARTIAL buffers for a given
   1523           capture must arrive before the FINAL buffer for that capture. This entry may
   1524           only be used by the HAL if quirks.usePartialResult is set to 1.
   1525           </notes>
   1526         </entry>
   1527       </dynamic>
   1528     </section>
   1529     <section name="request">
   1530       <controls>
   1531         <entry name="frameCount" type="int32" visibility="system">
   1532           <description>A frame counter set by the framework. Must
   1533           be maintained unchanged in output frame. This value monotonically
   1534           increases with every new result (that is, each new result has a unique
   1535           frameCount value).
   1536           </description>
   1537           <units>incrementing integer</units>
   1538           <range>Any int</range>
   1539         </entry>
   1540         <entry name="id" type="int32" visibility="hidden">
   1541           <description>An application-specified ID for the current
   1542           request. Must be maintained unchanged in output
   1543           frame</description>
   1544           <units>arbitrary integer assigned by application</units>
   1545           <range>Any int</range>
   1546           <tag id="V1" />
   1547         </entry>
   1548         <entry name="inputStreams" type="int32" visibility="system"
   1549                container="array">
   1550           <array>
   1551             <size>n</size>
   1552           </array>
   1553           <description>List which camera reprocess stream is used
   1554           for the source of reprocessing data.</description>
   1555           <units>List of camera reprocess stream IDs</units>
   1556           <range>Typically, only one entry allowed, must be a valid
   1557           reprocess stream ID.
   1558 
   1559           If android.jpeg.needsThumbnail is set, then multiple
   1560           reprocess streams may be included in a single request; they
   1561           must be different scaled versions of the same image.</range>
   1562           <notes>Only meaningful when android.request.type ==
   1563           REPROCESS. Ignored otherwise</notes>
   1564           <tag id="HAL2" />
   1565         </entry>
   1566         <entry name="metadataMode" type="byte" visibility="system"
   1567                enum="true">
   1568           <enum>
   1569             <value>NONE
   1570             <notes>No metadata should be produced on output, except
   1571             for application-bound buffer data. If no
   1572             application-bound streams exist, no frame should be
   1573             placed in the output frame queue. If such streams
   1574             exist, a frame should be placed on the output queue
   1575             with null metadata but with the necessary output buffer
   1576             information. Timestamp information should still be
   1577             included with any output stream buffers</notes></value>
   1578             <value>FULL
   1579             <notes>All metadata should be produced. Statistics will
   1580             only be produced if they are separately
   1581             enabled</notes></value>
   1582           </enum>
   1583           <description>How much metadata to produce on
   1584           output</description>
   1585         </entry>
   1586         <entry name="outputStreams" type="int32" visibility="system"
   1587                container="array">
   1588           <array>
   1589             <size>n</size>
   1590           </array>
   1591           <description>Lists which camera output streams image data
   1592           from this capture must be sent to</description>
   1593           <units>List of camera stream IDs</units>
   1594           <range>List must only include streams that have been
   1595           created</range>
   1596           <notes>If no output streams are listed, then the image
   1597           data should simply be discarded. The image data must
   1598           still be captured for metadata and statistics production,
   1599           and the lens and flash must operate as requested.</notes>
   1600           <tag id="HAL2" />
   1601         </entry>
   1602         <entry name="type" type="byte" visibility="system" enum="true">
   1603           <enum>
   1604             <value>CAPTURE
   1605             <notes>Capture a new image from the imaging hardware,
   1606             and process it according to the
   1607             settings</notes></value>
   1608             <value>REPROCESS
   1609             <notes>Process previously captured data; the
   1610             android.request.inputStream parameter determines the
   1611             source reprocessing stream. TODO: Mark dynamic metadata
   1612             needed for reprocessing with [RP]</notes></value>
   1613           </enum>
   1614           <description>The type of the request; either CAPTURE or
   1615           REPROCESS. For HAL3, this tag is redundant.</description>
   1616           <tag id="HAL2" />
   1617         </entry>
   1618       </controls>
   1619       <static>
   1620         <entry name="maxNumOutputStreams" type="int32" visibility="public"
   1621         container="array">
   1622           <array>
   1623             <size>3</size>
   1624           </array>
   1625           <description>How many output streams can be allocated at
   1626           the same time for each type of stream</description>
   1627           <units>The number of raw sensor streams; the number of
   1628           processed, uncompressed streams; and the number of
   1629           JPEG-compressed streams</units>
   1630           <range>&gt;=1 for Raw and JPEG-compressed stream. &gt;= 3
   1631           for processed, uncompressed streams</range>
   1632           <notes>Video snapshot with preview callbacks requires 3
   1633           processed streams (preview, record, app callbacks) and
   1634           one JPEG stream (snapshot)</notes>
   1635           <tag id="BC" />
   1636         </entry>
   1637         <entry name="maxNumReprocessStreams" type="int32" visibility="system"
   1638         container="array">
   1639           <array>
   1640             <size>1</size>
   1641           </array>
   1642           <description>How many reprocessing streams of any type
   1643           can be allocated at the same time</description>
   1644           <range>&gt;= 1</range>
   1645         </entry>
   1646       </static>
   1647       <dynamic>
   1648         <entry name="frameCount" type="int32" visibility="public">
   1649           <description>A frame counter set by the framework. This value monotonically
   1650           increases with every new result (that is, each new result has a unique
   1651           frameCount value).</description>
   1652           <units>count of frames</units>
   1653           <range>&gt; 0</range>
   1654           <notes>Reset on release()</notes>
   1655         </entry>
   1656         <clone entry="android.request.id" kind="controls"></clone>
   1657         <clone entry="android.request.metadataMode"
   1658         kind="controls"></clone>
   1659         <clone entry="android.request.outputStreams"
   1660         kind="controls"></clone>
   1661       </dynamic>
   1662     </section>
   1663     <section name="scaler">
   1664       <controls>
   1665         <entry name="cropRegion" type="int32" visibility="public"
   1666                container="array" typedef="rectangle">
   1667           <array>
   1668             <size>4</size>
   1669           </array>
   1670           <description>(x, y, width, height).
   1671 
   1672           A rectangle with the top-level corner of (x,y) and size
   1673           (width, height). The region of the sensor that is used for
   1674           output. Each stream must use this rectangle to produce its
   1675           output, cropping to a smaller region if necessary to
   1676           maintain the stream's aspect ratio.
   1677 
   1678           HAL2.x uses only (x, y, width)</description>
   1679           <units>(x,y) of top-left corner, width and height of region
   1680           in pixels; (0,0) is top-left corner of
   1681           android.sensor.activeArraySize</units>
   1682           <notes>
   1683             Any additional per-stream cropping must be done to
   1684             maximize the final pixel area of the stream.
   1685 
   1686             For example, if the crop region is set to a 4:3 aspect
   1687             ratio, then 4:3 streams should use the exact crop
   1688             region. 16:9 streams should further crop vertically
   1689             (letterbox).
   1690 
   1691             Conversely, if the crop region is set to a 16:9, then 4:3
   1692             outputs should crop horizontally (pillarbox), and 16:9
   1693             streams should match exactly. These additional crops must
   1694             be centered within the crop region.
   1695 
   1696             The output streams must maintain square pixels at all
   1697             times, no matter what the relative aspect ratios of the
   1698             crop region and the stream are.  Negative values for
   1699             corner are allowed for raw output if full pixel array is
   1700             larger than active pixel array. Width and height may be
   1701             rounded to nearest larger supportable width, especially
   1702             for raw output, where only a few fixed scales may be
   1703             possible. The width and height of the crop region cannot
   1704             be set to be smaller than floor( activeArraySize.width /
   1705             android.scaler.maxDigitalZoom ) and floor(
   1706             activeArraySize.height / android.scaler.maxDigitalZoom),
   1707             respectively.
   1708           </notes>
   1709           <tag id="BC" />
   1710         </entry>
   1711       </controls>
   1712       <static>
   1713         <entry name="availableFormats" type="int32"
   1714         visibility="public" enum="true"
   1715         type_notes="values from HAL_PIXEL_FORMAT_* in /system/core/include/system/graphics.h"
   1716         container="array" typedef="imageFormat">
   1717           <array>
   1718             <size>n</size>
   1719           </array>
   1720           <enum>
   1721             <value id="0x20">RAW_SENSOR
   1722             </value>
   1723             <value id="0x32315659">YV12
   1724                 <notes>YCrCb 4:2:0 Planar</notes>
   1725             </value>
   1726             <value id="0x11">YCrCb_420_SP
   1727                 <notes>NV21</notes>
   1728             </value>
   1729 
   1730             <value id="0x22">IMPLEMENTATION_DEFINED
   1731                 <notes>Hal Implementation Defined</notes>
   1732             </value>
   1733 
   1734             <value id="0x23">YCbCr_420_888
   1735                 <notes>Flexible YUV420 Format</notes>
   1736             </value>
   1737 
   1738             <value id="0x21">BLOB
   1739                 <notes>JPEG</notes>
   1740             </value>
   1741           </enum>
   1742           <description>List of app-visible formats</description>
   1743           <tag id="BC" />
   1744         </entry>
   1745         <entry name="availableJpegMinDurations" type="int64" visibility="public"
   1746         container="array">
   1747           <array>
   1748             <size>n</size>
   1749           </array>
   1750           <description>The minimum frame duration that is supported
   1751           for each resolution in availableJpegSizes. Should
   1752           correspond to the frame duration when only that JPEG
   1753           stream is active and captured in a burst, with all
   1754           processing set to FAST</description>
   1755           <notes>When multiple streams are configured, the minimum
   1756           frame duration will be &gt;= max(individual stream min
   1757           durations)</notes>
   1758           <tag id="BC" />
   1759         </entry>
   1760         <entry name="availableJpegSizes" type="int32" visibility="public"
   1761         container="array" typedef="size">
   1762           <array>
   1763             <size>n</size>
   1764             <size>2</size>
   1765           </array>
   1766           <description>The resolutions available for output from
   1767           the JPEG block. Listed as width x height</description>
   1768           <range>Must include: - sensor maximum resolution Should
   1769           include: - half/quarter max resolution</range>
   1770           <tag id="BC" />
   1771         </entry>
   1772         <entry name="availableMaxDigitalZoom" type="float" visibility="public">
   1773           <description>The maximum ratio between active area width
   1774           and crop region width, or between active area height and
   1775           crop region height, if the crop region height is larger
   1776           than width</description>
   1777           <range>&gt;=1</range>
   1778           <tag id="BC" />
   1779         </entry>
   1780         <entry name="availableProcessedMinDurations" type="int64" visibility="public"
   1781         container="array">
   1782           <array>
   1783             <size>n</size>
   1784           </array>
   1785           <description>The minimum frame duration that is supported
   1786           for each resolution in availableProcessedSizes. Should
   1787           correspond to the frame duration when only that processed
   1788           stream is active, with all processing set to
   1789           FAST</description>
   1790           <notes>When multiple streams are configured, the minimum
   1791           frame duration will be &gt;= max(individual stream min
   1792           durations)</notes>
   1793           <tag id="BC" />
   1794         </entry>
   1795         <entry name="availableProcessedSizes" type="int32" visibility="public"
   1796         container="array" typedef="size">
   1797           <array>
   1798             <size>n</size>
   1799             <size>2</size>
   1800           </array>
   1801           <description>The resolutions available for use with
   1802           processed output streams, such as YV12, NV12, and
   1803           platform opaque YUV/RGB streams to the GPU or video
   1804           encoders. Listed as width, height</description>
   1805           <range>Must include: - sensor maximum resolution -
   1806           standard QCIF, 240p, 480p, 720p, and 1080p
   1807           resolutions</range>
   1808           <notes>The actual supported resolution list may be limited by
   1809           consumer end points for different use cases. For example, for
   1810           recording use case, the largest supported resolution may be
   1811           limited by max supported size from encoder, for preview use
   1812           case, the largest supported resolution may be limited by max
   1813           resolution SurfaceTexture/SurfaceView can support.
   1814           </notes>
   1815           <tag id="BC" />
   1816         </entry>
   1817         <entry name="availableRawMinDurations" type="int64"
   1818         container="array">
   1819           <array>
   1820             <size>n</size>
   1821           </array>
   1822           <description>The minimum frame duration that is supported
   1823           for each raw resolution in availableRawSizes. Should
   1824           correspond to the frame duration when only the raw stream
   1825           is active.</description>
   1826           <notes>When multiple streams are configured, the minimum
   1827           frame duration will be &gt;= max(individual stream min
   1828           durations)</notes>
   1829           <tag id="BC" />
   1830         </entry>
   1831         <entry name="availableRawSizes" type="int32"
   1832         container="array" typedef="size">
   1833           <array>
   1834             <size>n</size>
   1835             <size>2</size>
   1836           </array>
   1837           <description>The resolutions available for use with raw
   1838           sensor output streams, listed as width,
   1839           height</description>
   1840           <range>Must include: - sensor maximum resolution</range>
   1841         </entry>
   1842       </static>
   1843       <dynamic>
   1844         <clone entry="android.scaler.cropRegion" kind="controls">
   1845         </clone>
   1846       </dynamic>
   1847     </section>
   1848     <section name="sensor">
   1849       <controls>
   1850         <entry name="exposureTime" type="int64" visibility="public">
   1851           <description>Duration each pixel is exposed to
   1852           light.
   1853 
   1854           If the sensor can't expose this exact duration, it should shorten the
   1855           duration exposed to the nearest possible value (rather than expose longer).
   1856           </description>
   1857           <units>nanoseconds</units>
   1858           <range>android.sensor.info.exposureTimeRange</range>
   1859           <notes>1/10000 - 30 sec range. No bulb mode</notes>
   1860           <tag id="V1" />
   1861         </entry>
   1862         <entry name="frameDuration" type="int64" visibility="public">
   1863           <description>Duration from start of frame exposure to
   1864           start of next frame exposure</description>
   1865           <units>nanoseconds</units>
   1866           <range>see android.sensor.info.maxFrameDuration,
   1867           android.scaler.info.availableMinFrameDurations</range>
   1868           <notes>Exposure time has priority, so duration is set to
   1869           max(duration, exposure time + overhead)</notes>
   1870           <tag id="V1" />
   1871           <tag id="BC" />
   1872         </entry>
   1873         <entry name="sensitivity" type="int32" visibility="public">
   1874           <description>Gain applied to image data. Must be
   1875           implemented through analog gain only if set to values
   1876           below 'maximum analog sensitivity'.
   1877 
   1878           If the sensor can't apply this exact gain, it should lessen the
   1879           gain to the nearest possible value (rather than gain more).
   1880           </description>
   1881           <units>ISO arithmetic units</units>
   1882           <range>android.sensor.info.sensitivityRange</range>
   1883           <notes>ISO 12232:2006 REI method</notes>
   1884           <tag id="V1" />
   1885         </entry>
   1886       </controls>
   1887       <static>
   1888         <namespace name="info">
   1889           <entry name="activeArraySize" type="int32" visibility="public"
   1890           type_notes="Four ints defining the active pixel rectangle"
   1891           container="array"
   1892           typedef="rectangle">
   1893             <array>
   1894               <size>4</size>
   1895             </array>
   1896             <description>Area of raw data which corresponds to only
   1897             active pixels; smaller or equal to
   1898             pixelArraySize.</description>
   1899             <units>xmin, ymin, width, height. Top left of full
   1900             pixel array is (0,0)</units>
   1901             <tag id="DNG" />
   1902           </entry>
   1903           <entry name="sensitivityRange" type="int32" visibility="public"
   1904           type_notes="Range of supported sensitivities"
   1905           container="array">
   1906             <array>
   1907               <size>2</size>
   1908             </array>
   1909             <description>Range of valid sensitivities</description>
   1910             <range>Min &lt;= 100, Max &gt;= 1600</range>
   1911             <tag id="BC" />
   1912             <tag id="V1" />
   1913           </entry>
   1914           <entry name="colorFilterArrangement" type="byte" enum="true">
   1915             <enum>
   1916               <value>RGGB</value>
   1917               <value>GRBG</value>
   1918               <value>GBRG</value>
   1919               <value>BGGR</value>
   1920               <value>RGB
   1921               <notes>Sensor is not Bayer; output has 3 16-bit
   1922               values for each pixel, instead of just 1 16-bit value
   1923               per pixel.</notes></value>
   1924             </enum>
   1925             <description>Arrangement of color filters on sensor;
   1926             represents the colors in the top-left 2x2 section of
   1927             the sensor, in reading order</description>
   1928             <tag id="DNG" />
   1929           </entry>
   1930           <entry name="exposureTimeRange" type="int64" visibility="public"
   1931           type_notes="nanoseconds" container="array">
   1932             <array>
   1933               <size>2</size>
   1934             </array>
   1935             <description>Range of valid exposure
   1936             times</description>
   1937             <range>Min &lt;= 100e3 (100 us), Max &gt;= 30e9 (30
   1938             sec)</range>
   1939             <tag id="V1" />
   1940           </entry>
   1941           <entry name="maxFrameDuration" type="int64" visibility="public">
   1942             <description>Maximum possible frame duration (minimum frame
   1943             rate)</description>
   1944             <units>nanoseconds</units>
   1945             <range>&gt;= 30e9</range>
   1946             <notes>Minimum duration is a function of resolution,
   1947             processing settings. See
   1948             android.scaler.availableProcessedMinDurations
   1949             android.scaler.availableJpegMinDurations
   1950             android.scaler.availableRawMinDurations</notes>
   1951             <tag id="BC" />
   1952             <tag id="V1" />
   1953           </entry>
   1954           <entry name="physicalSize" type="float" visibility="public"
   1955           type_notes="width x height in millimeters"
   1956           container="array">
   1957             <array>
   1958               <size>2</size>
   1959             </array>
   1960             <description>The physical dimensions of the full pixel
   1961             array</description>
   1962             <notes>Needed for FOV calculation for old API</notes>
   1963             <tag id="V1" />
   1964             <tag id="BC" />
   1965           </entry>
   1966           <entry name="pixelArraySize" type="int32"
   1967           container="array" typedef="size">
   1968             <array>
   1969               <size>2</size>
   1970             </array>
   1971             <description>Dimensions of full pixel array, possibly
   1972             including black calibration pixels</description>
   1973             <notes>Maximum output resolution for raw format must
   1974             match this in
   1975             android.scaler.info.availableSizesPerFormat</notes>
   1976             <tag id="DNG" />
   1977             <tag id="BC" />
   1978           </entry>
   1979           <entry name="whiteLevel" type="int32">
   1980             <description>Maximum raw value output by
   1981             sensor</description>
   1982             <range>&gt; 1024 (10-bit output)</range>
   1983             <notes>Defines sensor bit depth (10-14 bits is
   1984             expected)</notes>
   1985             <tag id="DNG" />
   1986           </entry>
   1987         </namespace>
   1988         <entry name="baseGainFactor" type="rational" visibility="public"
   1989         optional="true">
   1990           <description>Gain factor from electrons to raw units when
   1991           ISO=100</description>
   1992           <tag id="V1" />
   1993           <tag id="FULL" />
   1994         </entry>
   1995         <entry name="blackLevelPattern" type="int32"
   1996         type_notes="2x2 raw count block" container="array">
   1997           <array>
   1998             <size>4</size>
   1999           </array>
   2000           <description>A fixed black level offset for each of the
   2001           Bayer mosaic channels</description>
   2002           <range>&gt;= 0 each</range>
   2003           <notes>As per DNG BlackLevelRepeatDim / BlackLevel
   2004           tags</notes>
   2005           <tag id="DNG" />
   2006         </entry>
   2007         <entry name="calibrationTransform1" type="rational"
   2008         type_notes="3x3 matrix in row-major-order"
   2009         container="array">
   2010           <array>
   2011             <size>9</size>
   2012           </array>
   2013           <description>Per-device calibration on top of color space
   2014           transform 1</description>
   2015           <tag id="DNG" />
   2016         </entry>
   2017         <entry name="calibrationTransform2" type="rational"
   2018         type_notes="3x3 matrix in row-major-order"
   2019         container="array">
   2020           <array>
   2021             <size>9</size>
   2022           </array>
   2023           <description>Per-device calibration on top of color space
   2024           transform 2</description>
   2025           <tag id="DNG" />
   2026         </entry>
   2027         <entry name="colorTransform1" type="rational"
   2028         type_notes="3x3 matrix in row-major-order"
   2029         container="array">
   2030           <array>
   2031             <size>9</size>
   2032           </array>
   2033           <description>Linear mapping from XYZ (D50) color space to
   2034           reference linear sensor color, for first reference
   2035           illuminant</description>
   2036           <notes>Use as follows XYZ = inv(transform) * clip( (raw -
   2037           black level(raw) ) / ( white level - max black level) ).
   2038           At least in the simple case</notes>
   2039           <tag id="DNG" />
   2040         </entry>
   2041         <entry name="colorTransform2" type="rational"
   2042         type_notes="3x3 matrix in row-major-order"
   2043         container="array">
   2044           <array>
   2045             <size>9</size>
   2046           </array>
   2047           <description>Linear mapping from XYZ (D50) color space to
   2048           reference linear sensor color, for second reference
   2049           illuminant</description>
   2050           <tag id="DNG" />
   2051         </entry>
   2052         <entry name="forwardMatrix1" type="rational"
   2053         type_notes="3x3 matrix in row-major-order"
   2054         container="array">
   2055           <array>
   2056             <size>9</size>
   2057           </array>
   2058           <description>Used by DNG for better WB
   2059           adaptation</description>
   2060           <tag id="DNG" />
   2061         </entry>
   2062         <entry name="forwardMatrix2" type="rational"
   2063         type_notes="3x3 matrix in row-major-order"
   2064         container="array">
   2065           <array>
   2066             <size>9</size>
   2067           </array>
   2068           <description>Used by DNG for better WB
   2069           adaptation</description>
   2070           <tag id="DNG" />
   2071         </entry>
   2072         <entry name="maxAnalogSensitivity" type="int32" visibility="public"
   2073         optional="true">
   2074           <description>Maximum sensitivity that is implemented
   2075           purely through analog gain</description>
   2076           <notes>For android.sensor.sensitivity values less than or
   2077           equal to this, all applied gain must be analog. For
   2078           values above this, it can be a mix of analog and
   2079           digital</notes>
   2080           <tag id="V1" />
   2081           <tag id="FULL" />
   2082         </entry>
   2083         <entry name="noiseModelCoefficients" type="float"
   2084         type_notes="float constants A, B for the noise variance model"
   2085         container="array">
   2086           <array>
   2087             <size>2</size>
   2088           </array>
   2089           <description>Estimation of sensor noise
   2090           characteristics</description>
   2091           <units>var(raw pixel value) = electrons * (baseGainFactor
   2092           * iso/100)^2 + A * (baseGainFactor * iso/100)^2 +
   2093           B</units>
   2094           <notes>A represents sensor read noise before analog
   2095           amplification; B represents noise from A/D conversion and
   2096           other circuits after amplification. Both noise sources
   2097           are assumed to be gaussian, independent, and not to vary
   2098           across the sensor</notes>
   2099           <tag id="V1" />
   2100         </entry>
   2101         <entry name="orientation" type="int32" visibility="public">
   2102           <description>Clockwise angle through which the output
   2103           image needs to be rotated to be upright on the device
   2104           screen in its native orientation. Also defines the
   2105           direction of rolling shutter readout, which is from top
   2106           to bottom in the sensor's coordinate system</description>
   2107           <units>degrees clockwise rotation, only multiples of
   2108           90</units>
   2109           <range>0,90,180,270</range>
   2110           <tag id="BC" />
   2111         </entry>
   2112         <entry name="referenceIlluminant1" type="byte" enum="true">
   2113           <enum>
   2114             <value id="1">DAYLIGHT</value>
   2115             <value id="2">FLUORESCENT</value>
   2116             <value id="3">TUNGSTEN
   2117             <notes>Incandescent light</notes></value>
   2118             <value id="4">FLASH</value>
   2119             <value id="9">FINE_WEATHER</value>
   2120             <value id="10">CLOUDY_WEATHER</value>
   2121             <value id="11">SHADE</value>
   2122             <value id="12">DAYLIGHT_FLUORESCENT
   2123             <notes>D 5700 - 7100K</notes></value>
   2124             <value id="13">DAY_WHITE_FLUORESCENT
   2125             <notes>N 4600 - 5400K</notes></value>
   2126             <value id="14">COOL_WHITE_FLUORESCENT
   2127             <notes>W 3900 - 4500K</notes></value>
   2128             <value id="15">WHITE_FLUORESCENT
   2129             <notes>WW 3200 - 3700K</notes></value>
   2130             <value id="17">STANDARD_A</value>
   2131             <value id="18">STANDARD_B</value>
   2132             <value id="19">STANDARD_C</value>
   2133             <value id="20">D55</value>
   2134             <value id="21">D65</value>
   2135             <value id="22">D75</value>
   2136             <value id="23">D50</value>
   2137             <value id="24">ISO_STUDIO_TUNGSTEN</value>
   2138           </enum>
   2139           <description>Light source used to define transform
   2140           1</description>
   2141           <notes>[EXIF LightSource tag] Must all these be
   2142           supported? Need CCT for each!</notes>
   2143           <tag id="DNG" />
   2144           <tag id="EXIF" />
   2145         </entry>
   2146         <entry name="referenceIlluminant2" type="byte">
   2147           <description>Light source used to define transform
   2148           2</description>
   2149           <units>Same as illuminant 1</units>
   2150         </entry>
   2151       </static>
   2152       <dynamic>
   2153         <clone entry="android.sensor.exposureTime" kind="controls">
   2154         </clone>
   2155         <clone entry="android.sensor.frameDuration"
   2156         kind="controls"></clone>
   2157         <clone entry="android.sensor.sensitivity" kind="controls">
   2158         </clone>
   2159         <entry name="timestamp" type="int64" visibility="public">
   2160           <description>Time at start of exposure of first
   2161           row</description>
   2162           <units>nanoseconds</units>
   2163           <range>&gt; 0</range>
   2164           <notes>Monotonic, should be synced to other timestamps in
   2165           system</notes>
   2166           <tag id="BC" />
   2167         </entry>
   2168         <entry name="temperature" type="float" visibility="public"
   2169         optional="true">
   2170           <description>The temperature of the sensor, sampled at the time
   2171           exposure began for this frame.
   2172 
   2173           The thermal diode being queried should be inside the sensor PCB, or
   2174           somewhere close to it.
   2175           </description>
   2176 
   2177           <units>celsius</units>
   2178           <range>Optional. This value is missing if no temperature is available.</range>
   2179           <tag id="FULL" />
   2180         </entry>
   2181       </dynamic>
   2182     </section>
   2183     <section name="shading">
   2184       <controls>
   2185         <entry name="mode" type="byte" enum="true">
   2186           <enum>
   2187             <value>OFF
   2188             <notes>No shading correction is applied</notes></value>
   2189             <value>FAST
   2190             <notes>Must not slow down frame rate relative to raw
   2191             bayer output</notes></value>
   2192             <value>HIGH_QUALITY
   2193             <notes>Frame rate may be reduced by high
   2194             quality</notes></value>
   2195           </enum>
   2196           <description>Quality of lens shading correction applied
   2197           to the image data</description>
   2198         </entry>
   2199         <entry name="strength" type="byte">
   2200           <description>Control the amount of shading correction
   2201           applied to the images</description>
   2202           <units>unitless: 1-10; 10 is full shading
   2203           compensation</units>
   2204           <tag id="ADV" />
   2205         </entry>
   2206       </controls>
   2207       <dynamic>
   2208         <clone entry="android.shading.mode" kind="controls">
   2209         </clone>
   2210       </dynamic>
   2211     </section>
   2212     <section name="statistics">
   2213       <controls>
   2214         <entry name="faceDetectMode" type="byte" visibility="public" enum="true">
   2215           <enum>
   2216             <value>OFF</value>
   2217             <value>SIMPLE
   2218             <notes>Optional Return rectangle and confidence
   2219             only</notes></value>
   2220             <value>FULL
   2221             <notes>Optional Return all face
   2222             metadata</notes></value>
   2223           </enum>
   2224           <description>State of the face detector
   2225           unit</description>
   2226           <range>
   2227           android.statistics.info.availableFaceDetectModes</range>
   2228           <notes>Whether face detection is enabled, and whether it
   2229           should output just the basic fields or the full set of
   2230           fields. Value must be one of the
   2231           android.statistics.info.availableFaceDetectModes.</notes>
   2232           <tag id="BC" />
   2233         </entry>
   2234         <entry name="histogramMode" type="byte" enum="true" typedef="boolean">
   2235           <enum>
   2236             <value>OFF</value>
   2237             <value>ON</value>
   2238           </enum>
   2239           <description>Operating mode for histogram
   2240           generation</description>
   2241           <tag id="V1" />
   2242         </entry>
   2243         <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean">
   2244           <enum>
   2245             <value>OFF</value>
   2246             <value>ON</value>
   2247           </enum>
   2248           <description>Operating mode for sharpness map
   2249           generation</description>
   2250           <tag id="V1" />
   2251         </entry>
   2252       </controls>
   2253       <static>
   2254         <namespace name="info">
   2255           <entry name="availableFaceDetectModes" type="byte"
   2256                  visibility="public"
   2257                  type_notes="List of enums from android.statistics.faceDetectMode"
   2258                  container="array">
   2259             <array>
   2260               <size>n</size>
   2261             </array>
   2262             <description>Which face detection modes are available,
   2263             if any</description>
   2264             <units>List of enum:
   2265             OFF
   2266             SIMPLE
   2267             FULL</units>
   2268             <notes>OFF means face detection is disabled, it must
   2269             be included in the list.
   2270 
   2271             SIMPLE means the device supports the
   2272             android.statistics.faceRectangles and
   2273             android.statistics.faceScores outputs.
   2274 
   2275             FULL means the device additionally supports the
   2276             android.statistics.faceIds and
   2277             android.statistics.faceLandmarks outputs.
   2278             </notes>
   2279           </entry>
   2280           <entry name="histogramBucketCount" type="int32">
   2281             <description>Number of histogram buckets
   2282             supported</description>
   2283             <range>&gt;= 64</range>
   2284           </entry>
   2285           <entry name="maxFaceCount" type="int32" visibility="public" >
   2286             <description>Maximum number of simultaneously detectable
   2287             faces</description>
   2288             <range>&gt;= 4 if availableFaceDetectionModes lists
   2289             modes besides OFF, otherwise 0</range>
   2290           </entry>
   2291           <entry name="maxHistogramCount" type="int32">
   2292             <description>Maximum value possible for a histogram
   2293             bucket</description>
   2294           </entry>
   2295           <entry name="maxSharpnessMapValue" type="int32">
   2296             <description>Maximum value possible for a sharpness map
   2297             region.</description>
   2298           </entry>
   2299           <entry name="sharpnessMapSize" type="int32"
   2300           type_notes="width x height" container="array" typedef="size">
   2301             <array>
   2302               <size>2</size>
   2303             </array>
   2304             <description>Dimensions of the sharpness
   2305             map</description>
   2306             <range>Must be at least 32 x 32</range>
   2307           </entry>
   2308         </namespace>
   2309       </static>
   2310       <dynamic>
   2311         <clone entry="android.statistics.faceDetectMode"
   2312         kind="controls"></clone>
   2313         <entry name="faceIds" type="int32" visibility="public" container="array">
   2314           <array>
   2315             <size>n</size>
   2316           </array>
   2317           <description>List of unique IDs for detected
   2318           faces</description>
   2319           <notes>Only available if faceDetectMode == FULL</notes>
   2320           <tag id="BC" />
   2321         </entry>
   2322         <entry name="faceLandmarks" type="int32" visibility="public"
   2323         type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)"
   2324         container="array">
   2325           <array>
   2326             <size>n</size>
   2327             <size>6</size>
   2328           </array>
   2329           <description>List of landmarks for detected
   2330           faces</description>
   2331           <notes>Only available if faceDetectMode == FULL</notes>
   2332           <tag id="BC" />
   2333         </entry>
   2334         <entry name="faceRectangles" type="int32" visibility="public"
   2335         type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area"
   2336         container="array" typedef="rectangle">
   2337           <array>
   2338             <size>n</size>
   2339             <size>4</size>
   2340           </array>
   2341           <description>List of the bounding rectangles for detected
   2342           faces</description>
   2343           <notes>Only available if faceDetectMode != OFF</notes>
   2344           <tag id="BC" />
   2345         </entry>
   2346         <entry name="faceScores" type="byte" visibility="public" container="array">
   2347           <array>
   2348             <size>n</size>
   2349           </array>
   2350           <description>List of the face confidence scores for
   2351           detected faces</description>
   2352           <range>1-100</range>
   2353           <notes>Only available if faceDetectMode != OFF. The value should be
   2354           meaningful (for example, setting 100 at all times is illegal).</notes>
   2355           <tag id="BC" />
   2356         </entry>
   2357         <entry name="histogram" type="int32"
   2358         type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount"
   2359         container="array">
   2360           <array>
   2361             <size>n</size>
   2362             <size>3</size>
   2363           </array>
   2364           <description>A 3-channel histogram based on the raw
   2365           sensor data</description>
   2366           <notes>The k'th bucket (0-based) covers the input range
   2367           (with w = android.sensor.info.whiteLevel) of [ k * w/N,
   2368           (k + 1) * w / N ). If only a monochrome sharpness map is
   2369           supported, all channels should have the same data</notes>
   2370           <tag id="V1" />
   2371         </entry>
   2372         <clone entry="android.statistics.histogramMode"
   2373         kind="controls"></clone>
   2374         <entry name="sharpnessMap" type="int32"
   2375         type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)"
   2376         container="array">
   2377           <array>
   2378             <size>n</size>
   2379             <size>m</size>
   2380             <size>3</size>
   2381           </array>
   2382           <description>A 3-channel sharpness map, based on the raw
   2383           sensor data</description>
   2384           <notes>If only a monochrome sharpness map is supported,
   2385           all channels should have the same data</notes>
   2386           <tag id="V1" />
   2387         </entry>
   2388         <clone entry="android.statistics.sharpnessMapMode"
   2389         kind="controls"></clone>
   2390         <entry name="lensShadingMap" type="float" visibility="public"
   2391                type_notes="2D array of float gain factors per channel to correct lens shading"
   2392                container="array">
   2393           <array>
   2394             <size>4</size>
   2395             <size>n</size>
   2396             <size>m</size>
   2397           </array>
   2398           <description>A low-resolution map of lens shading, per
   2399           color channel</description>
   2400           <range>Each gain factor is &gt;= 1</range>
   2401           <notes>Assume bilinear interpolation of map. The least
   2402           shaded section of the image should have a gain factor
   2403           of 1; all other sections should have gains above 1.
   2404           the map should be on the order of 30-40 rows, and
   2405           must be smaller than 64x64.
   2406 
   2407           When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
   2408           must take into account the colorCorrection settings.
   2409           </notes>
   2410         </entry>
   2411         <entry name="predictedColorGains" type="float" visibility="public"
   2412                type_notes="A 1D array of floats for 4 color channel gains"
   2413                container="array">
   2414           <array>
   2415             <size>4</size>
   2416           </array>
   2417           <description>The best-fit color channel gains calculated
   2418           by the HAL's statistics units for the current output frame
   2419           </description>
   2420           <notes>
   2421           This may be different than the gains used for this frame,
   2422           since statistics processing on data from a new frame
   2423           typically completes after the transform has already been
   2424           applied to that frame.
   2425 
   2426           The 4 channel gains are defined in Bayer domain,
   2427           see android.colorCorrection.gains for details.
   2428 
   2429           This value should always be calculated by the AWB block,
   2430           regardless of the android.control.* current values.
   2431           </notes>
   2432         </entry>
   2433         <entry name="predictedColorTransform" type="rational" visibility="public"
   2434                type_notes="3x3 rational matrix in row-major order"
   2435                container="array">
   2436           <array>
   2437             <size>3</size>
   2438             <size>3</size>
   2439           </array>
   2440           <description>The best-fit color transform matrix estimate
   2441           calculated by the HAL's statistics units for the current
   2442           output frame</description>
   2443           <notes>The HAL must provide the estimate from its
   2444           statistics unit on the white balance transforms to use
   2445           for the next frame. These are the values the HAL believes
   2446           are the best fit for the current output frame. This may
   2447           be different than the transform used for this frame, since
   2448           statistics processing on data from a new frame typically
   2449           completes after the transform has already been applied to
   2450           that frame.
   2451 
   2452           These estimates must be provided for all frames, even if
   2453           capture settings and color transforms are set by the application.
   2454 
   2455           This value should always be calculated by the AWB block,
   2456           regardless of the android.control.* current values.
   2457           </notes>
   2458         </entry>
   2459         <entry name="sceneFlicker" type="byte" visibility="public" enum="true">
   2460           <enum>
   2461             <value>NONE</value>
   2462             <value>50HZ</value>
   2463             <value>60HZ</value>
   2464           </enum>
   2465           <description>The HAL estimated scene illumination lighting
   2466           frequency</description>
   2467           <notes>Report NONE if there doesn't appear to be flickering
   2468           illumination</notes>
   2469         </entry>
   2470       </dynamic>
   2471       <controls>
   2472         <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true">
   2473           <enum>
   2474             <value>OFF</value>
   2475             <value>ON</value>
   2476           </enum>
   2477           <description>Whether the HAL needs to output the lens
   2478           shading map in output result metadata</description>
   2479           <notes>When set to ON,
   2480           android.statistics.lensShadingMap must be provided in
   2481           the output result metdata.</notes>
   2482         </entry>
   2483       </controls>
   2484     </section>
   2485     <section name="tonemap">
   2486       <controls>
   2487         <entry name="curveBlue" type="float" visibility="public"
   2488         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
   2489         container="array">
   2490           <array>
   2491             <size>n</size>
   2492             <size>2</size>
   2493           </array>
   2494           <description>Table mapping blue input values to output
   2495           values</description>
   2496           <units>same as android.tonemap.curveRed</units>
   2497           <range>same as android.tonemap.curveRed</range>
   2498           <notes>Tonemapping / contrast / gamma curve for the blue
   2499           channel, to use when android.tonemap.mode is CONTRAST_CURVE.
   2500 
   2501           See android.tonemap.curveRed for more details.</notes>
   2502         </entry>
   2503         <entry name="curveGreen" type="float" visibility="public"
   2504         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
   2505         container="array">
   2506           <array>
   2507             <size>n</size>
   2508             <size>2</size>
   2509           </array>
   2510           <description>Table mapping green input values to output
   2511           values</description>
   2512           <units>same as android.tonemap.curveRed</units>
   2513           <range>same as android.tonemap.curveRed</range>
   2514           <notes>Tonemapping / contrast / gamma curve for the green
   2515           channel, to use when android.tonemap.mode is CONTRAST_CURVE.
   2516 
   2517           See android.tonemap.curveRed for more details.</notes>
   2518         </entry>
   2519         <entry name="curveRed" type="float" visibility="public"
   2520         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
   2521         container="array">
   2522           <array>
   2523             <size>n</size>
   2524             <size>2</size>
   2525           </array>
   2526           <description>Table mapping red input values to output
   2527           values</description>
   2528           <range>0-1 on input and output coordinates.</range>
   2529           <notes>Tonemapping / contrast / gamma curve for the red
   2530           channel, to use when android.tonemap.mode is CONTRAST_CURVE.
   2531 
   2532           Since the input and output ranges may vary depending on
   2533           the camera pipeline, the input and output pixel values
   2534           are represented by normalized floating-point values
   2535           between 0 and 1, with 0 == black and 1 == white.
   2536 
   2537           The curve should be linearly interpolated between the
   2538           defined points. The points will be listed in increasing
   2539           order of P_IN. For example, if the array is: [0.0, 0.0,
   2540           0.3, 0.5, 1.0, 1.0], then the input-&gt;output mapping
   2541           for a few sample points would be: 0 -&gt; 0, 0.15 -&gt;
   2542           0.25, 0.3 -&gt; 0.5, 0.5 -&gt; 0.64</notes>
   2543           <tag id="DNG" />
   2544         </entry>
   2545         <entry name="mode" type="byte" visibility="public" enum="true">
   2546           <enum>
   2547             <value>CONTRAST_CURVE
   2548             <notes>Use the tone mapping curve specified in
   2549             android.tonemap.curve</notes></value>
   2550             <value>FAST
   2551             <notes>Must not slow down frame rate relative to raw
   2552             bayer output</notes></value>
   2553             <value>HIGH_QUALITY
   2554             <notes>Frame rate may be reduced by high
   2555             quality</notes></value>
   2556           </enum>
   2557         </entry>
   2558       </controls>
   2559       <static>
   2560         <entry name="maxCurvePoints" type="int32" visibility="public" >
   2561           <description>Maximum number of supported points in the
   2562           tonemap curve</description>
   2563           <range>&gt;= 128</range>
   2564         </entry>
   2565       </static>
   2566       <dynamic>
   2567         <clone entry="android.tonemap.curveBlue" kind="controls">
   2568         </clone>
   2569         <clone entry="android.tonemap.curveGreen" kind="controls">
   2570         </clone>
   2571         <clone entry="android.tonemap.curveRed" kind="controls">
   2572         </clone>
   2573         <clone entry="android.tonemap.mode" kind="controls">
   2574         </clone>
   2575       </dynamic>
   2576     </section>
   2577     <section name="led">
   2578       <controls>
   2579         <entry name="transmit" type="byte" visibility="hidden" enum="true"
   2580                typedef="boolean">
   2581           <enum>
   2582             <value>OFF</value>
   2583             <value>ON</value>
   2584           </enum>
   2585           <description>This LED is nominally used to indicate to the user
   2586           that the camera is powered on and may be streaming images back to the
   2587           Application Processor. In certain rare circumstances, the OS may
   2588           disable this when video is processed locally and not transmitted to
   2589           any untrusted applications.
   2590 
   2591           In particular, the LED *must* always be on when the data could be
   2592           transmitted off the device. The LED *should* always be on whenever
   2593           data is stored locally on the device.
   2594 
   2595           The LED *may* be off if a trusted application is using the data that
   2596           doesn't violate the above rules.
   2597           </description>
   2598         </entry>
   2599       </controls>
   2600       <dynamic>
   2601         <clone entry="android.led.transmit" kind="controls"></clone>
   2602       </dynamic>
   2603       <static>
   2604         <entry name="availableLeds" type="byte" visibility="hidden" enum="true"
   2605                container="array">
   2606           <array>
   2607             <size>n</size>
   2608           </array>
   2609           <enum>
   2610             <value>TRANSMIT
   2611               <notes>android.led.transmit control is used</notes>
   2612             </value>
   2613           </enum>
   2614           <description>A list of camera LEDs that are available on this system.
   2615           </description>
   2616         </entry>
   2617       </static>
   2618     </section>
   2619     <section name="info">
   2620       <static>
   2621         <entry name="supportedHardwareLevel" type="byte" visibility="public"
   2622                enum="true" >
   2623           <enum>
   2624             <value>LIMITED</value>
   2625             <value>FULL</value>
   2626           </enum>
   2627           <description>
   2628           The camera 3 HAL device can implement one of two possible
   2629           operational modes; limited and full. Full support is
   2630           expected from new higher-end devices. Limited mode has
   2631           hardware requirements roughly in line with those for a
   2632           camera HAL device v1 implementation, and is expected from
   2633           older or inexpensive devices. Full is a strict superset of
   2634           limited, and they share the same essential operational flow.
   2635 
   2636           For full details refer to "S3. Operational Modes" in camera3.h
   2637           </description>
   2638           <range>Optional. Default value is LIMITED.</range>
   2639         </entry>
   2640       </static>
   2641     </section>
   2642     <section name="blackLevel">
   2643       <controls>
   2644         <entry name="lock" type="byte" visibility="public" enum="true"
   2645                typedef="boolean">
   2646           <enum>
   2647             <value>OFF</value>
   2648             <value>ON</value>
   2649           </enum>
   2650           <description> Whether black-level compensation is locked
   2651           to its current values, or is free to vary</description>
   2652           <notes>When set to ON, the values used for black-level
   2653           compensation must not change until the lock is set to
   2654           OFF
   2655 
   2656           Since changes to certain capture parameters (such as
   2657           exposure time) may require resetting of black level
   2658           compensation, the HAL must report whether setting the
   2659           black level lock was successful in the output result
   2660           metadata.
   2661 
   2662           The black level locking must happen at the sensor, and not at the ISP.
   2663           If for some reason black level locking is no longer legal (for example,
   2664           the analog gain has changed, which forces black levels to be
   2665           recalculated), then the HAL is free to override this request (and it
   2666           must report 'OFF' when this does happen) until the next time locking
   2667           is legal again.</notes>
   2668           <tag id="HAL2" />
   2669         </entry>
   2670       </controls>
   2671       <dynamic>
   2672         <clone entry="android.blackLevel.lock"
   2673         kind="controls"></clone>
   2674       </dynamic>
   2675     </section>
   2676   </namespace>
   2677 </metadata>
   2678