SM6125平台扩容camera id的修改方法

SM6125平台默认支持的camera最大逻辑id为3,当id大于4时会出现默认流程不通的情况。可以通过如下修改扩容逻辑id:

  1. cam_sensor_cmn_header.hmsm_sensor_camera_id_t定义中,MAX_CAMERAS的值默认为4,需要增加camera id的配置
enum msm_sensor_camera_id_t {
    CAMERA_0,
    CAMERA_1,
    CAMERA_2,
    CAMERA_3,
+   CAMERA_4,
+   CAMERA_5,
+   CAMERA_6,
    MAX_CAMERAS
}
  1. msm_camsensor_sdk.h
    与cam_sensor_cmn_header.h做同样的修改
enum msm_sensor_camera_id_t {
    CAMERA_0,
    CAMERA_1,
    CAMERA_2,
    CAMERA_3,
+   CAMERA_4,
+   CAMERA_5,
+   CAMERA_6,
    MAX_CAMERAS
}
  1. sensor_sdk_utils.c
    在translate_sensor_slave_info方法中,添加新增camera id对应的处理逻辑。
switch(camera_cfg->camera_id){
    ……
+    case 4:
+        slave_info_k->camera_id = CAMERA_4;
+        break;
+    case 5:
+        slave_info_k->camera_id = CAMERA_5;
+        break;
+    case 6:
+        slave_info_k->camera_id = CAMERA_5;
+        break;
    ……
}
  1. sensor_common.h
    修改MAX_CAMERA_ID_VAL的宏定义
- #define MAX_CAMERA_ID_VAL 3
+ #define MAX_CAMERA_ID_VAL 6
  1. sensor_init.c
    修改MAX_SENSOR_SLOT_NUMBER的宏定义
- #define MAX_SENSOR_SLOT_NUMBER 4
+ #define MAX_SENSOR_SLOT_NUMBER 7

你可能感兴趣的:(android)