Page:
USB Audio on Raspberry Pi Zero
Pages
Audio Input und Speech Recognition
Cocoon man
Coffin ghost
Crazy Witch
Deploying flask with uwsgi and nginx
Dungeon
Eyes in the dark
Grave riser
Halloween Control Center
Hanging ghost
Home
How to get the NodeMCU up and running
How to install py neopixel spidev
How to install pylibftdi for DMX
Ideas 2018
Ideas 2019
Ideas for 2021 (hopefully)
Ideas for 2022
Ideas for 2023
Ideas for 2024
Ideas for refactoring 2021
Installations
LEGO
Monster in a box
Open a reverse shell
Prisoner
Raspberry Pi Overview
Setting up a new scary RPi
Setup Remote Software Update
Spider
Swaying Zombie
USB Audio on Raspberry Pi Zero
Web API
Weremonkey
Zombie Fence
No results
2
USB Audio on Raspberry Pi Zero
mishi edited this page 2021-10-30 12:51:03 +02:00
Table of Contents
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