Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge2:applications:es8316

This is an old revision of the document!


Edge2 ES8316 Codec

Introduction

This documentation will introduce the usage of ES8316 codec on the Edge2 IO board.

For Edge2, in order to use the ES8316 Codec, you need to attach the Edge2 IO extension board.

Get record device HW index

$ 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.

Record from ES8316

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.

Playback from ES8316

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.

Last modified: 2022/12/07 19:20 by hyphop