05.03.2013 Views

RPi Easy SD Card Setup - eLinux.org

RPi Easy SD Card Setup - eLinux.org

RPi Easy SD Card Setup - eLinux.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Speaker-test -c 2 -s 1 -t wav -W /usr/share/sounds/alsa -w Front_Center.wav<br />

should be heard on the left speaker. But note that the command speaker-test seems only to<br />

like mono wav files, and seems not to play stereo wav files.<br />

The command aplay plays 2 channel stereo wav files in stereo sound without problem<br />

(provided they last longer than the time it takes the TV to unmute and remute). A helpful<br />

example I found is the stereo file LRMonoPhase4.wav at the Kozco web site [2]<br />

(http://www.kozco.com/tech/soundtests.html)<br />

Sound does not work at all, or in some applications<br />

In Debian Squeeze, sound is disabled by default because the ALSA sound driver is still<br />

"alpha" (not fully tested) on the R-Pi. To try out sound, from the command prompt before<br />

"startx", type<br />

sudo apt-get install alsa-utils<br />

sudo modprobe snd_bcm2835<br />

On Debian Wheezy, snd_bm2835 is enabled, by default, do that step is not necessary.<br />

Next try:<br />

sudo aplay /usr/share/sounds/alsa/Front_Center.wav<br />

By default output will be automatic (hdmi if hdmi supports audio, otherwise analogue).<br />

You can force it with:<br />

sudo amixer cset numid=3 <br />

where n is 0=auto, 1=headphones, 2=hdmi.<br />

With recent firmware, you can build hello_audio with:<br />

cd /opt/vc/src/hello_pi/<br />

./rebuild.sh<br />

cd hello_audio<br />

With older firmware<br />

cd /opt/vc/src/hello_pi/hello_audio<br />

make

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!