如何修改mtk android 默认拍照size
发布网友
发布时间:2022-04-23 15:14
我来回答
共1个回答
热心网友
时间:2023-10-05 23:26
1.更换 flash 型号
--------------------------------------------------------------
修改: alps/mediatek/custom/lcsh73_gb/preloader/inc/custom_MemoryDevice.h
/*MTK 6573每个片选的范围是 2Gb,默认用CS0来片选 , 如果外挂的RAM是4Gb的话 ,还需要用到CS1来片选后面的2Gb 。*/
/*每个手机配置的flash 需要跑 ECC 才能得到一个合适的时序配置,这个时序需要MTK协助调试 */
#define BOARD_ID MT6573_EVB
/*2Gb ram cs config*/
#define CS0_PART_NUMBER[0] K524G2GACB_A050
/*4Gb ram cs config*/
//#define CS0_PART_NUMBER[0] MT29C4G96MAZAPCJA_5IT
//#define CS1_PART_NUMBER[0] MT29C4G96MAZAPCJA_5IT
/*同一size的多falsh兼容可以按如下方式配置 :flash 4Gb ram cs config*/
//add first flash config
//#define CS0_PART_NUMBER[0] MT29C4G96MAZAPCJA_5IT
//#define CS1_PART_NUMBER[0] MT29C4G96MAZAPCJA_5IT
//add second flash config
//#define CS0_PART_NUMBER[1] EHD013151MA_50
//#define CS1_PART_NUMBER[1] EHD013151MA_50
编译:
//重新生成时序
./mk lcsh73_gb emigen
//重新编译 preloader uboot kernel 三个模块
./mk lcsh73_gb c,r pl ub k
--------------------------------------------------------------
2.更换 camera
--------------------------------------------------------------
修改:
1. alps/mediatek/config/lcsh73_gb/ProjectConfig.mk
/*---------------------------------------------------------------------------------------------------
*
* camera 配置一般有后摄像头(main)和前摄像头(sub)。
*
* 另外每个摄像头还可以配置 是否支持lens 及 flashlight。
*
* 不支持flashlight 则 设置 mmy_flashlight 不支持 lens 则 设置 mmy_lens
*----------------------------------------------------------------------------------------------------*/
CUSTOM_HAL_IMGSENSOR = hi253_yuv hi704_yuv
CUSTOM_KERNEL_IMGSENSOR = hi253_yuv hi704_yuv
CUSTOM_HAL_LENS = mmy_lens mmy_lens
CUSTOM_KERNEL_LENS = mmy_lens mmy_lens
CUSTOM_HAL_MAIN_LENS = mmy_lens
CUSTOM_HAL_SUB_LENS = mmy_lens
CUSTOM_HAL_MAIN_IMGSENSOR = hi253_yuv
CUSTOM_HAL_MAIN_BACKUP_IMGSENSOR =
CUSTOM_HAL_SUB_IMGSENSOR = hi704_yuv
CUSTOM_HAL_SUB_BACKUP_IMGSENSOR =
CUSTOM_KERNEL_FLASHLIGHT = mmy_flashlight
CUSTOM_KERNEL_SUB_LENS = mmy_lens
CUSTOM_KERNEL_MAIN_IMGSENSOR = hi253_yuv
CUSTOM_KERNEL_MAIN_BACKUP_IMGSENSOR =
CUSTOM_KERNEL_SUB_IMGSENSOR = hi704_yuv
CUSTOM_KERNEL_SUB_BACKUP_IMGSENSOR =
2.如果内核中当前没有对应的camera驱动,需要在以下几个地方增加对应的代码。
1)在 alps/mediatek/custom/common/kernel/imgsensor 增加对应的驱动文件夹:
如 hi253_yuv 文件夹,里面包含:
├── hi253yuv_CameraCustomized.h
├── hi253yuv_Camera_Sensor_para.h
├── hi253yuv_Sensor.c
└── hi253yuv_Sensor.h
2)在alps/mediatek/custom/common/kernel/imgsensor/src/kd_sensorlist.h添加对应的驱动结构体
如添加 hi253 yuv的结构体:
UINT32 HI253_YUV_SensorInit(PSENSOR_FUNCTION_STRUCT *pfFunc);
#if defined(HI253_YUV)
{HI253_SENSOR_ID, SENSOR_DRVNAME_HI253_YUV, HI253_YUV_SensorInit},
#endif