MTK Android Driver :camera

來源:互聯網
上載者:User

標籤:

MTK Android Driver :camera

1.相關代碼位置:
mediatek\config\XXXX(紅色字為具體的項目名)

檔案: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

檔案:kd_sensorlist.h

新增內容:

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

檔案:kd_imgsensor.h

新增內容:

#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

檔案:sensorlist.cpp

新增內容:

MSDK_SENSOR_INIT_FUNCTION_STRUCT SensorList[] =

{

…………

#if defined(GC2235_RAW)

RAW_INFO(GC2235_SENSOR_ID, SENSOR_DRVNAME_GC2235_RAW, NULL),

#endif

…………

};

在 kdSensorList 和 SensorList 裡面添加驅動的時候要注意,Sensor添加的位置要一樣。否則驅動會跑亂,輕則 ISP 參數不對,重則Sensor 無法啟動。

 

2.拍照圖片尺寸設定:

..\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物理角度旋轉

90度:\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度:
Sensor FAE提供修改方法。

 

4.Camera 相同sensor id相容方式(前後sensor id一致):

//配置區分:

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:函數名也要區分

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

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

 

//hal: 函數名也要區分

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

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

 

//kdSensorList 和 SensorList裡面添加驅動也要區分,sensor id不要區分,寫成一致,根據前後網路攝影機開關代碼區分。

#defineGC0328_SENSOR_ID       0x009D         

#defineGC0328_SUB_SENSOR_ID   0x9D9D      

MTK Android Driver :camera

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.