Switching Audio Output


4 posts
by Mortimer » Fri Jul 13, 2012 12:48 pm
Is it possible to switch the audio from HDMI to 3.5mm stereo jack output without having to reboot the machine?

Is it even possible to simply change the current audio routing, in such a way it returns to the settings from the boot config at the next restart?
User avatar
Posts: 715
Joined: Sun Jun 10, 2012 3:57 pm
by alexeames » Fri Jul 13, 2012 8:16 pm
I think so yes. There's some good info here. Can't give you specific help because you haven't said what version of what operating system you are using. Wheezy has sound enabled, squeeze doesn't. If you're using anything else, I don't know. :)

Check out the wiki sound troubleshooting section
http://elinux.org/R-Pi_Troubleshooting#Sound
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2068
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Mortimer » Fri Jul 13, 2012 8:37 pm
I'm using Debian Wheezy, but I'll take a look at what you have linked to.
User avatar
Posts: 715
Joined: Sun Jun 10, 2012 3:57 pm
by alexeames » Sat Jul 14, 2012 7:48 am
In that case you can force it from a command line prompt...

Code: Select all
sudo amixer cset numid=3 <n>


where n is 0=auto, 1=headphones, 2=hdmi.

Change <n> to 1 to force sound through the 3.5mm headphone jack :D
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2068
Joined: Sat Mar 03, 2012 11:57 am
Location: UK