Hardware Reference
In-Depth Information
Audio Antics
Greetings! Glad to see that you have powered through the initial setup and can
join us for our first day of spy class. In this chapter, we'll be exploring the auditory
domain and all the fun things humans and machines can do with sound waves.
Configuring your audio gadgets
Before you go jamming all your microphones and noisemakers into the Pi, let's take
a minute to get to know the underlying sound system and the audio capabilities of
the Raspberry Pi board itself.
Introducing the ALSA sound system
The Advanced Linux Sound Architecture ( ALSA ), is the underlying framework
responsible for making all the sound stuff work on the Pi. ALSA provides kernel
drivers for the Pi itself and for most USB gadgets that produce or record sound.
The framework also includes code to help programmers make audio applications
and a couple of command-line utilities that will prove very useful to us.
In ALSA lingo, each audio device on your system is a card, a word inherited from
the days when most computers had a dedicated sound card. This means that any
USB device you connect that makes or records sound is a card as far as ALSA is
concerned—be it a microphone, headset, or webcam.
Type in the following command to view a list of all connected audio devices that
ALSA knows about:
pi@raspberrypi ~ $ cat /proc/asound/cards
The cat command is commonly used to output the contents of text files, and /proc/
asound is a directory (or folder in the Windows world), in which ALSA provides
detailed status information about the sound system.
Search WWH ::




Custom Search