MTK Android Driver:camera

Source: Internet
Author: User

MTK Android Driver:camera

1. Relevant code location:
Mediatek\config\xxxx (red Word for specific project name)

Files: projectconfig.mk

Custom_kernel_imgsensor = ... Gc2235_raw

Custom_kernel_main_imgsensor = ... Gc2235_raw

Custom_hal_imgsensor = ... Gc2235_raw

Custom_hal_main_imgsensor = ... Gc2235_raw

Kernel

\mediatek\custom\common\hal\imgsensor\gc2235_raw

Mediatek\custom\common\kernel\imgsensor\src

Files: kd_sensorlist.h

Add Content:

UINT32 gc2235sensorinit (psensor_function_struct *pffunc);

Acdk_kd_sensor_init_function_struct

KDSENSORLIST[MAX_NUM_OF_SUPPORT_SENSOR+1] =

{

#if defined (Gc2235_raw)

{gc2235_sensor_id, Sensor_drvname_gc2235_raw, Gc2235sensorinit},

#endif

};

Mediatek\custom\common\kernel\imgsensor\inc

Files: kd_imgsensor.h

Add Content:

#define GC2235_SENSOR_ID 0x2235

#define SENSOR_DRVNAME_GC2235_RAW "gc2235"

Hal

\mediatek\custom\common\hal\imgsensor\gc2235_raw

Mediatek\custom\common\hal\imgsensor\src

Files: sensorlist.cpp

Add Content:

Msdk_sensor_init_function_struct sensorlist[] =

{

............

#if defined (Gc2235_raw)

Raw_info (gc2235_sensor_id, Sensor_drvname_gc2235_raw, NULL),

#endif

............

};

When adding drivers to kdsensorlist and sensorlist, be aware that the sensor adds the same position. Otherwise the driver will run out of chaos, the ISP parameter is not correct, the heavy sensor cannot be started.

2. Photo Image size Settings:

.. \mediatek\custom\prj\hal\camera\camera\cfg_ftbl_$prj$_raw_main.h

Capture Size

Config_feature (Fid_cap_size,

By_default (capture_size_1600_1200),

/*by_default (capture_size_2560_1920), benmodify*/

capture_size_640_480,

CAPTURE_SIZE_1280_960,CAPTURE_SIZE_1600_1200,

)

3.Camera Physical angle Rotation

90 degrees: \alps\mediatek\custom\ $prj $\hal\imgsensor\src\cfg_setting_imgsensor.cpp

static sensororientation_t Const INST = {

U4DEGREE_0:180,//90,//main sensor in degree (0, 90,180, 270)

U4DEGREE_1:0,//90,//Sub sensor in degree (0, 90, 180, 270)

180 degrees:
Sensor Fae provides modification methods.

4.Camera Same Sensor ID compatible (front and rear sensor ID):

Configuration distinction:

Custom_kernel_imgsensor = gc0308_yuv# GC0308_SUB_YUV

Custom_kernel_main_imgsensor =GC0308_YUV # GC0308_SUB_YUV

Custom_hal_imgsensor = gc0308_yuv# GC0308_SUB_YUV

Custom_hal_main_imgsensor = gc0308_yuv# GC0308_SUB_YUV

Kernel: Function names should also be distinguished

\alps\mediatek\custom\common\kernel\imgsensor\gc0308_sub_yuv

\alps\mediatek\custom\common\kernel\imgsensor\gc0308_yuv

Hal: Function names also need to be distinguished

\alps\mediatek\custom\common\hal\imgsensor\gc0308_sub_yuv

\alps\mediatek\custom\common\hal\imgsensor\gc0308_yuv

Kdsensorlist and sensorlist inside add driver also to distinguish, sensor ID do not distinguish, write consistent, according to front and rear camera switch code to differentiate.

#defineGC0328_SENSOR_ID 0x009d

#defineGC0328_SUB_SENSOR_ID 0x9d9d

MTK Android Driver:camera

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.