如何配置同一个型号摄像头做前后摄

一.驱动

    1. 在kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6735/ 文件夹加入摄像头驱动代码
        gc2235main_mipi_raw/  //主摄像头文件夹
        gc2235_mipi_raw/          //副摄像头文件夹
    主摄像头里面要做一些判断,和赋值。
 
 
2.kernel-3.18/drivers/misc/mediatek/imgsensor/inc/kd_imgsensor.h  新增ID和名字
    #define GC2355_SENSOR_ID                        0x2355
    
    #define SENSOR_DRVNAME_GC2235_MIPI_RAW          "gc2235mipiraw"
    #define SENSOR_DRVNAME_GC2235MAIN_MIPI_RAW          "gc2235mainmipiraw"
 
3.kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6735/camera_hw/加入相应的上电时序
    kdCISModulePowerOn函数中加入单独的上下电控制逻辑
     } else  if ((currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2755_MIPI_RAW, currSensorName)))||
(currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2235_MIPI_RAW, currSensorName)))||
(currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2235MAIN_MIPI_RAW, currSensorName)))){
  .......................
 
 
 
二.效果文件
   1.vendor/mediatek/proprietary/custom/mt6735/hal/D1/imgsensor/gc2235main_mipi_raw下
      
    重命名所以得gc2235文件,并把内部文件GC2235都改成GC2235MAIN
 
2.vendor/mediatek/proprietary/custom/mt6735/hal/D1/sendepfeature/gc2235main_mipi_raw/下修改成
    config.ftbl.gc2235main_mipi_raw.h
 
3.device/mediatek/common/kernel-headers/kd_imgsensor.h文件中修改ID
   #define GC2235_SENSOR_ID                        0x2235
   #define GC2235MAIN_SENSOR_ID                        0x2236
 如果不修改会导致冲突。
 
 4.其他文件和GC2235一样
 

 

posted @ 2020-11-25 14:20  luoyuna  阅读(401)  评论(0编辑  收藏  举报