音频测试
- 采用音频分离架构,内置 audiocodec 负责播放,ES8388 负责录音.
音频播放
aplay /root/test.wav使用百分比调节音量
amixer sset DACL 50%录音播放
1. 设置 ALSA 控件
# 设置输入通路为 Line 2(对应 LIN2/RIN2)
amixer -c 1 set 'Left PGA Mux' 'Line 2L'
amixer -c 1 set 'Right PGA Mux' 'Line 2R'
amixer -c 1 set 'Differential Mux' 'Line 2'
# 打开 ADC 增益
amixer -c 1 set 'Left Channel' 8
amixer -c 1 set 'Right Channel' 8
# 打开数字音量,解除静音
amixer -c 1 set 'Capture Digital' 192
amixer -c 1 set 'Capture Mute' off
# 确认状态
amixer -c 1 scontents | grep -E "PGA|Channel|Capture|Differential"2. 录音测试
# 录音 5 秒
arecord -D hw:1,0 -f S16_LE -r 16000 -c 2 -d 5 /tmp/rec_test.wav
# 播放录制的文件(用 audiocodec)
aplay /tmp/rec_test.wav作者:陈柏林 创建时间:2026-09-15 16:42
最后编辑:陈柏林 更新时间:2026-10-12 11:13
最后编辑:陈柏林 更新时间:2026-10-12 11:13