Implementation Process of camera hal
Next we will introduce the implementation process of camera Hal. to implement a specific function of camera, A hardware-related camera library is required at the Hal layer (for example, by calling the video for Linux driver and JPEG encoding program or directly using the private library implemented by each chip vendor ). the latter ), for example, libcamera implemented by Qualcomm. so and libqcamera. so) to implement the interface specified by camerahardwareinterface, call the relevant library, drive the relevant driver, and perform operations on the camera hardware. This library will be called by the service library libcameraservice. So of camera.
Camera file charts
The specific implementation documents are shown in the table:
Hal code:
Vendor/NVIDIA/tegra/hal/libnvomxcamera:
Custcamerasettingsdefinition. cpp
Nvomxcameracallbacks. h
Nvomxcamera. cpp
Nvomxcamera. h
Nvomxcamerasettingsdefinition. h
Nvomxcamerasettingsparser. cpp
Nvomxcamerasettingsparser. h
Interface implemented by hal
The special features in tegra2 are nvomxcamera. cpp and libcamera. So, which implement the camerahardwareinterface interface. opencamerahardware () is implemented in this library.
C/C ++ code
- Extern "C" sp <camerahardwareinterface> hal_opencamerahardware (INT cameraid)
- {
- Logvv ("hal_opencamerahardware ++ \ n ");
- Return nvomxcamera: createinstance (cameraid );
- }
Main Library of camera hal
Vendor/NVIDIA/tegra/CORE/Drivers/openmax/IL, libnvomx. so: OMX core library, libnvodm_imager.so: The Hal library of the ODM image. By default, NV only provides binary. During full build, the Library is copied to the system directory, then integrated into system. IMG. Libnvodm_query.so: the ODM Query Library. The configuration of gpio, power supply, I2C, and other related hardware is completed in this library.
My personal opinion on the front and back camera of pad is that the upper layer tells the bottom layer which camera to use and OMX graph will be re-built each time, different camera hardware is used in the final enable port. The upper-layer processing is basically consistent.