經典好文推薦,通過閱讀本文,您將收獲以下知識點:
一、Camx UMD Log Debug
二、Camx KMD log Debug
三、常用縮寫解釋
四、參考文獻
一、Camx UMD Log Debug
1.1 兩種方式設置camx UMD Log
1.2 Camx UMD log 等級
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 |
1.3 Camx UMD log Group
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
1.4 Camx log 打印的標準格式:
CamX: [
eg:
04-25 1629.192 1014 1314 I CamX : [CONFIG][HAL ] camxhal3.cpp:552 open() HalOp: Begin OPEN, logicalCameraId: 0, cameraId: 0
二、Camx KMD log Debug
2.1.kernel log 配置文件
kernel log 配置文件路徑如下:
/sys/module/cam_debug_util/parameters/debug_mdl
2.2 Camx KMD log Group
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
2.3 更多kernel log
需要參考 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
-
高通
+關注
關注
76文章
7445瀏覽量
190389 -
Camera
+關注
關注
0文章
79瀏覽量
20788
原文標題:高通Camera Log Debug
文章出處:【微信號:哆啦安全,微信公眾號:哆啦安全】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論