展讯camera驱动调试

camera驱动目录:
vendor/sprd/modules/libcamera/sensor/sensor_drv/classic/Galaxycore/gc030a/
kernel/drivers/misc/sprd_camera/sensor/csi2/csi_sprd/r2p0/csi_driver.c
kernel/arch/arm/boot/dts/sp7731e-1h10-native.dts(reset-gpios = <&ap_gpio 46 0> )

 

vendor/sprd/modules/libcamera / hal3_2v1/SprdCamera3Factory.cpp

函数:int SprdCamera3Factory::getCameraInfo 和 int SprdCamera3Factory::cameraDeviceOpen 中add

           camera_id=1;  强制修改摄像头为1

vendor/sprd/modules/libcamera / hal3_2v1/SprdCamera3Setting.cpp

函数: nt SprdCamera3Setting::getLargestSensorSize 和 int SprdCamera3Setting::getLargestPictureSize 中modify    

   *width = largest_picture_size[cameraId].width;
    *height = largest_picture_size[cameraId].height; 为:    *width = 640;
                                                                                                      *height = 480;

vendor/sprd/modules/libcamera / sensor/sensor_cfg.c

const SENSOR_MATCH_T back_sensor_infor_tab[] = { //定义增加摄像头:

#ifdef GC030A
    {MODULE_SUNNY, "gc030a", &g_gc030a_mipi_raw_info, {NULL, 0}, NULL},
#endif

vendor/sprd/modules/libcamera / sensor/sensor_drv/classic/Galaxycore/gc030a/sensor_gc030a_mipi_raw.h//定义摄像头方向

 #define IMAGE_V_MIRROR

BoardConfig.mk 文件

CAMERA_SUPPORT_SIZE := 0M3
FRONT_CAMERA_SUPPORT_SIZE := 0M3

#camera sensor support list
CAMERA_SENSOR_TYPE_BACK := "gc030a"
CAMERA_SENSOR_TYPE_FRONT := "gc030a"

配置摄像头

 

 

cameraLog搜索关键字:
fail|err|time out|gc030a|Cam3HWI
fail|err|time out|crash|lgc030a|sprdcam|identify

 

 

adb shell dumpsys media.camera > camera.txt //查看camera配置
adb shell pm com.android.camera2 //清除应用缓存

你可能感兴趣的:(展讯camera驱动调试)