blob: 44d477b6b36f2c70b0c07713f87da271d6d76e1d [file] [log] [blame]
Heidi von Markhama9b85d12016-07-21 13:20:23 -07001page.title=Camera Version Support
Clay Murphy594d0ed2014-10-21 11:04:30 -07002@jd:body
3
4<!--
Clay Murphy4c746142016-07-11 14:11:37 -07005 Copyright 2016 The Android Open Source Project
Clay Murphy594d0ed2014-10-21 11:04:30 -07006
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18-->
19<div id="qv-wrapper">
20 <div id="qv">
21 <h2>In this document</h2>
22 <ol id="auto-toc">
23 </ol>
24 </div>
25</div>
26
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070027<p>This page details version differences in Camera HALs, APIs, and associated
28Android Compatibility Test Suite (CTS) tests. It also covers several
29architectural changes made to harden and secure the camera framework in Android
307.0 and the updates vendors must make to support these changes in their camera
31implementations.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -070032
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070033<h2 id=glossary>Terminology</h2>
Clay Murphy594d0ed2014-10-21 11:04:30 -070034
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070035<p>The following terms are used on this page:</p>
36
37<dl>
38
39<dt>Camera API1</dt>
40<dd>The app-level camera framework on Android 4.4 and earlier devices, exposed
41through the <code>android.hardware.Camera</code> class.</dd>
42
43<dt>Camera API2</dt>
44<dd>The app-level camera framework on Android 5.0 and later devices, exposed
45through the<code> android.hardware.camera2</code> package.</dd>
46
47<dt>Camera HAL</dt>
48<dd>The camera module layer implemented by SoC vendors. The app-level public
49frameworks are built on top of the camera HAL.</dd>
50
51<dt>Camera HAL3.1</dt>
52<dd>Version of the camera device HAL released with Android 4.4.</dd>
53
54<dt>Camera HAL3.2</dt>
55<dd>Version of the camera device HAL released with Android 5.0.</dd>
56
57<dt>Camera API1 CTS</dt>
58<dd>Set of camera Compatibility Test Suite (CTS) tests that run on top of Camera
59API1.</dd>
60
61<dt>Camera API2 CTS</dt>
62<dd>Additional set of camera CTS tests that run on top of Camera API2.</dd>
63
64</dl>
65
66
67<h2 id=camera_apis>Camera APIs</h2>
Heidi von Markhama9b85d12016-07-21 13:20:23 -070068<p>Android includes the following camera APIs.</p>
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070069
70<h3 id=camera_api1>Camera API1</h3>
71
72<p>Android 5.0 deprecated Camera API1, which continues to be phased out as new
73platform development focuses on Camera API2. However, the phase-out period will
74be lengthy, and Android releases will continue to support Camera API1 apps for
75some time. Specifically, support continues for:</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -070076
77<ul>
Heidi von Markhama9b85d12016-07-21 13:20:23 -070078<li><em>Camera API1 interfaces for apps</em>. Camera apps built on top of Camera
79API1 should work as they do on devices running earlier Android release versions.
80</li>
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070081<li><em>Camera HAL versions</em>. Includes support for Camera HAL1.0.</li>
Clay Murphy594d0ed2014-10-21 11:04:30 -070082</ul>
83
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070084<h3 id=camera_api2>Camera API2</h3>
Clay Murphy594d0ed2014-10-21 11:04:30 -070085
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070086<p>The Camera API2 framework exposes lower-level camera control to the app,
Clay Murphy594d0ed2014-10-21 11:04:30 -070087including efficient zero-copy burst/streaming flows and per-frame controls of
88exposure, gain, white balance gains, color conversion, denoising, sharpening,
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070089and more. For details, watch the
90<a href="https://www.youtube.com/watch?v=92fgcUNCHic&feature=youtu.be&t=29m50s">Google
91I/O video overview</a>.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -070092
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070093<p>Android 5.0 and later includes Camera API2; however, devices running Android
945.0 and later may not support all Camera API2 features. The
Clay Murphy594d0ed2014-10-21 11:04:30 -070095<code>android.info.supportedHardwareLevel</code> property that apps can query
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070096through the Camera API2 interfaces reports one of the following support
97levels:</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -070098
Heidi von Markhamafd1cd72016-07-11 14:05:19 -070099<ul>
100<li><code>LEGACY</code>. These devices expose capabilities to apps through the
101Camera API2 interfaces that are approximately the same capabilities as those
102exposed to apps through the Camera API1 interfaces. The legacy frameworks code
103conceptually translates Camera API2 calls into Camera API1 calls; legacy devices
104do not support Camera API2 features such as per-frame controls.</li>
105<li><code>FULL</code>. These devices support all of major capabilities of Camera
106API2 and must use Camera HAL 3.2 or later and Android 5.0 or later.</li>
107<li><code>LIMITED</code>. These devices support some Camera API2 capabilities
108(but not all) and must use Camera HAL 3.2 or later.</li>
109</ul>
Clay Murphy594d0ed2014-10-21 11:04:30 -0700110
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700111<p>Individual capabilities are exposed via the
112<code>android.request.availableCapabilities</code> property in the Camera API2
113interfaces. <code>FULL</code> devices require the <code>MANUAL_SENSOR</code> and
114<code>MANUAL_POST_PROCESSING</code> capabilities, among others. The
115<code>RAW</code> capability is optional even for <code>FULL</code> devices.
116<code>LIMITED</code> devices can advertise any subset of these capabilities,
117including none of them. However, the <code>BACKWARD_COMPATIBLE</code> capability
118must always be defined.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -0700119
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700120<p>The supported hardware level of the device, as well as the specific Camera
121API2 capabilities it supports, are available as the following feature flags to
122allow Google Play filtering of Camera API2 camera apps.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -0700123
124<ul>
125 <li><code>android.hardware.camera.hardware_level.full</code>
126 <li><code>android.hardware.camera.capability.raw</code>
127 <li><code>android.hardware.camera.capability.manual_sensor</code>
128 <li><code>android.hardware.camera.capability.manual_post_processing</code>
129</ul>
130
131<h2 id=cts_requirements>CTS requirements</h2>
132
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700133<p>Android 5.0 and later devices must pass the Camera API1 CTS, Camera API2 CTS,
134and CTS Verifier camera tests.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -0700135
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700136<p>Devices that do not feature a Camera HAL3.2 implementation and are not
137capable of supporting the full Camera API2 interfaces must still pass the Camera
138API2 CTS tests. However, the device will be running in Camera API2
139<code>LEGACY</code> mode (in which the Camera API2 calls are conceptually mapped
140to Camera API1 calls) so any Camera API2 CTS tests related to features or
141capabilities beyond Camera API1 will be automatically skipped.</p>
Clay Murphy594d0ed2014-10-21 11:04:30 -0700142
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700143<p>On legacy devices, Camera API2 CTS tests that are not skipped use the
144existing public Camera API1 interfaces and capabilities with no new
145requirements. Bugs that are exposed (and which cause a Camera API2 CTS failure)
146are bugs already present in the device’s existing Camera HAL, and thus would
147be found by existing Camera API1 apps. We do not expect many bugs of this nature
148(however, any such bugs must be fixed to pass the Camera API2 CTS tests).</p>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800149
Heidi von Markhamafd1cd72016-07-11 14:05:19 -0700150<h2 id=hardening>Camera framework hardening</h2>
151
152<p>To harden media and camera framework security, Android 7.0 moves camera
153service out of mediaserver. Vendors may need to make changes in the camera HAL
154depending on the API and HAL versions in use. The following sections detail
155architectural changes in AP1 and AP2 for HAL1 and HAL3, as well as general
156requirements.</p>
157
158<h3 id=hardening_api1>Architectural changes for API1</h3>
159<p>API1 video recording may assume camera and video encoder live in the same
160process. When using API1 on:</p>
161
162<ul>
163<li>HAL3, where camera service uses BufferQueue to pass buffers between
164processes, <strong>no vendor update</strong> is necessary.
165<p><img src="images/ape_camera_n_api1_hal3.png" alt="Android 7.0 camera and media
166stack in API1 on HAL3" id="figure1" /></p>
167<p class="img-caption"><strong>Figure 1.</strong>Android 7.0 camera and media
168stack in API1 on HAL3.</p>
169</li>
170<li>HAL1, which supports passing metadata in video buffers, <strong>vendors must
171update the HAL to allow camera and video encoder in different processes</strong>
172(e.g., the HAL cannot store virtual addresses in the metadata).
173<p><img src="images/ape_camera_n_api1_hal1.png" alt="Android 7.0 camera and media
174stack in API1 on HAL1" id="figure1" /></p>
175<p class="img-caption"><strong>Figure 2.</strong>Android 7.0 camera and media
176stack in API1 on HAL1.</p>
177</li>
178</ul>
179
180<h3 id=hardening_api2>Architectural changes for API2</h3>
181<p>For API2 on HAL1 or HAL3, BufferQueue passes buffers so those paths continue
182to work. The Android 7.0 architecture for API2 on:</p>
183
184<ul>
185<li>HAL1 is not affected by the cameraservice move, and <strong>no vendor
186update</strong> is necessary.</li>
187<li>HAL3 <em>is</em> affected, but <strong>no vendor update</strong> is
188necessary:
189<p><img src="images/ape_camera_n_api2_hal3.png" alt="Android 7.0 camera and
190media stack in API2 on HAL2" id="figure1" /></p>
191<p class="img-caption"><strong>Figure 3.</strong>Android 7.0 camera and media
192stack in API2 on HAL3.</p>
193</li>
194</ul>
195
196<h3 id=hardening_general>Additional requirements</h3>
197<p>The architectural changes made for hardening media and camera framework
198security include the following additional device requirements.</p>
199
200<ul>
201<li><strong>General</strong>. Devices require additional bandwidth due to IPC,
202which may affect time-sensitive camera use cases such as high-speed video
203recording. Vendors can measure actual impact by running
204<code>android.hardware.camera2.cts.PerformanceTest</code> and the Google Camera
205App for 120/240 FPS high speed video recording. Devices also require a small
206amount of additional RAM to create the new process.</li>
207<li><strong>Pass metadata in video buffers</strong>(<em>HAL1 only</em>). If HAL1
208stores metadata instead of real YUV frame data in video buffers, the HAL must
209not store anything that is invalid across process boundaries, including native
210handles. If HAL passes native handles in the metadata in video buffers, you must
211update it to use <code>kMetadataBufferTypeNativeHandleSource</code> as the
212metadata buffer type and pass <code>VideoNativeHandleMetadata</code> in video
213buffers.
214<p>With <code>VideoNativeHandleMetadata</code>, camera and media frameworks are
215able to pass the video buffers between processes by serializing and
216deserializing the native handles properly. If HAL chooses to continue using
217<code>kMetadataBufferTypeCameraSource</code> as the metadata buffer type, the
218metadata must be able to be passed between processes as plain values.</p>
219</li>
220<li><strong>Buffer handle address does not always store same buffer</strong>
221(<em>HAL3 only</em>). For each capture request, HAL3 gets addresses of buffer
222handles. HAL cannot use the addresses to identify buffers because the addresses
223may store another buffer handle after HAL returns the buffer. You must update
224the HAL to use buffer handles to identify the buffers. For example: HAL receives
225a buffer handle address A, which stores buffer handle A. After HAL returns
226buffer handle A, buffer handle address A may store buffer handle B next time the
227HAL receives it.</li>
228<li><strong>Update SELinux policies for cameraserver</strong>. If
229device-specific SELinux policies give mediaserver permissions to run the camera,
230you must update the SELinux policies to give cameraserver proper permissions. We
231do not encourage replicating the mediaserver's SELinux policies for cameraserver
232(as mediaserver and cameraserver generally require different resources in the
233system). Cameraserver should have only the permissions needed to perform camera
234functionalities and any unnecessary camera-related permissions in mediaserver
235should be removed.</p>
236
237<h3 id=hardening_validation>Validation</h3>
238<p>For all devices that include a camera and run Android 7.0, verify the
239implementation by running Android 7.0 CTS. Although Android 7.0 does not include
240new CTS tests that verify camera service changes, existing CTS tests will fail
241if you have not made the updates indicated above.</p>
242
243<h2 id="version-history">Camera HAL version history</h2>
244<p>For a list of tests available for evaluating the Android Camera HAL, see the
245<a href="{@docRoot}compatibility/cts/camera-hal.html">Camera HAL Testing
246Checklist</a>.</p>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800247
Clay Murphy4c746142016-07-11 14:11:37 -0700248<h3 id="34">3.4</h3>
249
250<p>Minor additions to supported metadata and changes to data_space support:</p>
251
252<ul>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700253<li>Add <code>ANDROID_SENSOR_OPAQUE_RAW_SIZE</code> static metadata as mandatory
254if <code>RAW_OPAQUE</code> format is supported.</li>
255<li>Add <code>ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE</code> static
256metadata as mandatory if any RAW format is supported.</li>
257<li>Switch <code>camera3_stream_t data_space</code> field to a more flexible
258definition, using the version 0 definition of dataspace encoding.</li>
259<li>General metadata additions which are available to use for HALv3.2 or newer:
260 <ul>
261 <li>
262 <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#INFO_SUPPORTED_HARDWARE_LEVEL_3"><code>ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3</code>
263 </a></li>
264 <li><code>ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST</code></li>
265 <li><code>ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE</code></li>
266 <li><code>ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL</code></li>
267 <li><code>ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL</code></li>
268 <li><code>ANDROID_SENSOR_OPAQUE_RAW_SIZE</code></li>
269 <li><code>ANDROID_SENSOR_OPTICAL_BLACK_REGIONS</code></li>
270 </ul>
Clay Murphy4c746142016-07-11 14:11:37 -0700271 <li>
272</ul>
273
274<h3 id="33">3.3</h3>
275
276<p>Minor revision of expanded-capability HAL:</p>
277
278<ul>
279 <li>OPAQUE and YUV reprocessing API updates.</li>
280 <li>Basic support for depth output buffers.</li>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700281 <li>Addition of <code>data_space</code> field to
282 <code>camera3_stream_t</code>.</li>
283 <li>Addition of rotation field to <code>camera3_stream_t</code>.</li>
Clay Murphy4c746142016-07-11 14:11:37 -0700284 <li>Addition of camera3 stream configuration operation mode to
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700285 <code>camera3_stream_configuration_t</code>.</li>
Clay Murphy4c746142016-07-11 14:11:37 -0700286</ul>
287
Clay Murphy0d4125a2015-02-24 16:52:40 -0800288<h3 id="32">3.2</h3>
289
Clay Murphy4c746142016-07-11 14:11:37 -0700290<p>Minor revision of expanded-capability HAL:</p>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800291
292<ul>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700293<li>Deprecates <code>get_metadata_vendor_tag_ops</code>. Use
294<code>get_vendor_tag_ops</code> in <code>camera_common.h</code> instead.</li>
295<li>Deprecates <code>register_stream_buffers</code>. All gralloc buffers
296provided by framework to HAL in <code>process_capture_request</code> may be new
297at any time.</li>
298<li>Add partial result support. <code>process_capture_result</code> may be
299called multiple times with a subset of the available results before the full
300result is available.</li>
301<li>Add manual template to <code>camera3_request_template</code>. Applications
302may use this template to control the capture settings directly.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800303<li>Rework the bidirectional and input stream specifications.</li>
304<li>Change the input buffer return path. The buffer is returned in
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700305<code>process_capture_result</code> instead of
306<code>process_capture_request</code>.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800307</ul>
308
309<h3 id="31">3.1</h3>
310
311<p>Minor revision of expanded-capability HAL:</p>
312
313<ul>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700314<li><code>configure_streams</code> passes consumer usage flags to the HAL.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800315<li>flush call to drop all in-flight requests/buffers as fast as possible.</li>
316</ul>
317
318<h3 id="30">3.0</h3>
319
320<p>First revision of expanded-capability HAL:</p>
321
322<ul>
323<li>Major version change since the ABI is completely different. No change to the
324required hardware capabilities or operational model from 2.0.</li>
325<li>Reworked input request and stream queue interfaces: Framework calls into HAL
326with next request and stream buffers already dequeued. Sync framework support
327is included, necessary for efficient implementations.</li>
328<li>Moved triggers into requests, most notifications into results.</li>
329<li>Consolidated all callbacks into framework into one structure, and all setup
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700330methods into a single <code>initialize()</code> call.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800331<li>Made stream configuration into a single call to simplify stream management.
332Bidirectional streams replace STREAM_FROM_STREAM construct.</li>
333<li>Limited mode semantics for older/limited hardware devices.</li>
334</ul>
335
336<h3 id="20">2.0</h3>
337
338<p>Initial release of expanded-capability HAL (Android 4.2) [camera2.h]:</p>
339
340<ul>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700341<li>Sufficient for implementing existing <code>android.hardware.Camera</code>
342API.</li>
343<li>Allows for ZSL queue in camera service layer.</li>
344<li>Not tested for any new features such as manual capture control, Bayer RAW
345capture, reprocessing of RAW data, etc.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800346</ul>
347
348<h3 id="10">1.0</strong></h3>
349
350<p>Initial Android camera HAL (Android 4.0) [camera.h]:</p>
351
352<ul>
353<li>Converted from C++ CameraHardwareInterface abstraction layer.</li>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700354<li>Supports <code>android.hardware.Camera</code> API.</li>
Clay Murphy0d4125a2015-02-24 16:52:40 -0800355</ul>
Clay Murphy4c746142016-07-11 14:11:37 -0700356
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700357<h2 id=module_version>Camera module version history</h2>
Clay Murphy4c746142016-07-11 14:11:37 -0700358
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700359<p>This section contains module versioning information for the Camera hardware
360module, based on <code>camera_module_t.common.module_api_version</code>. The two
361most significant hex digits represent the major version, and the two least
362significant represent the minor version.</p>
Clay Murphy4c746142016-07-11 14:11:37 -0700363
364<h3 id="24">2_4</h3>
365
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700366<p>This camera module version adds the following API changes:</p>
Clay Murphy4c746142016-07-11 14:11:37 -0700367
368<ol>
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700369 <li><em>Torch mode support</em>. The framework can turn on torch mode for any
370 camera device that has a flash unit, without opening a camera device. The
Clay Murphy4c746142016-07-11 14:11:37 -0700371 camera device has a higher priority accessing the flash unit than the camera
372 module; opening a camera device will turn off the torch if it had been enabled
373 through the module interface. When there are any resource conflicts, such as
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700374 <code>open()</code> is called to open a camera device, the camera HAL module
375 must notify the framework through the torch mode status callback that the torch
376 mode has been turned off.</li>
Clay Murphy4c746142016-07-11 14:11:37 -0700377
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700378 <li><em>External camera (e.g. USB hot-plug camera) support</em>. The API
379 updates specify the camera static info is available only when camera is
380 connected and ready to use for external hot-plug cameras. Calls to get static
381 info will be invalid calls when camera status is not
382 <code>CAMERA_DEVICE_STATUS_PRESENT</code>. The framework counts solely on
383 device status change callbacks to manage the available external camera list.
384 </li>
Clay Murphy4c746142016-07-11 14:11:37 -0700385
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700386 <li><em>Camera arbitration hints</em>. Adds support for explicitly indicating
387 the number of camera devices that can be simultaneously opened and used. To
388 specify valid combinations of devices, the <code>resource_cost</code> and
389 <code>conflicting_devices</code> fields should always be set in the
390 <code>camera_info</code> structure returned by the <code>get_camera_info</code>
391 call.</li>
Clay Murphy4c746142016-07-11 14:11:37 -0700392
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700393 <li><em>Module initialization method</em>. Called by the camera service
394 after the HAL module is loaded to allow for one-time initialization of the HAL.
395 It is called before any other module methods are invoked.</li>
Clay Murphy4c746142016-07-11 14:11:37 -0700396</ol>
397
398<h3 id="23">2_3</h3>
399
400<p>This camera module version adds open legacy camera HAL device support.
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700401 The framework can use it to open the camera device as lower device HAL version
Clay Murphy4c746142016-07-11 14:11:37 -0700402 HAL device if the same device can support multiple device API versions.
403 The standard hardware module open call (common.methods->open) continues
404 to open the camera device with the latest supported version, which is
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700405 also the version listed in <code>camera_info_t.device_version</code>.</p>
Clay Murphy4c746142016-07-11 14:11:37 -0700406
407<h3 id="22">2_2</h3>
408
409<p>This camera module version adds vendor tag support from the module, and
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700410deprecates the old <code>vendor_tag_query_ops</code> that were previously only
Clay Murphy4c746142016-07-11 14:11:37 -0700411accessible with a device open.</p>
412
413<h3 id="21">2_1</h3>
414
415<p>This camera module version adds support for asynchronous callbacks to the
416framework from the camera HAL module, which is used to notify the framework
417about changes to the camera module state. Modules that provide a valid
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700418<code>set_callbacks()</code> method must report at least this version number.</p>
Clay Murphy4c746142016-07-11 14:11:37 -0700419
420<h3 id="20">2_0</h3>
421
422<p>Camera modules that report this version number implement the second version
423of the camera module HAL interface. Camera devices openable through this
424module may support either version 1.0 or version 2.0 of the camera device
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700425HAL interface. The <code>device_version</code> field of camera_info is always
426valid; the <code>static_camera_characteristics</code> field of
427<code>camera_info</code> is valid if the <code>device_version</code> field is
4282.0 or higher.</p>
Clay Murphy4c746142016-07-11 14:11:37 -0700429
430<h3 id="10">1_0</h3>
431
432<p>Camera modules that report these version numbers implement the initial
433camera module HAL interface. All camera devices openable through this
Heidi von Markhama9b85d12016-07-21 13:20:23 -0700434module support only version 1 of the camera device HAL. The
435<code>device_version</code> and <code>static_camera_characteristics</code>
436fields of <code>camera_info</code> are not valid. Only the
437<code>android.hardware.Camera</code> API can be supported by this module and its
Clay Murphy4c746142016-07-11 14:11:37 -0700438devices.</p>