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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sound<br />

Sound does not work with an HDMI monitor<br />

This is caused by some computer monitors which select DVI mode even if an HDMI<br />

cable is connected. This fix may be necessary even if other HDMI devices work perfectly<br />

on the same monitor (or TV)!<br />

Edit the configuration file - see the instructions at R-Pi_ConfigurationFile.<br />

Add the following line to the configuration file:<br />

hdmi_drive=2<br />

This will force it to select HDMI mode.<br />

More reasons why sound does not work with an HDMI monitor<br />

With an HDMI connection it might be possible to hear:<br />

./hello_audio.bin 1<br />

but not:<br />

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

Firstly, it seems that some HD TVs mute audible sound output when there is no digital<br />

input, and slowly fade the sound up and down at the start and end of digital input. This<br />

means that short duration sounds will not be heard. A work around is to play longer<br />

duration wav files.<br />

Secondly, it seems that some HD TVs mute audible sound output when there is only one<br />

channel of digital input. So, as the file Front_Center.wav is mono, it might not be heard.<br />

ALSA aplay uses the file information header to configure its digital output. And the aplay<br />

-c 2 option does not over-ride the settings aplay picks up from the file information header.<br />

So, if your HD TV doesn't accept just one channel of digital input, you cannot use aplay<br />

to hear a mono wav file. However, with the command speaker-test, the -c2 option does<br />

work, and sets 2 channels in the digital stream. So speaker-test can be used to hear the file<br />

Front_Center.wav in either the left or right speaker using the -s option 1 or 2. For<br />

example

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

Saved successfully!

Ooh no, something went wrong!