This is an old revision of the document!
ES8316 codec usage on the Edge2 IO board.
For Edge2, in order to use the ES8316 Codec, you need to attach the Edge2 IO extension board.
$ 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
The sound card 3 is the ES8316 device and audio device HW index is 3.
arecord -D hw:3,0 -f cd -d 20 record.wav
The headphone mic has the higher priority than the AMIC, which means if you connect the headphone then will record from the headphone mic, otherwise record from the AMIC.
Get playback devices:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: rockchipdp0 [rockchip,dp0], device 0: rockchip,dp0 spdif-hifi-0 [rockchip,dp0 spdif-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiphdmi0 [rockchip,hdmi0], device 0: fddf0000.i2s-i2s-hifi i2s-hifi-0 [fddf0000.i2s-i2s-hifi i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
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
The sound card 3 is the ES8316 device.
Play audio from ES8316:
aplay -D hw:3,0 xxx.wav
The headphone has the higher priority than the speaker, which means if you connect the headphone then will play from the headphone, otherwise play from the speaker.