目录
Adnroid O之前的Android camera软件框架
Adnroid O camera软件框架
Passthrough Mode
Binderized mode
Wrapper shim for libhardware HALs
Wrapper shim for libhardware HALs
Customized Treble Camera HAL/framework
Camera HAL transition and removal plan
Camera HAL transition and removal plan
Other camera framework changes
Android O metata生成方式
FrameWork HAL1 HAL3
Vendor tag及Flash相关
What is Camera ITS?
Camera framework plans for future releases
Adnroid O之前的Android camera软件框架
Adnroid O camera软件框架
Passthrough Mode
Binderized mode
Wrapper shim for libhardware HALs
1. Google will provide a wrapper shim layer to adapt libhardware camera HAL implementations to the new HIDL interface.
2. Google will provide wrapper shim for both HAL1.0 and HAL3.2~HAL3.4
2.1 HIDL ICameraDevice@1.0 maps to libhardware HAL1.0
2.2 HIDL ICameraDevice@3.2 maps to libhardware HAL3.2 ~ 3.4
2.3 HIDL ICameraProvider@2.4 maps to libhardware module 1.0 and 2.4
3. Partners can use the wrapper shim if you do not have customized HAL API in your code
4. For partners who do have customized HAL APIs, they must implement customized HIDL HAL to add these APIs back. Some parts of wrapper shim source code might still be relevant. Feel free to reuse them.
Wrapper shim for libhardware HALs
Customized Treble Camera HAL/framework
Camera HAL transition and removal plan
1. Android O
1.1 Newly launched devices can still implement HAL1.0, but have to be running binderized mode
1.2 Upgraded device can be HAL1.0 and run passthrough mode
2. Android P and Q
2.1 Newly launched device must implement HAL3 in binderized mode
2.2 Upgraded devices can still be HAL1.0(and run in whichever mode in launch)
3. Android R
3.1 HAL1.0 support will be removed entirely
Camera HAL transition and removal plan
Other camera framework changes
1. Libhardware modules/device API version no longer supported
1.1 Module 2.0 ~ 2.3
It should be fairly easy to upgrade from 2.0 ~ 2.4
The only required API addition in 2.4 is torch API, which saves significant power in flashlight use case.
1.2 Device 3.0 ~ 3.1
No one should be using these version as far as we know.
1.3 ZSL feature in API1 <-> HAL3 shim Was implemented via deprecated “bidirectional” stream tyep, which will be removed in HIDL HAL.
Switch to PRIVATE_REPROCESSING interface in Android O if you want to keep this feature working
Android O metata生成方式
Overview:
The camera.metadata interface is used by the Android camera service, camera provider and camera device to retrieve static camera information and issue camera capture controls.
File path:
android/hardware/interface/camera/metadata/3.2/types.hal
生成文件
android/hardware/camera/metadata/3.2/types.h
Docs:
The docs.html for each version for the detailed description of each metadata Android/system/media/camera/docs/docs.html
FrameWork HAL1 HAL3
FrameWork对HAL1/HAL3的接口控制下移到interface层进行配置定义。
文件路径:
Android/hardware/interface/camera/device/1.0 or 3.2
其中目录下的type.hal定义接口会使用到的类型定义
生成文件路径:
Android/hardware/camera/device/3.2/type.cpp,CameraDeviceAll.cpp,CameraDeviceCallbacAll.cpp,CameraDeviceSessionAll.cpp
Android/hardware/camera/devcie/3.2/ICameraDevice.h, BnCameraDevice.h,BpCameraDevice.h …
PS:编译器加载libhwbinder.so生成各文件,之后Framework通过hwbinder与生成的中间文件进行交互。
Vendor tag及Flash相关
Vendor tag及Flash接口定义文件:
Android/hardware/interface/camera/provider/2.4 (API Version)
Overview:
The camera.provider HAL is used by the Android Camera service to discover,query, and open individual camera devices.
It also allows for direct control of the flash unit of camera device tha have one, for turning on/off torch mode.
File
ICameraProvider.hal ICameraProviderCallback.hal
API
setCallback getVendorTags cameraDeviceStatusChange torchModeStatusChange …
@2.4
First HIDL version of the camera provider HAL.
What is Camera ITS?
1. CameraITS(ITS) is part of Android Compatibility Test suite (CTS)
Includes all tests the require verifying image content
Required for all Android partners
2. Running ITS currently a very manual and time-consuming process
3. List of parts provided to partners
White photo box,tripod,charts,LED lamp
4. Multiple manual scenes
scenes[0, 1, 2, 3, 4, 5]
5. Function tests, not performance metrics
Timestamps, exp/gain, crop/rotation, 3A, etc.
Camera framework plans for future releases
1. Continue delivring new features and optimization for Camera2 and HAL3 in upcoming Android releases.
2. Onging test coverage and infrastructure improvements.
3. API1(deprecated) will continue to exist, working with HAL3 shim.
4. Middleware/SuperHAL layer remains on our future roadmap to better isolate OEM and SoC logics.