Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] How I got hdmi out with alsa  (Read 15946 times)

Offline vilde

  • User
  • Posts: 708
[EN] How I got hdmi out with alsa
« on: 2012/11/06, 01:30:39 »
I have made a lot of looking around until I got this to work so now I write how I made it on my box.

On my xfce install alsamixer will not recognize my hdmi output from the sound card, but in vlc i could choose to use hdmi as output and it worked but of cause only with vlc, so for making hdmi as default sound I did this:
Code: [Select]
media@mediabox:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
media@mediabox:~$
this told me that on my card 0 I shall use device 3 as hdmi out.

Then I made a file: .asoundrc in my home directory
Code: [Select]
pcm.!default{
        type hw
        card 0
        device 3
}
That's it, now all my apps will make the sound out through hdmi.

There are probably more and maybe better ways to do this but so far this is working for me. I hope it can help somebody else.

tuxracer

  • Guest
RE: How I got hdmi out with alsa
« Reply #1 on: 2012/11/08, 03:25:37 »
I'll be looking to help someone out with hdmi audio.

I was curious, though, if nvidia or ati is better for having hdmi audio work.

Intel supposedly has open source drivers so it would seem you don't have to do as much tweaking? :)

I read that with open source ati drivers, you have to edit the grub config file.  Oh, with kernel 3.5, you don't have to do this or?  I believe there is support with kernel 3.5 on.

Else, you would have to install the Catalyst (binary) drivers.

As for Nvidia, nouveau doesn't have hdmi audio driver support so you have to install the binary Nvidia drivers.  

I believe you have a couple of choices (Debian and Nvidia ways?) but they require some manual configuration.  It's in the manual, too.

So, what is the recommended setup if you are in the market for a cheap, 'htpc' video card and want hdmi audio?

P.S. Thanks, vilda.  I think part of your post will help me. :)  I've read a bit about ALSA and hdmi audio.

Offline michaa7

  • User
  • Posts: 2.300
RE: How I got hdmi out with alsa
« Reply #2 on: 2012/11/08, 10:01:35 »
Best you can do is to contact alsa mailing list.

Note: These days at LinuxConEurope Linus Torvalds complained about too less testing and too less bug reports with new kernels. He claimed that kernel developpers do not have access to all different kind of hardware and therefore it's up to the user to report bugs and malfunctions. So don't hesitate to to answer his wishes ;-)
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline vilde

  • User
  • Posts: 708
How I got hdmi out with alsa
« Reply #3 on: 2012/12/20, 19:53:11 »
From kernel 3.7 my hdmi out sound disappeared.. A check with aplay -l showed that something changed, now it looks like this:
Code: [Select]
media@mediabox:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC272 Analog [ALC272 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
whats different from before is on the second line from the end subdevices: 0/1 (see my original post above) have become subdevices:1/1 I don't know if this have to do with the kernel or something else have changed? Anyway after some trial and error I got it to work by changing my .asoundrc to
Code: [Select]
pcm.!default{
        type hw
        card 0
        device 3
subdevice 0
}
The change from before is the last line that I have added subdevice 0. Don't ask me why it shall be a 0 there, but with that it works.