Capture user mode logs
A variety of log levels available in the camera software. Based on need, developers can enable these log levels to debug issues efficiently. Log levels are controlled through the following override settings.| Description | Override setting | Default 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 |
- On first use, create a text filename
camxoverridesettings.txt. - Add the required log mask to this text file. For example, LogVerboseMask=0XFF11 and LogInfoMask=0x1C09811.
- Push the modified file to
/var/cache/camera/camxoverridesettings.txt.A device reboot may be required after changing override settings.
/var/cache/camera/camxoverridesettings.txt file:
Camera UMD logs
The camera driver is implemented with debug log messages. The log messages can be filtered to limit what’s displayed according to user interest (verbosity level and group). Each log comes from a specified group and has a verbosity level ranging from verbose to error. All camera debug logs follow the same format:| Error | Fatal and non-fatal errors. Errors can’t guarantee successful continued operation. |
|---|---|
| Warning | Non-fatal conditions which are unexpected, but not necessarily an error. Used to indicate issues such as slow performance paths, fallback code, etc. |
| Entry or exit | Entry or exit API tracing. Allows simple, high-level call flow logging. |
| Info | Informational logs, short one-time configuration, etc. |
| Verbose | All other logs. Doesn’t necessarily provide any useful information for debugging purposes. |
Camera user mode logging groups
The driver is split into various logical components known as groups. Using a specific group allows you to reduce the amount of log messages sent to the component(s) you are interested in obtaining information from. This is accomplished with a bitmask to selectively choose which logs to enable from different components of the camera system. The following table lists the UMD logging groups.| Driver group name | Value | Description |
|---|---|---|
| CamxLogGroupAFD | (1<< 0) | AFD |
| CamxLogGroupSensor | (1<< 1) | Sensor |
| CamxLogGroupTracker | (1<< 2) | Tracker |
| CamxLogGroupISP | (1<< 3) | ISP |
| CamxLogGroupPProc | (1<< 4) | Post processor |
| CamxLogGroupMemMgr | (1 << 5) | MemMgr |
| CamxLogGroupPower | (1 << 6) | Power (clock, bandwidth related) |
| CamxLogGroupHAL | (1<< 7) | HAL |
| CamxLogGroupJPEG | (1<< 8) | JPEG |
| CamxLogGroupStats | (1<< 9) | 3A algorithms |
| CamxLogGroupCSL | (1<< 10) | Camera service layer |
| CamxLogGroupApp | (1<< 11) | Application |
| CamxLogGroupUtils | (1<< 12) | Utilities |
| CamxLogGroupSync | (1<< 13) | Synchronization/mutex/fences |
| CamxLogGroupMemSpy | (1<< 14) | MemSpy |
| CamxLogGroupFormat | (1<< 15) | Format |
| CamxLogGroupCore | (1<< 16) | Core camera system |
| CamxLogGroupHWL | (1<< 17) | Hardware layer |
| CamxLogGroupChi | (1<< 18) | CameraHALinterface |
| CamxLogGroupDRQ | (1<< 19) | Deferred request queue |
| CamxLogGroupFD | (1<< 20) | Face detection |
| CamxLogGroupIQMod | (1<< 21) | IQ module |
| CamxLogGroupLRME | (1<< 22) | LRME |
| CamxLogGroupCVP | (1<< 22) | CVP |
| CamxLogGroupNCS | (1<< 23) | NCS |
| CamxLogGroupMeta | (1<< 24) | Metadata |
| CamxLogGroupAEC | (1<< 25) | AEC |
| CamxLogGroupAWB | (1<< 26) | AWB |
| CamxLogGroupAF | (1<< 27) | AF |
| CamxLogGroupSWP | (1<< 28) | SW Process |
| CamxLogGroupHist | (1<< 29) | HistogramProcess |
| CamxLogGroupBPS | (1<< 30) | BPS |
| CamxLogGroupDebugData | (1<< 31) | Debug data framework, 3A debug data, and tuning metadata |
Capture kernel mode logs
KMD log messages are enabled by default and appear in the kernel logs. Camera KMD logs all start with the CAM prefix. Additional debugging logs are available in the KMD and are controlled through groups. The following table lists the KMD logging groups.| KMD group | Value | Description |
|---|---|---|
| CAM_CDM | (1<< 0) | Camera data mover |
| CAM_CORE | (1<< 1) | Camera core |
| CAM_CPAS | (1<< 2) | Camera peripherals and support |
| CAM_ISP | (1<< 3) | Image signal processor |
| CAM_CRM | (1<< 4) | Camera request manager |
| CAM_SENSOR | (1<< 5) | Sensor |
| CAM_SMMU | (1<< 6) | Shared memory management unit |
| CAM_SYNC | (1<< 7) | Synchronization |
| CAM_ICP | (1<< 8) | Image control processor |
| CAM_JPEG | (1<< 9) | JPEG |
| CAM_FD | (1<< 10) | Face detection |
| CAM_LRME | (1<< 11) | Low resolution motion estimation |
| CAM_FLASH | (1<< 12) | Flash |
| CAM_ACTUATOR | (1<< 13) | Actuator |
| CAM_CCI | (1<< 14) | Camera control interface |
| CAM_CSIPHY | (1<< 15) | Camera serial interface |
| CAM_EEPROM | (1<< 16) | Electronically erasable programmable read-only memory |
| CAM_UTIL | (1<< 17) | Utilities |
| CAM_HFI | (1<< 18) | Host-firmware interface |
| CAM_CTXT | (1<< 19) | Camera context |
| CAMX_OIS | (1<< 20) | Optical image stabilization |
| CAM_RES | (1<< 21) | Camera shared resource API |
| CAM_MEM | (1<< 22) | For camera memory manager |
| CAM_IRQ_CTRL | (1<< 23) | For events in IRQ controller |
| CAM_REQ | (1<< 24) | Tracks a request submitted to KMD |
| CAM_PERF | (1<< 25) | Used for performance (clock, bandwidth, etc.) logs |
| CAM_CUSTOM | (1 << 26) | For custom hardware node |
| CAM_PRESIL | (1<<27) | Presil changes |
| CAM_OPE | (1<<28) | Offline processing engine |
| CAM_IO_ACCESS | (1<<29) | Camera I/O access(reg read/write, etc.) |
| CAM_SFE | (1<<30) | Streaming front-end |
| CAM_IR_LED | (1<<31 | IR LED |
Enable camera kernel mode driver logs
- To enable CAM_SENSOR and CAM_ICP debug logs in the KMD, run the following commands in an SSH shell:
- QCS6490
- IQ-9075-EVK/IQ-8275-EVK
- QCS615
- To enable CSID IRQ logs dynamically, use the appropriate mask value(s) with the following commands.
- QCS6490
- IQ-9075-EVK/IQ-8275-EVK/QCS615
CSID debug group Value Description CSID_DEBUG_ENABLE_SOF_IRQ (1<< 0) Start of frame CSID_DEBUG_ENABLE_EOF_IRQ (1<< 1) End of frame CSID_DEBUG_ENABLE_SOT_IRQ (1<< 2) Start of transmission CSID_DEBUG_ENABLE_EOT_IRQ (1<< 3) End of transmission CSID_DEBUG_ENABLE_SHORT_PKT_CAPTURE (1<< 4) Short packet capture CSID_DEBUG_ENABLE_LONG_PKT_CAPTURE (1<< 5) Long packet capture CSID_DEBUG_ENABLE_CPHY_PKT_CAPTURE (1<< 6) CPHY packet capture For example:
Information is logged to kmsg and can be obtained using the following command:- To enable SOF, EOF, SOT, and EOT IRQs:
- To set only short packet and long packet capture IRQs:
The captured logs can help provide details about the SOF and EOF and indicate which sensor is streaming. The following is an example log: - QCS6490
Enable CSIPHY log dumps
To enable CSIPHY log dumps:- Use the following command to get log dumps from CSIPHY:
The information is logged to kmsg.
- Use the following command to obtain the log dump file:
Note In these logs,
<chipset name> corresponds to the following:
qcm6490- RB3gen2qcs9100- IQ-9075-EVK/IQ-8275-EVKqcs615- IQ-615-EVK
Enable CSID SOF/EOF IRQ logs
To enable CSID SOF/EOF IRQ logs, run the following commands for trace logs:<chipset name> corresponds to the following:
qcm6490- RB3gen2qcs9100- IQ-9075-EVK/IQ-8275-EVKqcs615- IQ-615-EVK
Collect CPAS logs
To collect clock voting information in the camera log:- Run the following command using
camxoverridesettings.txtfor core, HAL, IFE, and power:
- After rebooting, enable the KMD CAM_CPAS|CAM_PERF|CAM_REQ mask:
- Collect the log, and run the use case:
Note In these logs,
<chipset name> corresponds to the following:
qcm6490- RB3gen2qcs9100- IQ-9075-EVK/IQ-8275-EVKqcs615- IQ-615-EVK
Enable kernel run-time log mask
Run the following command to enable CRM logs:<chipset name> corresponds to the following:
No device reboot is required. If you reboot, run this command again before opening the camera application. The following list provides the debug bitmask for each driver.
qcm6490- RB3gen2qcs9100- IQ-9075-EVK/IQ-8275-EVKqcs615- IQ-615-EVK

