Spreadtrum platform camera driver transplant __OTP

Platform: Spreadtrum system: Andrews 10
We know that OTP include AWB, LSC, AF position, etc. to enhance the imaging results of operations, provided that the sensor processing is lit, open the phone camera can preview properly, taking pictures.

Adding OTP driver, insert the following directories.
sprd / modules / libcamera / sensor / otp_drv / driver /
the portion provided by the manufacturer ships comprising
Android.mk
xxxx_common_golden_otp.h
xxxx_common_otp_drv.h
xxxx_common_otp_drv.c

The following configuration file
vendor / sprd / modules / libcamera / sensor / otp_drv / otp_lib_cfg.mk

  libotp_gc5025_hlt_k131 \

vendor/sprd / modules/libcamera/sensor/sensor_cfg.c

#ifdef GC5025_HLT_K131
extern SENSOR_INFO_T g_gc5025_mipi_raw_info;
extern otp_drv_entry_t gc5025_hlt_k131_otp_drv_entry;
#endif
...
...
#ifdef GC5025_HLT_K131
    {MODULE_SUNNY, "gc5025_k131_hlt", &g_gc5025_mipi_raw_info, {NULL, 0}, {&gc5025_hlt_k131_otp_drv_entry, 0, 0, 0}},
#endif

OTP camera configuration information in the configuration file, add a note of the location
device / sprd / pike2 / kxxx / camera / sensor_config.xml

  sensor id 0
  <-->
      <CameraModuleCfg>
        <SlotId>0</SlotId>
        <SensorName>gc5025_hlt_k131</SensorName>
        <Facing>BACK</Facing>
        <Orientation>270</Orientation>
        <Resource_cost>50</Resource_cost>
      <OTP>
            <E2prom>
                <OtpName>gc5025_hlt_k131</OtpName>
                <I2cAddr>0</I2cAddr>
                <E2promNum>0</E2promNum>
                <E2promSize>0</E2promSize>
            </E2prom>
       </OTP>
        <TuningParameter>
            <TuningName>gc5025_hlt_k131</TuningName>
        </TuningParameter>
      </CameraModuleCfg>
  <!-->

Checking each file to add or change .mk at ensuring that all modifications able to compile correctly.

OTP get through this. If omissions, please forgive me.

Released four original articles · won praise 4 · Views 454

Guess you like

Origin blog.csdn.net/qq_41188615/article/details/104392217