Audio
1 Audio System Overview
The GM-3568JHF development board is equipped with a complete audio processing system, based on the integrated audio controller of the RK3568J processor and the external ES8388 audio codec chip, providing multiple audio input/output interfaces and supporting high-quality audio recording and playback functions.
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 requirements:
Audio Input Interfaces
- Onboard MIC: Built-in omnidirectional microphone, suitable for voice recording
- Headphone MIC: 3.5mm headphone jack integrated with microphone input
- Line In: Supports input from external audio devices
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 Get 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: Onboard audio processing chip rockchip-es8388, which exposes two recording interfaces, one for the onboard MIC and one for the headphone MIC
- card 0 is a device registered in Linux, and we can call these interfaces through applications
3.2 Get 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: Onboard audio processing chip rockchip-es8388
card 1: HDMI audio output
card 0 and card 1 are devices registered in Linux, and 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 stands for sound card 0, corresponding to the onboard audio processing chip rockchip-es8388 mentioned above.
controlC1: Used for sound card control. C1 stands for sound card 1, corresponding to the HDMI audio output mentioned above.
pcmC0D0p: PCM device for playback. The trailing "p" is the abbreviation of playback, indicating sound playback.
pcmC0D0c: PCM device for recording. The trailing "c" is the abbreviation of capture, indicating recording.
pcmC1D0p: PCM device for playback. The trailing "p" is the abbreviation of playback, indicating sound playback.
timer: Timer device, used for time synchronization of audio playback and recording.
by-path: Stores the corresponding relationships of 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:~#- You can see that there is a corresponding relationship between each control, and these relationships exactly correspond to card 0 and card 1 mentioned above
4 Recording and Playback
4.1 Command Line
Recording
Recording uses the arecord command, illustrated below:
#获取录音设备
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 using 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, meaning 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
Record and Play 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 application to start recording, and press done to end recording. The recording path is /home/linaro/.local/share/org.gnome.SoundRecorder/. If the waveform shows nothing during recording, check whether the headphone is properly plugged in.

Playing Music
The system comes with 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
View 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 in 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