Hardware Reference
In-Depth Information
Example 2-16. Listing the ALSA audio output and input devices on the Bone
bone#
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Black [TI BeagleBone Black], device 0: HDMI nxp-hdmi-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [C-Media USB Audio Device], device 0: USB Audio [USB
Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
bone#
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Device [C-Media USB Audio Device], device 0: USB Audio [USB
Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
By default, the Bone will send audio to the HDMI. You can change that default by creat-
ing a file in your home directory called
~/.asoundrc
and adding the code in
Example 2-17
to it.
Example 2-17. Change the default audio out by putting this in ~/.asoundrc
(audio.asoundrc)
pcm
.!
default
{
type plug
slave
{
pcm
"hw:1,0"
}
}
ctl
.!
default
{
type hw
card
1
}
You can easily play
.wav
files with
aplay
:
bone#
aplay test.wav
You can play other files in other formats by installing
mplayer
: