android 音频调试技巧

常用命令

查看当前声卡信息

cat proc/asound/cards

bengal_515:/ # cat /proc/asound/cards
 0 [bengalidpsndcar]: bengal-idp-snd- - bengal-idp-snd-card
                      bengal-idp-snd-card
 1 [Loopback       ]: Loopback - Loopback
                      Loopback 1

查看PCM设备列表

cat proc/asound/pcm

bengal_515:/ # cat /proc/asound/pcm
00-00: PCM_RT_PROXY-TX-1 snd-soc-dummy-dai-0 :  : capture 1
00-01: PCM_RT_PROXY-RX-1 snd-soc-dummy-dai-1 :  : playback 1
00-02: USB_AUDIO-RX snd-soc-dummy-dai-2 :  : playback 1
00-03: USB_AUDIO-TX snd-soc-dummy-dai-3 :  : capture 1
00-04: PCM_DUMMY-TX-0 snd-soc-dummy-dai-4 :  : capture 1
00-05: CODEC_DMA-LPAIF_RXTX-RX-0 multicodec-5 :  : playback 1
00-06: CODEC_DMA-LPAIF_RXTX-RX-1 multicodec-6 :  : playback 1
00-07: CODEC_DMA-LPAIF_RXTX-RX-2 multicodec-7 :  : playback 1
00-08: CODEC_DMA-LPAIF_RXTX-RX-3 multicodec-8 :  : playback 1
00-09: CODEC_DMA-LPAIF_RXTX-TX-3 multicodec-9 :  : capture 1
00-10: CODEC_DMA-LPAIF_RXTX-TX-4 multicodec-10 :  : capture 1
00-11: CODEC_DMA-LPAIF_VA-TX-0 va_macro_tx1-11 :  : capture 1
00-12: CODEC_DMA-LPAIF_VA-TX-1 va_macro_tx2-12 :  : capture 1
00-13: CODEC_DMA-LPAIF_VA-TX-2 va_macro_tx3-13 :  : capture 1
00-14: MI2S-LPAIF-RX-PRIMARY msm-stub-rx-14 :  : playback 1
00-15: MI2S-LPAIF-TX-PRIMARY msm-stub-tx-15 :  : capture 1
00-16: MI2S-LPAIF-RX-SECONDARY msm-stub-rx-16 :  : playback 1
00-17: MI2S-LPAIF-TX-SECONDARY msm-stub-tx-17 :  : capture 1
00-18: MI2S-LPAIF_AUD-RX-SECONDARY msm-stub-rx-18 :  : playback 1
00-19: MI2S-LPAIF_AUD-TX-SECONDARY msm-stub-tx-19 :  : capture 1
00-20: MI2S-LPAIF_RXTX-RX-PRIMARY msm-stub-rx-20 :  : playback 1
00-21: MI2S-LPAIF_RXTX-TX-PRIMARY msm-stub-tx-21 :  : capture 1
00-22: SLIM-DEV1-RX-7 btfm_bt_sco_a2dp_slim_rx-22 :  : playback 1
00-23: SLIM-DEV1-TX-7 btfm_bt_sco_slim_tx-23 :  : capture 1
00-24: SLIM-DEV1-TX-8 btfm_fm_slim_tx-24 :  : capture 1
01-00: Loopback PCM : Loopback PCM : playback 8 : capture 8
01-01: Loopback PCM : Loopback PCM : playback 8 : capture 8

查看PCM占用情况

lsof | grep pcm

bengal_515:/ # lsof | grep pcm
gyt_play   1098 audioserve    5u      CHR              116,2       0t0        937 /dev/snd/pcmC1D0p
binder:29877_2 29877 audioserve  mem       REG               0,32     28304       2655 /vendor/lib64/libagm_pcm_plugin.so
binder:29877_2 29877 audioserve   43u      CHR             116,12       0t0       1051 /dev/snd/pcmC0D5p
binder:29877_2 29877 audioserve   45u      CHR             116,21       0t0       1060 /dev/snd/pcmC0D14p
bengal_515:/ #

查看音频节点

bengal_515:/ # ls -l dev/snd
total 0
crw-rw---- 1 system audio 116,  34 1970-01-01 08:11 controlC0
crw-rw---- 1 system audio 116,   6 1970-01-01 08:11 controlC1
crw-rw---- 1 system audio 116,   7 1970-01-01 08:11 pcmC0D0c
crw-rw---- 1 system audio 116,  17 1970-01-01 08:11 pcmC0D10c
crw-rw---- 1 system audio 116,  18 1970-01-01 08:11 pcmC0D11c
crw-rw---- 1 system audio 116,  19 1970-01-01 08:11 pcmC0D12c
crw-rw---- 1 system audio 116,  20 1970-01-01 08:11 pcmC0D13c
crw-rw---- 1 system audio 116,  21 1970-01-01 08:11 pcmC0D14p
crw-rw---- 1 system audio 116,  22 1970-01-01 08:11 pcmC0D15c
crw-rw---- 1 system audio 116,  23 1970-01-01 08:11 pcmC0D16p
crw-rw---- 1 system audio 116,  24 1970-01-01 08:11 pcmC0D17c
crw-rw---- 1 system audio 116,  25 1970-01-01 08:11 pcmC0D18p
crw-rw---- 1 system audio 116,  26 1970-01-01 08:11 pcmC0D19c
crw-rw---- 1 system audio 116,   8 1970-01-01 08:11 pcmC0D1p
crw-rw---- 1 system audio 116,  27 1970-01-01 08:11 pcmC0D20p
crw-rw---- 1 system audio 116,  28 1970-01-01 08:11 pcmC0D21c
crw-rw---- 1 system audio 116,  29 1970-01-01 08:11 pcmC0D22p
crw-rw---- 1 system audio 116,  30 1970-01-01 08:11 pcmC0D23c
crw-rw---- 1 system audio 116,  31 1970-01-01 08:11 pcmC0D24c
crw-rw---- 1 system audio 116,   9 1970-01-01 08:11 pcmC0D2p
crw-rw---- 1 system audio 116,  10 1970-01-01 08:11 pcmC0D3c
crw-rw---- 1 system audio 116,  11 1970-01-01 08:11 pcmC0D4c
crw-rw---- 1 system audio 116,  12 1970-01-01 08:11 pcmC0D5p
crw-rw---- 1 system audio 116,  13 1970-01-01 08:11 pcmC0D6p
crw-rw---- 1 system audio 116,  14 1970-01-01 08:11 pcmC0D7p
crw-rw---- 1 system audio 116,  15 1970-01-01 08:11 pcmC0D8p
crw-rw---- 1 system audio 116,  16 1970-01-01 08:11 pcmC0D9c
crw-rw---- 1 system audio 116,   3 1970-01-01 08:11 pcmC1D0c
crw-rw---- 1 system audio 116,   2 1970-01-01 08:11 pcmC1D0p
crw-rw---- 1 system audio 116,   5 1970-01-01 08:11 pcmC1D1c
crw-rw---- 1 system audio 116,   4 1970-01-01 08:11 pcmC1D1p
crw-rw---- 1 system audio 116,  33 1970-01-01 08:00 timer

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>