例如,配置sub sensor s5k2t7sp 成FF
1、配置projectconfig.mk文件
1)CUSTOM_HAL_LENS = lc898212xdaf bu6424af ak7371af dummy_lens
2)CUSTOM_HAL_SUB_LENS = dummy_lens
2、/vendor/mediatek/proprietary/custom/mtXXXX/hal/lens/src/lenslist.cpp文件中,LensList_sub数组sensor id对应的lens id 配置成dummy如 1),或者只配dummy如2)
1)MSDK_LENS_INIT_FUNCTION_STRUCT LensList_sub[MAX_NUM_OF_SUPPORT_LENS] =
{
{S5K2T7SP_SENSOR_ID, DUMMY_MODULE_ID, DUMMY_LENS_ID, "Dummy", pDummy_getDefaultData},
};
2)MSDK_LENS_INIT_FUNCTION_STRUCT LensList_sub[MAX_NUM_OF_SUPPORT_LENS] =
{
{DUMMY_SENSOR_ID, DUMMY_MODULE_ID, DUMMY_LENS_ID, "Dummy", pDummy_getDefaultData},
};
3、 把AF_MODE相关的所有meta配置成OFF
1)/vendor/mediatek/proprietary/custom/mtXXXX/hal/imgsensor_metadata/s5k2t7sp_mipi_raw/config_static_metadata.tuning_3a.s5k2t7spmipiraw.h 文件中MTK_CONTROL_AF_AVAILABLE_MODES 配置成MTK_CONTROL_AF_MODE_OFF
如下:
CONFIG_METADATA_BEGIN(MTK_CONTROL_AF_AVAILABLE_MODES)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
2)/vendor/mediatek/proprietary/custom/mtXXXX/hal/imgsensor_metadata/s5k2t7sp_mipi_raw/config_static_metadata.tuning_3a.s5k2t7spmipiraw.h 文件中MTK_CONTROL_SCENE_MODE_OVERRIDES 所有scene mode 的AF mode都配置成MTK_CONTROL_AF_MODE_OFF
CONFIG_METADATA_BEGIN(MTK_CONTROL_SCENE_MODE_OVERRIDES)
// MTK_CONTROL_SCENE_MODE_FACE_PRIORITY
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_OFF, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
// MTK_CONTROL_SCENE_MODE_FACE_PRIORITY
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_OFF, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
// MTK_CONTROL_SCENE_MODE_ACTION
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_ON, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_ON, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
........
// MTK_CONTROL_SCENE_MODE_BARCODE
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_ON, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
CONFIG_ENTRY_VALUE(MTK_CONTROL_AE_MODE_ON, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AWB_MODE_AUTO, MUINT8)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
3) vendor/mediatek/proprietary/custom/mtXXXX/hal/imgsensor_metadata/s5k2t7sp_mipi_raw/config_request_metadata__.h里每个requestType的MTK_CONTROL_AF_MODE 配置成MTK_CONTROL_AF_MODE_OFF
如下:
switch (requestType)
{
{
case CAMERA3_TEMPLATE_PREVIEW:
......
CONFIG_METADATA_BEGIN(MTK_CONTROL_AF_MODE)//CONTROL_AF_MODE_AUTO (available)
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)
CONFIG_METADATA_END()
......
......
}
4、/vendor/mediatek/proprietary/custom/mtXXXX/hal/imgsensor_metadata/s5k2t7sp_mipi_raw/config_static_metadata.lens.s5k2t7spmipiraw.h文件中把meta data MTK_LENS_INFO_MINIMUM_FOCUS_DISTANCE配置成0
如下:
CONFIG_METADATA_BEGIN(MTK_LENS_INFO_MINIMUM_FOCUS_DISTANCE)
CONFIG_ENTRY_VALUE((0), MFLOAT) // 5 cm min focus distance
CONFIG_METADATA_END()
CONFIG_ENTRY_VALUE((0), MFLOAT) // 5 cm min focus distance
CONFIG_METADATA_END()
5、/vendor/mediatek/proprietary/custom/mtXXXX/hal/imgsensor_metadata/s5k2t7sp_mipi_raw/config_static_metadata.tuning_3a.s5k3p3spmipiraw.h文件中把meta data MTK_CONTROL_MAX_REGIONS 第三个config配置成0
如下:
CONFIG_METADATA_BEGIN(MTK_CONTROL_MAX_REGIONS)
CONFIG_ENTRY_VALUE(1, MINT32)
CONFIG_ENTRY_VALUE(1, MINT32)
CONFIG_ENTRY_VALUE(0, MINT32)
CONFIG_METADATA_END()