MTK camera CTS 除錯遇到的問題及處理方法
一、CTS camera幀率測試不過
log:
Wanted *at least* 3 times: -> at android.hardware.camera2.cts.RobustnessTest.testOutputCombination(RobustnessTest.java:1500) But was 2 times: -> at java.lang.reflect.Method.invoke(Native Method) ) java.lang.Throwable(Test failed for camera 0: Output combination { [PRIV, PREVIEW] [YUV, PREVIEW] [JPEG, MAXIMUM] } failed due to: captureCallback.onCaptureCompleted( android.hardware.camera2.impl.CameraCaptureSessionImpl@fddb6bb, android.hardware.camera2.CaptureRequest@34673ec7, isA(android.hardware.camera2.TotalCaptureResult) ); Wanted *at least* 3 times: -> at android.hardware.camera2.cts.RobustnessTest.testOutputCombination(RobustnessTest.java:1500) But was 2 times: -> at java.lang.reflect.Method.invoke(Native Method) )
問題:拍照速度不夠
處理:
1、修改iic通訊速率:
kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6580/kd_sensorlist.c @@ -3810,7 +3810,7 @@ static int CAMERA_HW_i2c_probe(struct i2c_client *client, const struct i2c_devic spin_lock(&kdsensor_drv_lock); g_pstI2Cclient = client; /* set I2C clock rate */ - g_pstI2Cclient->timing = 100; /* 100k */ + g_pstI2Cclient->timing = 400; /* 100k */ g_pstI2Cclient->ext_flag &= ~I2C_POLLING_FLAG; /* No I2C polling busy waiting */ spin_unlock(&kdsensor_drv_lock); 2、減少delay frame:
kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6580/gc8024_mipi_raw/gc8024mipi_Sensor.c @@ -189,11 +189,11 @@ static imgsensor_info_struct imgsensor_info = { .ihdr_le_firstline = 0, //1,le first ; 0, se first .sensor_mode_num = 3, //support sensor mode num - .cap_delay_frame = 2, //enter capture delay frame num - .pre_delay_frame = 2, //enter preview delay frame num - .video_delay_frame = 2, //enter video delay frame num - .hs_video_delay_frame = 2, //enter high speed video delay frame num - .slim_video_delay_frame = 2,//enter slim video delay frame num + .cap_delay_frame = 0, //enter capture delay frame num + .pre_delay_frame = 0, //enter preview delay frame num + .video_delay_frame = 0, //enter video delay frame num + .hs_video_delay_frame = 0, //enter high speed video delay frame num + .slim_video_delay_frame = 0,//enter slim video delay frame num .isp_driving_current = ISP_DRIVING_6MA, //mclk driving current
3、插值解析度:
vendor/mediatek/proprietary/custom/mt6580/hal/sendepfeature/gc8024_mipi_raw/config.ftbl.gc8024mipi_raw.h
#if 1 // Video Size FTABLE_CONFIG_AS_TYPE_OF_DEFAULT_VALUES( - KEY_AS_(MtkCameraParameters::KEY_VIDEO_SIZE), + KEY_AS_(MtkCameraParameters::KEY_VIDEO_SIZE), SCENE_AS_DEFAULT_SCENE( - ITEM_AS_DEFAULT_("1280x720"), + ITEM_AS_DEFAULT_("640x480"), ITEM_AS_VALUES_( "176x144", "320x240", "352x288", "480x320", "640x480", "720x480", "864x480", "800x600", "1280x720", "1280x768", "1280x960", - "1920x1080", "1920x1088" + "1920x1080", ) ), )