Audio Over HDMI

I recently got a new TV and thought I’d give audio over HDMI a chance on my HTPC from my video card. I’ve previously had no problems (after initial setup) running audio over 1/8" outs. None of the command line tests work, but going to configure desktop -> multimedia and testing HDA NVidia (NVIDIA HDMI) # (3, 7, 8, or 9) produces the startup sound while testing HDA NVidia HDMI Audio Output produces some garbled version of the sound. There are also entries for the digital and analog onboard sound as well as the spdif out but I don’t have anything hooked up to them. I also get the startup and shutdown noises from KDE.

ALSA script:
http://www.alsa-project.org/db/?f=950ba0792847671aec2f3825ceda435a5a63985c

I removed the onboard sound config from Yast -> Sound and setup the NVidia HDMI entry (though testing the audio did not work).

I set up vim /etc/asound.conf

 pcm.!default {
      type plug
      slave.pcm {
              type hw
              card 0
              device 7
      }
 }

(also tried device 3). Does card need to be 1?

All the restricted audio formats should be fine as this was working a week ago on the old TV.

killsforpie, which nVidia card are we talking about? Some cards, say before the 240, did not include any audio and you had to connect an spdiff connection to the card to get anything out. I actually tried an nVidia 240. I got it to work, but it only did stereo, never 5.1, in Windows and in openSUSE. Newer nVidia cards are said to work, but I have never tried one of the newer cards myself. Here are some thoughts on the subject:

  1. If you get 5.1 to work to your TV, how would you know it, besides just hearing some sound? You would need to then pipe it out to your receiver somehow. I found an LG to do this OK while a Samsung and Toshiba did not. There are too many TV’s to know what they all do.
  2. Why not just take the Optical (Toslink) or Coaxial directly to your receiver from your built-in sound card? Did you know that the audio in an HDMI cable is coaxial audio?
  3. Does your receiver indicate the type of digital audio you are sending? Some do and some don’t. A simple indication of digital does not mean a thing.
  4. What program are you trying to get sound from? Most things are only stereo and only movies are generally 5.1 or 7.1. I have only had consistent luck with using the old KDE 3 Kaffeine to output movies in 5.1 and 7.1 digital audio from openSUSE.

Any way, just some food for thought.

Thank You,

It’s a 210. I think it’s a more recent one but in any case it does carry some sound over at least. At this point I don’t have surround sound so the only 5.1 I have is through my TV speakers faking it. I wanted to try sound over HDMI to eliminate one cord and also I think my TV only outputs the 1/8" input when the RGB input is selected and I’d rather not take the video quality hit. One of the HDMI inputs on the TV is marked DVI but the manual just mentions using DVD players on it. I have no idea if the audio is coaxial. I will eventually be running Optical out from the TV to a receiver and it would be nice if I didn’t have to get one with multiple Optical inputs.

As for 4, I mostly watch Hulu or other internet streaming (can flash do 5.1/7.1?) sites but have started building up a collection of my DVDs ripped onto the box so 5.1/7.1 will be useful eventually?

Thanks.

It’s a 210. I think it’s a more recent one but in any case it does carry some sound over at least. At this point I don’t have surround sound so the only 5.1 I have is through my TV speakers faking it. I wanted to try sound over HDMI to eliminate one cord and also I think my TV only outputs the 1/8" input when the RGB input is selected and I’d rather not take the video quality hit. One of the HDMI inputs on the TV is marked DVI but the manual just mentions using DVD players on it. I have no idea if the audio is coaxial. I will eventually be running Optical out from the TV to a receiver and it would be nice if I didn’t have to get one with multiple Optical inputs.

As for 4, I mostly watch Hulu or other internet streaming (can flash do 5.1/7.1?) sites but have started building up a collection of my DVDs ripped onto the box so 5.1/7.1 will be useful eventually?

Thanks
So there is absolutely nothing wrong with taking audio over as you have done and I am very happy that it works OK. If you decide to use your PC to play movies, then I suggest you will want to go directly to your receiver using your PC’s built-in audio. I would say though I would get a receiver with as many optical and coaxial inputs as you can afford. My Sony, a 7.1 unit, has three optical and one coaxial input. It was only $300 and its display even tells you the exact audio input format. 7.1 only works with Dolby Digital 5.1 ES and THX can only be 5.1. There seems to be lots of different formats and it might cost a lot more to cover them all, but what I have does OK for me. If you are happy with Stereo, then there is nothing more that you need to do and it really only makes a differnce when watching a DVD movie. With DVD players so cheap, it may even be hard to justify doing anything else with your computer.

Thank You,

If you are referring to the nvidia card I think it has to be 1. Have you tried changing it
from 0 to 1?

You can see the card number also using aplay -l

Wow, yup that does it conram… I could have sworn that I tried that at some point but guess not. Thanks!

Good to hear it’s working now.
Your script also will run if you put it in your /home instead of /etc.
You only change the name from asound.conf to .asoundrc

Cheers.