Hi,
I am a complete noob. I installed xbian on my Pi and plugged it into my old TV, which doesnt take HDMI, I amanaged to play videos but I dont know how to get the sound to work. I tried plugging in the red and white jacks into the audio output of the Pi, but alas, it did not work - Is there anything I have to do toget the sound working as is (i.e. without having to buy more hardware?)
Thanks!!
Using RCA jack for audio
20 posts
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
You need to tell pi where to send sound:
sudo amixer cset numid=3 <output>
0=auto
1=headphones
2=hdmi
In your case, run this command:
sudo amixer cset numid=3 1
sudo amixer cset numid=3 <output>
0=auto
1=headphones
2=hdmi
In your case, run this command:
sudo amixer cset numid=3 1
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
Hi,
Thanks for your advice. Unfortunately I exited the xbian and once I got to the commnd prompt I entered the commands you recommended but the command was not recognized...
Thanks
Thanks for your advice. Unfortunately I exited the xbian and once I got to the commnd prompt I entered the commands you recommended but the command was not recognized...
Thanks
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
Try: apt-get install alsa-utils then run amixer again.
Richard S.
Richard S.
Thanks Richard,
I tried your suggestion after using xbian as the login and raspberry as the password. I got the following reply:
Could not open lock file /var/lib/dpkg/lock - open (13:permission denied) Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I have searched in vaious forums and they all seem to agree that xbian and raspberry are the root login... is there something I am missing?
Thanks!
I tried your suggestion after using xbian as the login and raspberry as the password. I got the following reply:
Could not open lock file /var/lib/dpkg/lock - open (13:permission denied) Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I have searched in vaious forums and they all seem to agree that xbian and raspberry are the root login... is there something I am missing?
Thanks!
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
Can you try sudo apt-get install alsa-utils
That should run the command as the "root" user.
That should run the command as the "root" user.
- Posts: 733
- Joined: Sun May 06, 2012 5:17 am
- Location: Essex, UK
Thanks everyone! I ran sudo apt-get update, then I ran sudo apt-get install alsa-utils, but when I try to run sudo amixer cset numid=3 1 it replies:
amixer: control default open error: no such file or directory
when I try to run just sudo amixer cset it replies:
Specify a full control identifier: [[iface=<iface>,][name='name',][index=<index>,][device=<device>,][subdevice=<subdevice>]]|[numid=<numid>]
Is there something I am missing?
Thanks
amixer: control default open error: no such file or directory
when I try to run just sudo amixer cset it replies:
Specify a full control identifier: [[iface=<iface>,][name='name',][index=<index>,][device=<device>,][subdevice=<subdevice>]]|[numid=<numid>]
Is there something I am missing?
Thanks
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
Try sudo modprobe snd-bcm2835 then the sudo amixer command again.
If that works, you should add "snd-bcm2835" (without the quotes) to the end of /etc/modules to make this work automatically at boot time.
If that works, you should add "snd-bcm2835" (without the quotes) to the end of /etc/modules to make this work automatically at boot time.
- Posts: 733
- Joined: Sun May 06, 2012 5:17 am
- Location: Essex, UK
You could try this:
sudo amixer cget numid=1
sudo amixer cget numid=2
sudo amixer cget numid=3
sudo amixer cget numid=4
I'm not sure what it will give you, but in my case numid=3 returns:
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=1
and I guess that 'PCM Playback Route' is what we are looking for. Maybe it has another numid in your case, even though I can't imagine why.
sudo amixer cget numid=1
sudo amixer cget numid=2
sudo amixer cget numid=3
sudo amixer cget numid=4
I'm not sure what it will give you, but in my case numid=3 returns:
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=1
and I guess that 'PCM Playback Route' is what we are looking for. Maybe it has another numid in your case, even though I can't imagine why.
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
Just remembered, you must first load the sound driver:
sudo modprobe snd_bcm2835
sudo modprobe snd_bcm2835
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
Last thing: To avoid having to start the sound driver after boot, make an entry in /etc/modules, like this;
sudo su
echo snd_bcm2835>>>>/etc/modules
exit
And to check the change:
cat /etc/modules
sudo su
echo snd_bcm2835>>>>/etc/modules
exit
And to check the change:
cat /etc/modules
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
And I should learn to read before I post; rpdom has already said the same thing...
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
The audio output takes no white or red RCAjack, it needs a stereo 3.5 mm audio jack. You'll need a cable like the one here:
https://dx.com/p/3-5mm-audio-jack-male- ... -30cm-5143
https://dx.com/p/3-5mm-audio-jack-male- ... -30cm-5143
- Posts: 1
- Joined: Sat Dec 29, 2012 1:10 pm
Since there is not phono jacks on the Pi, I'm pretty sure astrodog meant the other end of the cable, when he said red and white jack 
- Posts: 11
- Joined: Sun Dec 02, 2012 7:08 pm
Hi guys, thanks for all your help, the pi community is awesome! I just tried Paulus' idea and it works like a charm!
Thanks again to all!
Thanks again to all!
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
Sblar, I plugged in the yellow jack for video and I was trying to use the red or white jacks... I figured just one of the jacks should do it.... obviously I was very wrong and like you say,the pi just doesnt take it.
Thanks for all your help^!!
Thanks for all your help^!!
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
I've been trying to set up the DLNA streaming system as specified by Stephen Phillips which I've managed to get working apart from getting the sound out of the RCA jack. I get the sound out via the HDMI port and when I issue the amixer command I get the following.
pi@raspberrypi ~ $ sudo amixer cset numid=3 1
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
amixer: Control default open error: Connection refused
Is there some connection with PulseAudio that is stopping the command working. I've had it working before without PulseAudio installed.
Cheers Dave
pi@raspberrypi ~ $ sudo amixer cset numid=3 1
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
amixer: Control default open error: Connection refused
Is there some connection with PulseAudio that is stopping the command working. I've had it working before without PulseAudio installed.
Cheers Dave
- Posts: 37
- Joined: Thu Jan 26, 2012 10:04 am
Hi dave,
have you tried the 3.5mm audio jack that Paulus suggested? It worked great for me
have you tried the 3.5mm audio jack that Paulus suggested? It worked great for me
- Posts: 7
- Joined: Wed Dec 26, 2012 10:09 pm
Of course I didn't mean the Composite RCA Phono - I meant the 3.5 mm jack. The amixer command should switch the sound output from HDMI to the 3.5 mm jack but the command fails. I think I'll try reinstalling and setting it to the correct output before installing PulseAudio - might make the difference.
Dave
Dave
- Posts: 37
- Joined: Thu Jan 26, 2012 10:04 am
Yes that worked fine. I redid the build after issuing the 'sudo amixer cset numid=3 1' command and kept checking that it worked by doing a 'sudo speaker-test' after each section of the install - and it all works.
yippee
Dave
yippee
Dave
- Posts: 37
- Joined: Thu Jan 26, 2012 10:04 am