Audio
1 Audio System Overview
The MB-E30P development board is equipped with a complete audio processing system. Based on the RK3568J processor's integrated audio controller and the external ES8388 audio codec chip, it provides a variety of audio input/output interfaces and supports high-quality audio recording and playback.
1.1 Audio System Architecture
RK3568J I2S/PCM ←→ ES8388 Codec ←→ 音频接口
↓
HDMI Audio ←→ HDMI 接口1.2 Technical Specifications
| Component | Specification |
|---|---|
| Main Audio | RK3568J integrated audio controller |
| Audio Codec | ES8388 high-performance audio Codec |
| Digital Interface | I2S, PCM, SPDIF |
| Sampling Rate | 8kHz ~ 192kHz |
| Bit Depth | 16bit, 24bit, 32bit |
| Signal-to-Noise Ratio | >90dB (ES8388) |
| THD + N | <0.1% @ 1kHz |
2 Audio Interface Configuration
The development board provides multiple audio interfaces to meet different application needs:
Audio Input Interfaces
- Onboard MIC: Built-in omnidirectional microphone, suitable for voice recording
- Headphone MIC: 3.5mm headphone jack integrates microphone input
- Line In: Supports external audio device input
Audio Output Interfaces
- Headphone Output: 3.5mm standard headphone jack, supports stereo output
- Speaker Output: Onboard speaker interface, supports mono output
- HDMI Audio: Outputs digital audio via the HDMI interface

3 Sound Card Devices
3.1 Obtaining Recording Devices
root@linaro-alip:/# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8388 HiFi-0 [dailink-multicodecs ES8388 HiFi-0]
Subdevices: 0/1
Subdevice #0: subdevice #0- card 0: the onboard audio processing chip rockchip-es8388. This chip exposes two recording interfaces: one for the onboard MIC and one for the headphone MIC.
- card 0 is a device registered in Linux; we can call these interfaces through applications.
3.2 Obtaining Playback Devices
root@linaro-alip:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8388 HiFi-0 [dailink-multicodecs ES8388 HiFi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiphdmi [rockchip,hdmi], device 0: rockchip,hdmi i2s-hifi-0 [rockchip,hdmi i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0card 0: the onboard audio processing chip rockchip-es8388
card 1: HDMI audio output
card 0 and card 1 are devices registered in Linux; we can call these interfaces through applications.
3.3 Sound Card Driver Directory
View the sound card driver directory:
root@linaro-alip:/# ls -l /dev/snd/
total 0
drwxr-xr-x 2 root root 80 Oct 10 17:40 by-path
crw-rw----+ 1 root audio 116, 4 Oct 10 17:40 controlC0
crw-rw----+ 1 root audio 116, 6 Oct 10 17:40 controlC1
crw-rw----+ 1 root audio 116, 3 Oct 10 17:40 pcmC0D0c
crw-rw----+ 1 root audio 116, 2 Oct 10 17:40 pcmC0D0p
crw-rw----+ 1 root audio 116, 5 Oct 10 17:40 pcmC1D0p
crw-rw----+ 1 root audio 116, 1 Oct 10 17:40 seq
crw-rw----+ 1 root audio 116, 33 Oct 10 17:40 timercontrolC0: used for sound card control; C0 indicates sound card 0, corresponding to the onboard audio processing chip rockchip-es8388 mentioned above.
controlC1: used for sound card control; C1 indicates sound card 1, corresponding to the HDMI audio output mentioned above.
pcmC0D0p: PCM device for playback; the trailing "p" stands for playback.
pcmC0D0c: PCM device for recording; the trailing "c" stands for capture.
pcmC1D0p: PCM device for playback; the trailing "p" stands for playback.
timer: timer device, used for time synchronization of audio playback and recording.
by-path: stores the corresponding relationships of the devices.
root@lubancat:~# ls -l /dev/snd/by-path/
total 0
lrwxrwxrwx 1 root root 12 Feb 14 18:11 platform-fd880000.usb-usb-0:1.4:1.2 -> ../controlC2
lrwxrwxrwx 1 root root 12 Feb 14 18:11 platform-hdmi-sound -> ../controlC0
lrwxrwxrwx 1 root root 12 Feb 14 18:11 platform-rk809-sound -> ../controlC1
root@lubancat:~#- As you can see, each control has a corresponding relationship, and these relationships correspond exactly to card 0 and card 1 mentioned above.
4 Recording and Playback
4.1 Command Line
Recording
The arecord command is used for recording. The following is an example:
#获取录音设备
arecord -l
#用声卡 0 录制 10s 音频
arecord -d 10 -D hw:0,0 -r 48000 -c 2 -f S16_LE -t wav /data/test_device.wavParameter details:
- -d 10: sets the recording duration to 10 seconds.
- -D hw:0,0: specifies the audio device; hw:0,0 means use the first device (0) of the first sound card (0).
- -r 48000: sets the sampling rate to 48000 Hz (i.e., 48 kHz).
- -c 2: sets the number of audio channels to 2 (stereo).
- -f S16_LE: sets the audio format to 16-bit signed little-endian (Signed 16-bit Little Endian).
- -t wav: sets the output file format to WAV.
- /data/test_device.wav: specifies the path and name of the output file.
Audio Playback
#获取播放设备
aplay -l
#用声卡 0 播放音频 5s
aplay -Dhw:1,0 -d5 /data/test_device.wavParameter details:
- -D hw:0,0: specifies the audio device; means use the first device (0) of the first sound card (0).
- -d 5: sets the playback duration to 5 seconds.
- /data/test_device.wav: specifies the path of the audio file to play.
Recording and Playing Simultaneously
Using both arecord and aplay tools:
#使用 card 0 录制并使用 card 0 进行播放
arecord -f cd -Dhw:0 | aplay -Dhw:04.2 Desktop
Recording
After ensuring the network is connected, install the recording software:
#安装软件
sudo apt install gnome-sound-recorderOpen the software:

Click "record" in the upper-left corner of the app to start recording. Press "done" to end recording. The recording path is /home/linaro/.local/share/org.gnome.SoundRecorder/. If there is nothing on the waveform during recording, check whether the headphones are properly plugged in.

Playing Music
The software that comes with the system is Rhythmbox. If you need other players, you can download them yourself.

After opening, you need to import the audio, as shown in the figure:

5 ALSA Advanced Configuration
Viewing Detailed Audio Device Information
# 查看所有音频设备
cat /proc/asound/cards
# 查看设备详细信息
cat /proc/asound/card0/id
cat /proc/asound/card1/id
# 查看 PCM 设备信息
cat /proc/asound/pcm
# 查看音频控制器信息
amixer -c 0 info
amixer -c 1 infoAudio Control and Mixing
# 查看所有音频控制
amixer -c 0 controls
# 查看音量控制
amixer -c 0 scontrols
# 设置主音量
amixer -c 0 sset 'Master' 80%
# 设置耳机音量
amixer -c 0 sset 'Headphone' 70%
# 设置麦克风增益
amixer -c 0 sset 'Mic' 60%
# 静音/取消静音
amixer -c 0 sset 'Master' mute
amixer -c 0 sset 'Master' unmute6 Common Troubleshooting
6.1 No Sound Output
Inspection Steps:
# 检查音频设备
aplay -l
lsmod | grep snd
# 检查音量设置
amixer -c 0 scontrols
amixer -c 0 sget Master
# 测试音频输出
speaker-test -c 2 -t wav
# 检查音频服务
pulseaudio --check -v6.2 No Sound or Noise During Recording
Solutions:
# 检查录音设备
arecord -l
# 调整麦克风增益
amixer -c 0 sset 'Mic' 70%
amixer -c 0 sset 'Capture' 80%
# 测试录音
arecord -D hw:0,0 -f cd test.wav6.3 Audio Latency Issues
Optimization Configuration:
# 减少缓冲区大小
echo 'defaults.pcm.dmix.period_size 512' >> ~/.asoundrc
echo 'defaults.pcm.dmix.periods 2' >> ~/.asoundrc
# 使用低延迟内核
sudo apt-get install linux-lowlatency6.4 No HDMI Audio Output
Inspection and Repair:
# 检查 HDMI 音频设备
aplay -l | grep HDMI
# 切换到 HDMI 音频输出
pactl set-default-sink alsa_output.platform-hdmi-sound.stereo-fallback
# 测试 HDMI 音频
aplay -D hw:1,0 test.wav