Page 1 of 1

Sound through HDMI

Posted: Tue Jan 21, 2014 9:54 pm
by raspfly
I have been using the 256Mb Raspberry Pi since some time but recently I tried using it on a LCD Tv and had to struggle a lot getting sound output from the Tv. I tried several solutions available on the forum but still if I play any mp3 through alsa player i get the sound output but if I play through VLC I do not get it through the Tv. If I think of upgrading to the latest Raspbian, can that help solve the issue ? I am afraid it might make the system very slow. It is already too slow for normal work.
Any suggestion ?

Re: Sound through HDMI

Posted: Tue Jan 21, 2014 10:08 pm
by gkreidl
Upgrading will make it faster (new X acceleration) and more secure (bugs fixed).

BTW, I've never had any problems playing music with VLC via HDMI.

Re: Sound through HDMI

Posted: Wed Jan 22, 2014 4:55 am
by raspfly
Thanks for your reply.
You mean upgrading the OS ?
I do not wish to upgrade the hardware.
So after upgrading the OS what do I need install to be able to get sound out put from any application through HDMI ?

Re: Sound through HDMI

Posted: Wed Jan 22, 2014 1:38 pm
by gkreidl
Yes, I meant upgrading the OS.

As far as I understood, you already got sound, but not from VLC. Open the VLC settings, go to audio and select bcm2835 ALSA.

Re: Sound through HDMI

Posted: Thu Jan 23, 2014 3:33 pm
by raspfly
Ok, I will try that but dont we have something more universal where every application would give its sound output through HDMI ?

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 9:29 am
by raspfly
Installed Raspbian and RASPBMC through NOOBs.
Sound works fine out of the box in RaspBMC but not in Raspbian.
Any suggestion ?

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 11:04 am
by gkreidl
My answer seems to have been lost ...

What output do you get from
tvservice -a
?

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 11:50 am
by raspfly
gkreidl wrote:What output do you get from
tvservice -a
?
PCM supported: Max channels: 2, Max samplerate: 192kHz, Max sample size 24bits
AC3 supported: Max channels: 6, Max samplerate: 48kHz, Max rate 640 kb/s

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 11:58 am
by raspfly
I installed Pulse audio and alsa.
In Pulse audio volume control, in the Output devices tab, it displays : bcm2835 ALSA Analog Stereo and in Port it show ONLY analog output.

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 12:03 pm
by raspfly
gkreidl wrote:Yes, I meant upgrading the OS.

As far as I understood, you already got sound, but not from VLC. Open the VLC settings, go to audio and select bcm2835 ALSA.
I tried that but it did not work

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 1:48 pm
by gkreidl
mmh ... one of the first things I deinstalled again, was Pulse audio. It was reported to break things sometimes, but that was quite a while ago.

I've never had any problems with audio output from VLC, but cannot test the Raspbian version now, as I'm using a self compiled version with HW acceleration meanwhile.

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 1:58 pm
by raspfly
gkreidl wrote:mmh ... one of the first things I deinstalled again, was Pulse audio. It was reported to break things sometimes, but that was quite a while ago.

I've never had any problems with audio output from VLC, but cannot test the Raspbian version now, as I'm using a self compiled version with HW acceleration meanwhile.
I installed Pulse audio today, before that there was the same problem.

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 2:19 pm
by gkreidl
which audio related settings do you use in config.txt?

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 2:23 pm
by raspfly
I have never done anything in that file.
Can you kindly explain.

Re: Sound through HDMI

Posted: Sun Jan 26, 2014 3:25 pm
by gkreidl
http://elinux.org/RPiconfig#Video

a commented example file:
https://raw.github.com/Evilpaul/RPi-con ... config.txt

Especially (check if set or commented out):
hdmi_drive=2

Re: Sound through HDMI

Posted: Tue Jan 28, 2014 7:06 am
by raspfly
gkreidl wrote:http://elinux.org/RPiconfig#Video

a commented example file:
https://raw.github.com/Evilpaul/RPi-con ... config.txt

Especially (check if set or commented out):
hdmi_drive=2
After Uncommenting hdmi_drive=2 I can play mp3 through Alsa player but not through VLC. There is no sound output.
If I play mp4 through VLC, there is no video or audio output.

Re: Sound through HDMI

Posted: Tue Jan 28, 2014 7:35 am
by gkreidl
raspfly wrote: After Uncommenting hdmi_drive=2 I can play mp3 through Alsa player but not through VLC. There is no sound output.
If I play mp4 through VLC, there is no video or audio output.
sudo nano /etc/modules

Does it contain a line:
snd-bcm2835
?

If not, add it, save the changes and reboot. If this is missing, I get sound from omxplayer but not from VLC.

Re: Sound through HDMI

Posted: Tue Jan 28, 2014 8:44 am
by hannieB
Upgrading will make it faster and you will love it.

Re: Sound through HDMI

Posted: Wed Jan 29, 2014 10:54 am
by raspfly
gkreidl wrote:
raspfly wrote: After Uncommenting hdmi_drive=2 I can play mp3 through Alsa player but not through VLC. There is no sound output.
If I play mp4 through VLC, there is no video or audio output.
sudo nano /etc/modules

Does it contain a line:
snd-bcm2835
?

If not, add it, save the changes and reboot. If this is missing, I get sound from omxplayer but not from VLC.
Yes it contains that line but still I have to configure each application to use BCM2835 to get sound output through the TV.
VLC is able to play now after i again changed its Audio settings to that card but other applications are not able to produce any sound. For example, focuswriter's typewriter sound is not being produced. I need to make the change in default sound output so that all the applications automatically produce sound, instead of configuring each application.

Re: Sound through HDMI

Posted: Sat Feb 01, 2014 2:22 am
by raspfly
Any solution to this problem ?