FAQ
Q1: cmdq 问题
log如下:
MDrvCmdqWriteCommandMaskMulti cmdq buffer isn't available(0) MDrvCmdqWriteCommandMaskMulti cmdq buffer isn't available(0) [CMDQ]cmdq(1) ERR: WAIT_TRIG_TIMEOUT (0x00000400) [CMDQ]Cmd data = 0x0000 : 0x0000 : 0x0000 : 0x0000 [CMDQ]Cmd:NULL, dbg:0, adr:000000, dat:0000, mask:0000 [CMDQ]Unknown command [CMDQ] Parsing from Debug Log [CMDQ]Wait command timeout. Trigger_Bus Bit [0] Event [ISP_TRIG] [CMDQ]dram(s, e, w, r)=(0x2ef20000, 0x2ef2fff0, 0x2ef24338, 0x2ef24340) sram(w,r)=(052,008) SensorFrameDoneISR, line:4126 error! SensorFrameDoneISR, line:4126 error!
解决方案:系统运行后,输入命令:
echo encmdq 1 0 0 > /proc/vpe/vpe_debug
然后运行应用。
Q2: 命令设置 sensor mirror flip
echo setmirrorflip 0 0 0 > /proc/mi_modules/mi_sensor/mi_sensor0
Q3: 1路Amic 8000采样率 录音功能
./prog_audio_all_test_case -I -t 15 -o /tmp -d 0 -m 0 -c 1 -v 16 -s 8000
具体参数说明参考audio_all_test_case 下的README.txt。
Q4: dump disp input
echo dumpframe layerid portid path > /proc/mi_modules/mi_disp/mi_disp0
例如:
echo dumpframe 0 0 /data > /proc/mi_modules/mi_disp/mi_disp0
Q5: dump fb
dd if=/dev/fb0 of=/data/test
Q6: vif不支持格式修改,只能按照sensor的格式设置vif pixel
如st_main_uvc.cpp中的 ePixFormat = (MI_SYS_PixelFormat_e)RGB_BAYER_PIXEL(stSnrPlane0Info.ePixPrecision, stSnrPlane0Info.eBayerId);
Q7: vpe dump
echo dumptaskfile [chnid, Passid, Cnt, /path/, bOnlyDumpResChange, bdumpport] > /proc/mi_modules/mi_vpe/mi_vpe0
-
bOnlyDumpResChange 和 bdumpport非必须项
-
chnid ,passid 在proc信息下均可查看
例如 echo dumptaskfile 0 0 5 0 0 /mnt > /proc/mi_modules/mi_vpe/mi_vpe0 表示 channel=0 port 0 passid =0 cnt = 5
Q8: 查看MI内存信息
sys启动后,cat /proc/mi_modules/mi_sys_mma/mma_heap_name0 可以查看
Q9: param:dump_out $channel_num $frame_num $dump_path
举例:
h264/h265:echo dump_out 0 100 /mnt > /proc/mi_modules/mi_venc/mi_venc0
Q10: 获取带宽占用情况
echo all > /sys/devices/system/miu/miu0/monitor_client_enable cat /sys/devices/system/miu/miu0/measure_all
Q11: dump divp
echo dumpframe channel path > /proc/mi_modules/mi_divp/mi_divp0
如dump divp channel 2到/customer目录下:
echo dumpframe 2 /customer > /proc/mi_modules/mi_divp/mi_divp0
Q12: dump vif信息
echo dump 0 0 /mnt > /proc/mi_modules/mi_vif/mi_vif0
Q13: reset isp
cat /sys/class/mstar/isp0/isp_reset
1: ISP All reset
2: ISP channel 1 reset
4: ISP 3DNR reset
8: ISP ROT reset
Q14: dump音频
export MI_AI_DUMP_PCM_ENABLE=1 export MI_AI_DUMP_PATH=xxx //xxx自己填路径
export MI_AI_DUMP_PATH=xxx export MI_AO_DUMP_PATH=xxx //设置Dump路径
export MI_AI_DUMP_AEC_ENABLE=1 export MI_AI_DUMP_VQE_ENABLE=1 export MI_AO_DUMP_VQE_ENABLE=1
Q15: 停止和恢复更新disp buffer的数据
disp drop frame不更新buffer,只去读取同一张,不更新disp buffer
echo stopgetbuff [layerid] [portid] on > /proc/mi_modules/mi_disp/mi_disp0
比如echo stopgetbuff 0 0 on > /proc/mi_modules/mi_disp/mi_disp0
恢复echo stopgetbuff 0 0 off > /proc/mi_modules/mi_disp/mi_disp0
Q16: mi中的kmsg log打开
比如echo debug 1 > /proc/mi_modules/mi_disp/mi_disp0