PanGuBoard DevelopmentKit

The PanGu board has a CS42L51 audio codec chip onboard and is connected to a standard four-band Audio Jack (J16), which can be used to play and record audio files.
The audio jack is an international standard. It is recommended to use the international standard four-section headphones with MIC. Due to the difference in signal sequence, the recording is abnormal.

Before use, you need to adjust the gain and volume to increase the volume of recording and playback.

amixer -c STM32MP1DK cset name='PGA-ADC Mux Left' '3'
amixer -c STM32MP1DK cset name='PGA-ADC Mux Right' '3'
amixer -c STM32MP1DK cset name='Mic Boost Volume' '1','1'

Play audio files and use headphones to listen to music.

aplay test.mp3

After executing the recording command, you can speak to MIC to record.

arecord -f cd test.wav

Then play it again, you can hear the recorded audio file:

aplay test.wav