1 ## Camera Device HAL ## 2 --- 3 4 ## Overview: ## 5 6 The camera.device HAL interface is used by the Android camera service to operate 7 individual camera devices. Instances of camera.device HAL interface can be obtained 8 via one of the ICameraProvider::getCameraDeviceInterface_V<N>_x() methods, where N 9 is the major version of the camera device interface. 10 11 Obtaining the device interface does not turn on the respective camera device; 12 each camera device interface has an actual open() method to begin an active 13 camera session. Without invoking open(), the interface can be used for querying 14 camera static information. 15 16 More complete information about the Android camera HAL and subsystem can be found at 17 [source.android.com](http://source.android.com/devices/camera/index.html). 18 19 ## Version history: ## 20 21 ### ICameraDevice.hal (at] 1.0: 22 23 HIDL version of the legacy camera device HAL. Intended as a shim for devices 24 needing to use the deprecated pre-HIDL camera device HAL v1.0. 25 26 May be used in HIDL passthrough mode for devices upgrading to the Android O 27 release; must be used in binderized mode for devices launching in the O release. 28 29 It is strongly recommended to not use this interface for new devices, as new 30 devices may not use this interface starting with the Android P release, and all 31 support for ICameraDevice@1.0 will be removed with the Android R release. 32 33 This HAL interface version only allows support at the LEGACY level for the 34 android.hardware.camera2 API. 35 36 Added in Android 8.0. 37 38 Subsidiary HALs: 39 40 #### ICameraDevice1PreviewCallback.hal (at] 1.0: 41 42 Callback interface for obtaining, filling, and returning graphics buffers for 43 preview operation with the ICameraDevice@1.0 inteface. 44 45 #### ICameraDevice1Callback.hal (at] 1.0: 46 47 Callback interface for sending events and data buffers from the HAL to the 48 camera service. 49 50 ### ICameraDevice.hal (at] 3.2: 51 52 HIDL version of the baseline camera device HAL, required for LIMITED or FULL 53 operation through the android.hardware.camera2 API. 54 55 The main HAL contains methods for static queries about the device, similar to 56 the HALv3-specific sections of the legacy camera module HAL. Simply obtaining an 57 instance of the camera device interface does not turn on the camera device. 58 59 May be used in passthrough mode for devices upgrading to the Android O release; 60 must be used in binderized mode for all new devices launching with Android O or 61 later. 62 63 The open() method actually opens the camera device for use, returning a Session 64 interface for operating the active camera. It takes a Callback interface as an 65 argument. 66 67 Added in Android 8.0. 68 69 Subsidiary HALs: 70 71 #### ICameraDevice3Session.hal (at] 3.2: 72 73 Closely matches the features and operation of the pre-HIDL camera device HAL 74 v3.2, containing methods for configuring an active camera device and submitting 75 capture requests to it. 76 77 #### ICameraDevice3Callback.hal (at] 3.2: 78 79 Callback interface for sending completed captures and other asynchronous events 80 from tehe HAL to the client. 81 82 ### ICameraDevice.hal (at] 3.3: 83 84 A minor revision to the ICameraDevice.hal@3.2. 85 86 - Adds support for overriding the output dataspace of a stream, which was 87 supported in the legacy camera HAL. 88 89 Added in Android 8.1. 90 91 ### ICameraDevice.hal (at] 3.4: 92 93 A minor revision to the ICameraDevice.hal@3.3. 94 95 - Adds support for session parameters during stream configuration. 96 97 Added in Android 9 98