BBB Audio - mozilla/project_haiku.iot GitHub Wiki
Record and playback Audio with BBB using USB Sound adpater
-
Connect to Wifi via Wifi adapter or Ethernet to download below audio software using commands
sudo apt-get update
sudo apt-get install alsa-utils
sudo apt-get install mplayer -
With sound card plugged in, aplay -l should show sound cards available with the BBB. You will need a USB hub to have both Wifi and USB Sound adapter plugged into BBB.
-
To configure alsa to use USB sound card as playback by default, create /etc/asound.conf with below values (assuming USB sound card is showing as card 1 in aplay -l)
pcm.!default { type hw card 1 } -
To play mp3 file , use mplayer -ao alsa -volume 4 test-2.mp3
-
To play and set sound card using command line use mplayer -ao alsa:device=hw=1.0 -af volume=4 test-2.mp3
Using I2S DAC + Amp as audio out
-
By default HDMI port shows up as default audio play back. To enable I2S output , disable HDMI by uncommenting below entry in /boot/unEnv.txt
dtb=am335x-boneblack-emmc-overlay.dtb -
On reboot , aplay -l should display no sound card
Useful links: