Linux声卡Debug

查看声卡是否注册成功

shell@X28_068_MIPI:/ # cat /proc/asound/cards
 0 [RKRK312X       ]: RK_RK312X - RK_RK312X
                      RK_RK312X
 1 [RKsph0645lm4h  ]: RK_sph0645lm4h - RK_sph0645lm4h
                      RK_sph0645lm4h

shell@X28_068_MIPI:/ # ls -l /dev/snd/
crw-rw---- system   audio    116,   0 2015-01-22 10:22 controlC0
crw-rw---- system   audio    116,  32 2015-01-22 10:22 controlC1
crw-rw---- system   audio    116,  24 2015-01-22 10:22 pcmC0D0c
crw-rw---- system   audio    116,  16 2015-01-22 10:22 pcmC0D0p
crw-rw---- system   audio    116,  25 2015-01-22 10:22 pcmC0D1c
crw-rw---- system   audio    116,  17 2015-01-22 10:22 pcmC0D1p
crw-rw---- system   audio    116,  56 2015-01-22 10:22 pcmC1D0c
crw-rw---- system   audio    116,  33 2015-01-22 10:22 timer

通过命令行播放录制调试声卡:

播放:
一般播放1khz 0db正弦波,然后在codec输出端示波器简单测量是否失真,杂音,然后再使用音频分析仪测试指标。

shell@X28_068_MIPI:/ # tinyplay
Usage: tinyplay file.wav [-D card] [-d device] [-p period_size] [-n n_periods]

shell@X28_068_MIPI:/ # tinyplay /sdcard/test44.wav -D 0 -d 0 -p 1024 -n 3
Playing sample: 2 ch, 44100 hz, 32 bit

录制:

shell@X28_068_MIPI:/ # tinycap 
Usage: tinycap file.wav [-D card] [-d device] [-c channels] [-r rate] [-b bits] [-p period_size] [-n n_periods] 

shell@X28_068_MIPI:/ # tinycap /sdcard/rec.wav -D 0 -d 0 –c 2 –r 44100 –b 16 –p 1024 –n 3

你可能感兴趣的:(Linux声卡Debug)