Tegra platform back camera driver Implementation 5

Source: Internet
Author: User
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
  1. Extern "C" sp <camerahardwareinterface> hal_opencamerahardware (INT cameraid)
  2. {
  3. Logvv ("hal_opencamerahardware ++ \ n ");
  4. Return nvomxcamera: createinstance (cameraid );
  5. }
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.