经典好文推荐,通过阅读本文,您将收获以下知识点:
一、Camx UMD Log Debug
二、Camx KMD log Debug
三、常用缩写解释
四、参考文献
/vendor/etc/camera/camxoverridesettings.txt
设置完需要重启后才可以生效
adb shell setprop
设置完后生效,重启后失效
Camx log 等级包含如下内容:
Log 等级 | Log key | Log Value |
---|---|---|
Verbose Log Mask | logVerboseMask | 0 |
Entry/Exit Log Mask | logEntryExitMask | 0 |
Info Log Mask | logInfoMask | 0xFFFFFFFF |
Warning Log Mask | logWarningMask | 0xFFFFFFFF |
System Log Enable | systemLogEnable | TRUE |
所有log打开 | logkey eg :logWarningMask | Logvalue eg: 0xFFFFFFFF |
Camx UMD log Group 控制主要采用32位二进制数值进行控制开关。
比如关闭全为0
0000 0000 0000 0000 0000 0000 0000 0000
Camx UMD Log Group 举例如下:
typedef UINT32 CamxLogGroup;
static const CamxLogGroup CamxLogGroupNone = (1 << 0); /0x1 //< Generic group
static const CamxLogGroup CamxLogGroupSensor = (1 << 1); /0x2 //< Sensor
static const CamxLogGroup CamxLogGroupIFace = (1 << 2); /0x4 //< IFace
static const CamxLogGroup CamxLogGroupISP = (1 << 3); /0x8 //< ISP
static const CamxLogGroup CamxLogGroupPProc = (1 << 4); /0x10 //< Post Processor
static const CamxLogGroup CamxLogGroupImgLib = (1 << 5); /0x20 //< Image Lib
static const CamxLogGroup CamxLogGroupCPP = (1 << 6); /0x40 //< CPP
static const CamxLogGroup CamxLogGroupHAL = (1 << 7); /0x80 //< HAL
static const CamxLogGroup CamxLogGroupJPEG = (1 << 8); /0x100 //< JPEG
static const CamxLogGroup CamxLogGroupStats = (1 << 9); /0x200 //< Stats
static const CamxLogGroup CamxLogGroupCSL = (1 << 10); /0x400 //< CSL
static const CamxLogGroup CamxLogGroupApp = (1 << 11); /0x800 //< Application
static const CamxLogGroup CamxLogGroupUtils = (1 << 12); /0x1000 //< Utilities
static const CamxLogGroup CamxLogGroupSync = (1 << 13); /0x2000 //< Sync
static const CamxLogGroup CamxLogGroupMemSpy = (1 << 14); /0x4000 //< MemSpy
static const CamxLogGroup CamxLogGroupAssert = (1 << 15); /0x8000 //< Asserts
static const CamxLogGroup CamxLogGroupCore = (1 << 16); /0x10000 //< Core
static const CamxLogGroup CamxLogGroupHWL = (1 << 17); /0x20000 //< HWL
static const CamxLogGroup CamxLogGroupChi = (1 << 18); /0x40000 //< CHI
static const CamxLogGroup CamxLogGroupDRQ = (1 << 19); /0x80000 //< DRQ
static const CamxLogGroup CamxLogGroupFD = (1 << 20); /0x100000 //< FD
static const CamxLogGroup CamxLogGroupIQMod = (1 << 21); /0x200000 //< IQ module
static const CamxLogGroup CamxLogGroupLRME = (1 << 22); /0x400000 //< LRME
static const CamxLogGroup CamxLogGroupNCS = (1 << 23); /0x800000 //< NCS
static const CamxLogGroup CamxLogGroupMeta = (1 << 24); /0x1000000 //< Metadata
static const CamxLogGroup CamxLogGroupAEC = (1 << 25); /0x2000000 //< AEC
static const CamxLogGroup CamxLogGroupAWB = (1 << 26); /0x4000000 //< AWB
static const CamxLogGroup CamxLogGroupAF = (1 << 27); /0x8000000 //< AF
如果打开不同group 的log,那么修改对应的值即可。
比如:
单独打开 CSL HAL Sensor CHI 三组Info Log Mask
CHI CSL HAL Sensor
0 0 0 4 0 4 8 2 =0x40482
0000 0000 0000 0100 0000 0100 1000 0010
logWarningMask=0x00040482
logWarningMask=0x40482
此时log mask 可以使用上面两种,注意,前面的0可以省略,后面的0不可以省略。
比如:
打开所有的 Verbose Log Mask
0xFFFFFFFF 打开所有的log
logVerboseMask=0xFFFFFFFF
CamX: [
eg:
04-25 1629.192 1014 1314 I CamX : [CONFIG][HAL ] camxhal3.cpp:552 open() HalOp: Begin OPEN, logicalCameraId: 0, cameraId: 0
kernel log 配置文件路径如下:
/sys/module/cam_debug_util/parameters/debug_mdl
Camx KMD log控制采用32位二进制数值进行控制开关。
0000 0000 0000 0000 0000 0000 0000 0000
Camx KMD Log Group 举例如下:
#define CAM_CDM (1 << 0) /0x1 //Camera 数据传输 Camera data mover
#define CAM_CORE (1 << 1) /0x2
#define CAM_CPAS (1 << 2) /0x4 //Camera 外设 Camera peripherals and support
#define CAM_ISP (1 << 3) /0x8 //图像信号处理器 Image single processer
#define CAM_CRM (1 << 4) /0x10 //Camera 请求管理 Camera request manager
#define CAM_SENSOR (1 << 5) /0x20
#define CAM_SMMU (1 << 6) /0x40 //共享内存管理单元 Shared Memory management unit
#define CAM_SYNC (1 << 7) /0x80
#define CAM_ICP (1 << 8) /0x100 //图像控制处理器 Image control processer
#define CAM_JPEG (1 << 9) /0x200
#define CAM_FD (1 << 10) /0x400
#define CAM_LRME (1 << 11) /0x800 //低运动估算 Low reolution motion estiamtion
#define CAM_FLASH (1 << 12) /0x1000
#define CAM_ACTUATOR (1 << 13) /0x2000
#define CAM_CCI (1 << 14) /0x4000 //camera 控制接口 Camera control interface eg:i2c gpio
#define CAM_CSIPHY (1 << 15) /0x8000 //Camera 串口处理接口 Camera serial interface eg: MIPI
#define CAM_EEPROM (1 << 16) /0x10000
#define CAM_UTIL (1 << 17) /0x20000
#define CAM_HFI (1 << 18) /0x40000 //Camera 固件接口 Host-firmware interface
#define CAM_CTXT (1 << 19) /0x80000
#define CAM_OIS (1 << 20) /0x100000
#define CAM_RES (1 << 21) /0x200000 //Camera shared resource API
#define CAM_MEM (1 << 22) /0x400000
/* CAM_IRQ_CTRL: For events in irq controller */
#define CAM_IRQ_CTRL (1 << 23) /0x800000
/* CAM_REQ: Tracks a request submitted to KMD */
#define CAM_REQ (1 << 24) /0x1000000
/* CAM_PERF: Used for performance (clock, BW etc) logs */
#define CAM_PERF (1 << 25) /0x2000000
#define CAM_CUSTOM (1 << 26) /0x4000000
#define CAM_PRESIL (1 << 27) /0x8000000
比如:
打开 CAM_ISP CAM_SENSOR CAM_ICP
CAM_ICP CAM_SENSOR CAM_ISP
0 0 0 0 0 1 2 8 = 0x128
0000 0000 0000 0000 0000 0001 0010 1000
adb 调试命令如下
adb root
adb remount
adb shell “echo 0x128 > /sys/module/cam_debug_util/parameters/debug_mdl”
adb shell cat /proc/kmsg > name_of_kmd_logs.txt
需要参考 80-p9301-61_p_qualcomm_spectra_linux_camera_debugging_user_guide.pdf 这个文档
部分camera 缩写请参考下面表格
缩写 | 全称 | 备注 |
---|---|---|
UMD | User Mode Driver | 用户模式驱动 |
KMD | Kernel Mode Driver | 内核模式驱动 |
IFE | Image Front End | 图片前端处理 |
TFE | Thin Front End | Thin 前端 |
IPE | Image Processing Engine | 图片处理引擎 |
ISP | Image Singal Processor | 图像信号处理器 |
CCI | Camera control interface | Camera 控制接口 |
CSI | Camera Serial interface | Camera 序列话接口 |
CSID | Camera Serial interface Decoder | Camera 序列话接口解码器 |
1.80-p9301-61_p_qualcomm_spectra_linux_camera_debugging_user_guide.pdf
2.【腾讯文档】Camera学习知识库https://docs.qq.com/doc/DSWZ6dUlNemtUWndv
全部0条评论
快来发表一下你的评论吧 !