Using the ES8316 audio codec requires the Edge-2L IO board
The ES8316 codec is accessible via the ALSA hardware name hw:CARD=rockchipes8316c. Use this name in audio commands, for example: aplay -D hw:CARD=rockchipes8316c ….
You can verify the hardware name with the following commands:
$ aplay -L | grep rockchipes8316c -m1 hw:CARD=rockchipes8316c,DEV=0 $ arecord -L | grep rockchipes8316c -m1 hw:CARD=rockchipes8316c,DEV=0
You can also identify the ES8316 by its card index. List the available audio devices:
~# arecord -l | grep es8316-codec -A2 card 3: rockchipes8316c [rockchip,es8316-codec], device 0: fe470000.i2s-ES8316 HiFi ES8316 HiFi-0 [fe470000.i2s-ES8316 HiFi ES8316 HiFi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 ~# aplay -l | grep es8316-codec -A2 card 3: rockchipes8316c [rockchip,es8316-codec], device 0: fe470000.i2s-ES8316 HiFi ES8316 HiFi-0 [fe470000.i2s-ES8316 HiFi ES8316 HiFi-0] Subdevices: 1/1 Subdevice #0: subdevice #0
In this example, the ES8316 is card 3, so its hardware index is 3.
Record a 20-second WAV file using the hardware name:
arecord -D hw:CARD=rockchipes8316c -f cd -d 20 record.wav
Or, using the hardware index (e.g., 3):
arecord -D hw:3 -f cd -d 20 record.wav
Microphone Priority: The headphone microphone has higher priority than the onboard analog microphone (AMIC). If a headphone with a microphone is connected, recording will use the headphone mic. Otherwise, it will use the onboard AMIC.
Play a WAV file using the hardware name:
aplay -D hw:CARD=rockchipes8316c xxx.wav
Or, using the hardware index (e.g., 3):
aplay -D hw:3 xxx.wav
Output Priority: The headphone output has higher priority than the onboard speaker. If headphones are connected, audio will play through them. Otherwise, audio will play through the speaker.