#!/bin/bash
echo -n "file msm-compr-q6-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm-compress-q6-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file q6afe.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file q6asm.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file q6adm.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm-pcm-routing-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm-pcm-q6-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm-dai-q6-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file soc-compress.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file soc-dapm.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file soc-pcm.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file soc-core.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm8952.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file msm8x16-wcd.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file pcm_lib.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file pcm.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file pcm_native.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file compress_offload.c +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "file wcd-mbhc-v2.c +p" > /sys/kernel/debug/dynamic_debug/control
cat /sys/kernel/debug/dynamic_debug/control |grep msm-compr-q6-v2.c
cat /sys/kernel/debug/dynamic_debug/control |grep msm-pcm-routing-v2.c
cat /sys/kernel/debug/dynamic_debug/control |grep q6afe.c
cat /sys/kernel/debug/dynamic_debug/control |grep q6adm.c
cat /sys/kernel/debug/dynamic_debug/control |grep soc-compress.c
cat /sys/kernel/debug/dynamic_debug/control |grep soc-pcm.c
cat /sys/kernel/debug/dynamic_debug/control |grep pcm_lib.c
cat /sys/kernel/debug/dynamic_debug/control |grep msm-compress-q6-v2.c
cat /sys/kernel/debug/dynamic_debug/control |grep q6asm.c
cat /sys/kernel/debug/dynamic_debug/control |grep sm-dai-q6-v2.c
cat /sys/kernel/debug/dynamic_debug/control |grep soc-compress.c
cat /sys/kernel/debug/dynamic_debug/control |grep soc-dapm.c
cat /sys/kernel/debug/dynamic_debug/control |grep soc-core.c
cat /sys/kernel/debug/dynamic_debug/control |grep msm8952.c
cat /sys/kernel/debug/dynamic_debug/control |grep msm8x16-wcd.c
cat /sys/kernel/debug/dynamic_debug/control |grep pcm_lib.c
cat /sys/kernel/debug/dynamic_debug/control |grep pcm_native.c
cat /sys/kernel/debug/dynamic_debug/control |grep compress_offload.c
cat /sys/kernel/debug/dynamic_debug/control |grep wcd-mbhc-v2.c
dmesg -c
echo 8 > /proc/sys/kernel/printk
取qxdm日志,先确保配置了adsp config log
F1打开log view
file->new items /alt +I 重新开始取日志
file->save items /ctrl +I 结束取日志并保存
F5打开日志设置图如下,audio的设置
重复现象
保存成isf文件
用QCAT进行解包,直接将isf文件拖进去,按如下方式解其中的流
根据adsp的流程1586是最接近设备的数据
80-n3470-4_d_hexagon_dsp_audio_pcm_bitstream_logging_through_qxdm_professional.pdf
解出来后生成如下文件,1586表示在上面audio path的代表图,0x11000即0x1000 即pri_mi2s_rx
定义中
80-nf774-3_b_hexagon_access_audio_front_end_api_interface_specification_for_avs.adsp.2.8.pdf这个文档中
5.2.1 Define Documentation
5.2.1.1 #define AFE_PORT_ID_PRIMARY_MI2S_RX 0x1000
ID of the primary MI2S Rx port.
5.2.1.2 #define AFE_PORT_ID_PRIMARY_MI2S_TX 0x1001
ID of the primary MI2S Tx port.
5.2.1.3 #define AFE_PORT_ID_SECONDARY_MI2S_RX 0x1002
ID of the secondary MI2S Rx port.
5.2.1.4 #define AFE_PORT_ID_SECONDARY_MI2S_TX 0x1003
ID of the secondary MI2S Tx port.
5.2.1.5 #define AFE_PORT_ID_TERTIARY_MI2S_RX 0x1004
ID of the tertiary MI2S Rx port.
5.2.1.6 #define AFE_PORT_ID_TERTIARY_MI2S_TX 0x1005
ID of the tertiary MI2S Tx port.
5.2.1.7 #define AFE_PORT_ID_QUATERNARY_MI2S_RX 0x1006
ID of the quaternary MI2S Rx port.
5.2.1.8 #define AFE_PORT_ID_QUATERNARY_MI2S_TX 0x1007
最后面的应该是左右声道的标号
音频分析软件有好多,常用的有audacity /Sonic Visualiser/cool edit
这里之后用cool edit 打开编辑查看
通过0x1586.pcm.0x1.0x1100.0x2.rx.wav 这个音频文件名取出1586 0x1000 0x1就可以知道audio path中0x1000这个path中的i2s,第2个声道 的音频情况