Enable HDMI audio output

You have a problem with Salix? Post here and we'll do what we can to help.
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Enable HDMI audio output

Post by djemos »

wackpanther wrote:Whoa you're on to something!
I did enter the command with lower case -d, which played the file through laptop speakers.
Entering the same with capital -D works! Output through HDMI.
Now how do I use that?
Install smplayer from repos or vlc.
For smplayer go to "choices" on menus or press ctrl-p to go there at once and from "sound" can pick-up hdmi. For my system (alsa 0.3 HDA intel MID) and play your sound or video even on tv.
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Enable HDMI audio output

Post by gapan »

wackpanther wrote:Whoa you're on to something!
I did enter the command with lower case -d, which played the file through laptop speakers.
Entering the same with capital -D works! Output through HDMI.
Now how do I use that?
Next step would be to create an ~/.asoundrc file with the following contents:

Code: Select all

pcm.!default {
  type hw
  card 0
  device 3
}
You might need to restart your session for the changes to take effect.
Image
Image
wackpanther
Posts: 33
Joined: 16. Feb 2011, 02:09

Re: Enable HDMI audio output

Post by wackpanther »

Thanks again! This is really helpful.
smplayer does work with HDMI- so does exaile.
Is there a web browser that will get along with HDMI audio?
Firefox or midori don't seem to do it. Or do I need to change flash settings?


Creation of an ~/.asoundrc file with the following contents:

Code: Select all
pcm.!default {
type hw
card 0
device 3
}

Didn't seem to change anything on my system.
Does it have to be worked out application by application?
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Enable HDMI audio output

Post by gapan »

Did you actually put a line in there that reads:

Code: Select all
Image
Image
wackpanther
Posts: 33
Joined: 16. Feb 2011, 02:09

Re: Enable HDMI audio output

Post by wackpanther »

No I put only the code in the text box that you provided for me, nothing else in that file.
It seems to have made my media players get along with the HDMI audio output.
But I still can't get HDMI audio from any of my web browsers.
How can I change those settings?
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Enable HDMI audio output

Post by gapan »

Is it firefox in general, or is it only flash played back in firefox? For example, does the video in this page play through HDMI? http://html5video.org/
Image
Image
wackpanther
Posts: 33
Joined: 16. Feb 2011, 02:09

Re: Enable HDMI audio output

Post by wackpanther »

Hmmm I don't know what I changed, but its totally working now.
I have HDMI audio from media players (clementine, mplayer) & browser on most websites (pandora, youtube)
Is there a way I can modify my .asoundrc file to detect HDMI and default to PC speakers only when not plugged in?
Thanks so much this forum is so helpful
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Enable HDMI audio output

Post by gapan »

I'm not sure if when connecting an HDMI cable a udev signal is sent. If it doesn't you could have an ~/.asoundrc.hdmi file for example and when detecting the connection, you could copy it to ~/.asoundrc with a udev rule. And also another rule for disconnecting which would remove it, or replace it with another. But the simplest solution would be to do that manually I guess. You could even create two launchers in the panel, one that enables hdmi by copying the file to ~/.asoundrc and another for removing it.
Image
Image
wackpanther
Posts: 33
Joined: 16. Feb 2011, 02:09

Re: Enable HDMI audio output

Post by wackpanther »

Well after all that work to enable HDMI output, I want to undo it for a while.
But I can't seem to figure out how!
I had ended up creating a ~/.asoundrc file to specify output to the HDMI card.
I tried removing the ~/.asoundrc file- that didn't work.
I tried changing it from 0,3 to 0,0, that didn't work
Changing my selection in ALSA doesn't do it either.
Does anyone know what I'm missing?
thanks
Post Reply