查看聲卡是否注冊(cè)成功
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
通過命令行播放錄制調(diào)試聲卡:
播放:
一般播放1khz 0db正弦波刀闷,然后在codec輸出端示波器簡單測量是否失真,雜音,然后再使用音頻分析儀測試指標(biāo)复凳。
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