2 USB Audio on Raspberry Pi Zero
mishi edited this page 2021-10-30 12:51:03 +02:00

USB Audio on Raspberry Pi Zero

Detect device

Detect the device connected to make sure that it has been detected:

lsusb

Test

alsamixer

Change default device

sudo vi /usr/share/alsa/alsa.conf

Change the device number in the file, e.g.

defaults.ctl.card 1

defaults.pcm.card 1

Check again with alsamixer

Then test playback:

mpg321 ~/halloween/pumpkin/static/sounds/Ambience.mp3

Background audio

Problem: The USB sound card can only play one stream at the time with an USB sound card.# Solution: Use omxplayer for the background audio by adding the following to /etc/rc.local:

sudo omxplayer --loop -o alsa /home/pi/halloween/pumpkin/static/sounds/Ambience.mp3