-
Fetch Linux SDK with Yocto and set up environment variables
-
Execute makefile:
make
-
We can find the folder named
deploy_afe
under the same directory level of .
deploy_afe/
├── afe
├── asound.conf_<BOARD> (BOARDS: imx8mm, imx8mp, imx8mp_revb4, imx93)
├── libdummyimpl.so
├── libdummyimpl.so.1.0
└── TODO.md
- afe: NXP audio front end wrapper
- asound.conf: Alsa configuration file
- libdummyimpl.so*: a dummy library for demonstration
- TODO.md: a user guide
-
Copy all libraries files to
/usr/lib/nxp-afe/
in rootfs. -
Copy
afe
,asound.conf_<BOARD>
,TODO.md
to/unit_tests/nxp-afe/
in rootfs.
Here are the dtb and mic hardware needed to prepare before the test:
DTB: imx8mm-evk-8mic-revE.dtb / imx8mm-evk-rpmsg-wm8524.dtb / imx8mm-evk-rpmsg-wm8524-lpv.dtb
Mic Hardware: 8mic_board
DTB: imx8mp-evk.dtb / imx8mp-evk-rpmsg.dtb / imx8mp-evk-rpmsg-lpv.dtb
Mic Hardware: 8mic_board
(Here if you want to use imx8mp-evk.dtb and your board version is revA3 or later versions but before revB4, please use imx8mp-evk-revA3-8mic-revE.dtb. If your borard version is revB4 or later versions, please refer to BOARD: i.MX8MP-EVK-REVB4)
DTB: imx8mp-evk-revb4-8mic-revE.dtb / imx8mp-evk-revb4-rpmsg.dtb / imx8mp-evk-revb4-rpmsg-lpv.dtb
Mic Hardware: 8mic_board
DTB: imx93-11x11-evk.dtb / imx93-11x11-evk-rpmsg.dtb / imx93-11x11-evk-rpmsg-lpv.dtb
Mic Hardware: PDM mic on board
DTB: imx95-19x19-evk.dtb
Mic Hardware: PDM mic on board
-
Install aloop module to support
afe
sudo modprobe snd-aloop
-
Handle
asound.conf
You'd better make a backup of/etc/asound.conf
in rootfs, and then copy/unit_tests/nxp-afe/asound.conf_<BOARD>
to/etc/
to replace theasound.conf
file. Take the asound that applies on your board. For example: If you are on and i.MX8MP-EVK the config file isasound.conf_imx8mp
. Apart from copying it to/etc/
, the name should also be changed like:cp /unit_tests/nxp-afe/asound.conf_imx8mp /etc/asound.conf
-
cd to
/unit_tests/nxp-afe/
executeafe
referring to the following command:./afe libdummy
./afe libdspc
./afe libfraunhofer
./afe libvoiceseekerlight
./afe libconversa
This chapter explain how to run the diferents libraries the AFE support. For more information please visit the repos of the given libraries/programs.
Firstly, you should put VoiceSpot application (now called voice_ui_app
)
into operation in the background this step is only required when the VoiceSeekerLight
library is used. Secondly, you should put afe
program into operation in the background.
Thirdly, use aplay
tool to playback a piece of audio through speaker.
Fourthly, use arecord
tool to start record and speak to microphone soon after.
Finally, we get the audio with echo cancellation.
dummy library can not realize echo cancellation, because it is only used for demonstration. So you will hear speech mixed with playback music.
./afe libdummy &
aplay S32LE16000.wav &
arecord -d10 -fS32_LE -r16000 -c1 dummy_afe_on.wav
./afe libdspc &
aplay S32LE16000.wav &
arecord -d10 -fS32_LE -r16000 -c1 dspc_afe_on.wav
./afe libfraunhofer &
aplay S32LE16000.wav &
arecord -d10 -fFLOAT_LE -r16000 -c1 fraunhofer_afe_on.wav
./voice_ui_app &
./afe libvoiceseekerlight &
aplay S32LE16000.wav &
arecord -d10 -fS32_LE -r16000 -c1 voiceseeker_afe_on.wav
./afe libvoiceseekerlight &
aplay S32LE16000.wav &
arecord -d10 -fS32_LE -r16000 -c1 voiceseeker_afe_on.wav
./UAC_VCOM_composite.sh
./afe libconversa &
./afe_uac &
Connect the Conversa Tuning Tool from PC