As we don’t have “stickies” or “FAQs” sections yet, I’m posting this in “Discussions”.
Audio on Nerves Raspberry Pi
We’ve received a few questions about enabling/using audio on raspberry pi devices. We’ve had an issue on the RPI3 nerves_system open since late 2017, and we will likely at some point enable these features in the default systems in the future, but for anyone looking for a way to get started today can follow along here.
First We will need to follow the Customizing a Nerves System guide.
Raspberry Pi Kernel changes
Nerves currently enabled sound kernel modules on all the Raspberry Pi models. You should not need to modify anything here.
Raspberry Pi config.txt changes
Find the lines
and change the last to:
User packages for audio
Now we can simply enable any audio programs in Buildroot. Let’s setup
alsa-utils for example.
Open the Buildroot configuration utility:
You can use
/ to open the search menu. Look for
espeak. Once found it can simply be enabled.
Do the same for
after saved we will end up with some new lines in
BR2_PACKAGE_ALSA_UTILS=y BR2_PACKAGE_ALSA_UTILS_AMIXER=y BR2_PACKAGE_ALSA_UTILS_APLAY=y BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y BR2_PACKAGE_ESPEAK=y BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA=y
And that’s it. This is more an exercise in finding/enabling packages in Buildroot. Hopefully this will be useful to some.
This guide does apply to more than simply Raspberry Pi devices, but the
config.txt part is Raspberry Pi specific.