• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 11
Howto: working GT2XX HDMI audio out with alsa
#1
Wink 
I finally got the Nvidia HDMI audio fully working with the help of very kind and patient nvidia engineer who helped me solve the issue over the course of 2 days. Rolleyes

UPDATE: This post is now outdated. Please check the xbmc wiki article for the complete and correct instructions.

This is with Arch-2.6.32, alsa-driver-1.0.22.1, nvidia 190.53. My card is a GT210 but I’m 99% sure this works with any GT2xx card.

TLDR: The key is setting the probe_mask for the HDMI card to 0xfff2, else alsa will use the card’s Realtek codec instead of the Nvidia codec it should be using.

Make sure your system is up-to-date and has the latest version of alsa (1.0.22.1) installed and running.
This will only work if alsamixer already recognizes your HDMI audio device with four (defunct) SPDIF outputs!

aplay -l should show you something similar to this, depending on how many sound devices you have in your system:

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Card 1 is the Nvidia card in this example.
open /etc/modprobe.d/sound.conf and add this line:

Code:
options snd-hda-intel probe_mask=0xffff,0xfff2

If aplay -l shows Nvidia HDMI as card 0 you'll have to use this line:

Code:
options snd-hda-intel probe_mask=0xfff2

or for card 2:

Code:
options snd-hda-intel probe_mask=0xffff,0xffff,0xfff2

and so on.

Reboot and your HDMI audio out should work now.
You can test it with aplay -D plughw:1,3 aplay -D plughw:1,3 /usr/share/sounds/alsa/Noise.wav

where 1,3 obviously stands for card,device.

Go to the XBMC settings and set audio out and passthrough to HDA NVidia hdmi. Enjoy. Nod

Update: If you can’t get your card to show up in alsamixer and aplay -l at all I suggest you take a look at paoleary’s patch for snd-hda-codec-hdmi.

Update 2: This GT220 owner found that these cards require an additional option in the alsa config: options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2
Reply
#2
Wow that seems much easier than what I've been reading so far, going to try it this evening many thanks.
Reply
#3
works for ubuntu base system?

edit: not working for me, I havae ubuntu karmic 64bits, nvidia 190.53 and alsa 1.0.22.1

aplay -l gives me:

**** Liste des PLAYBACK périphériques ****
carte 0: Intel [HDA Intel], périphérique 0 : ALC889A Analog [ALC889A Analog]
Sous-périphériques: 1/1
Sous-périphérique: #0: subdevice #0
carte 0: Intel [HDA Intel], périphérique 1 : ALC889A Digital [ALC889A Digital]
Sous-périphériques: 0/1
Sous-périphérique: #0: subdevice #0
XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
Reply
#4
sensei73 Wrote:works for ubuntu base system?

edit: not working for me, I havae ubuntu karmic 64bits, nvidia 190.53 and alsa 1.0.22.1

can you see the card in alsamixer (press F6 in its gui)?
also, is snd-hda-codec-nvhdmi loaded? (lsmod)
Reply
#5
moep Wrote:can you see the card in alsamixer (press F6 in its gui)?
also, is snd-hda-codec-nvhdmi loaded? (lsmod)

I have the same problem

aplay -l doesn't show the device (GeForce 210)

lspci does show it as an audio device
alsa-mixer sees HDA Nvidia but shows: "This sound device does not have any controls".

Please advise
Reply
#6
do you see snd-hda-codec-nvhdmi listed when you enter lsmod in the console?
It seems like the module doesn’t get loaded by default for some. Odd, I had my HDMI audio in alsamixer from the very first boot — it just didn’t work. (archlinux, as mentioned before)
Reply
#7
moep Wrote:do you see snd-hda-codec-nvhdmi listed when you enter lsmod in the console?
It seems like the module doesn’t get loaded by default for some. Odd, I had my HDMI audio in alsamixer from the very first boot — it just didn’t work. (archlinux, as mentioned before)

I didn't see it, used insmod, now:

lsmod | grep hdmi
snd_hda_codec_nvhdmi 5084 0
snd_hda_codec 84960 2 snd_hda_codec_nvhdmi,snd_hda_intel
Reply
#8
TycoonX Wrote:I didn't see it, used insmod, now:

lsmod | grep hdmi
snd_hda_codec_nvhdmi 5084 0
snd_hda_codec 84960 2 snd_hda_codec_nvhdmi,snd_hda_intel

Can you run a quick md5sum on your snd-hda-codec-nvhdmi.ko and snd-hda-intel.ko and post the results here?
Reply
#9
my /lib/modules/2.6.31-17-generic/kernel/sound/pci/hda just went empty,
weird

perhaps i should update my kernel or re-compile
Reply
#10
If you absolutely can’t get your card to show up you could try the HD_AUDIO-9.10.tar.gz driver package. Google the filename and you’ll find it.

before compiling:

patch_nvhdmi.c: replace all occurrences of 10de000d with 10de000b
hda_intel.c: replace 0x0d97 with 0x0be3
(these are for the GT210 only).

make, make install, reboot.

It’s a long shot but maybe that will help you get the card to show up in alsamixer.
Reply
#11
moep Wrote:If you absolutely can’t get your card to show up you could try the HD_AUDIO-9.10.tar.gz driver package. Google the filename and you’ll find it.

before compiling:

patch_nvhdmi.c: replace all occurrences of 10de000d with 10de000b
hda_intel.c: replace 0x0d97 with 0x0be3
(these are for the GT210 only).

make, make install, reboot.

It’s a long shot but maybe that will help you get the card to show up in alsamixer.

aplay -l is still empty
now i get when trying alsamixer: cannot open mixer: No such file or directory

UPDATE: after upgrading kernel, i've managed to:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
Reply
#12
Another update

I've managed to get something running in the mixer

Image

Before the last reboot i had 4 of there SPDIFs, i think 1 was enabled now i can't do anything with the single SPDIF

note that the card is identified as GT240, is that OK?

i've tried to play something, that didn't work before & after reboot


another update: after hours of many combination, i think that updating the kernel and reinstalling nvidia's driver solved the issue.
I am using speaker-test -Dhdmi -c6 and it works well, next i will use mplayer, and that will be it

now i have 1 problem which is not exactly related, the video card insists on outputting 1280x720 to my reciever but my TV is 1360x768, i guess it is a reciever problem
Reply
#13
Please see the wiki for complete, up-to-date instructions.

HISTORICAL INFO:
moep,

Nice work tracking down some of the missing links. Like TycoonX, my 210 was not recognized at all by ALSA. I built HD_AUDIO-9.10, but ran into problems with loading the modules--missing symbols, the works.

I ended up cherry-picking from and modifying HD_AUDIO-9.10 and grafting it onto alsa-driver-1.0.22.1 downloaded from the ALSA ftp site. I went ahead and made the changes to the IDs you said to make a little more cleanly, so that the GT240 PCI ID wasn't lost and the GT210 is correctly identified as such in alsamixer.

UPDATED: Here's a patch that should cover the G210, GT220, and GT240. This has been tested on my system against the original sources for ALSA 1.0.22.1. Since it's built off of alsa-kmirror.git, the patch command is `patch -p1 -d sound < patchfile' from the alsa-driver root.

ORIGINAL TEXT:
Here's a patch. Apply with a `patch -p1 < patchfile' from the alsa-driver-1.0.22.1 directory. Hope this helps. N.B.: There may in fact be a much simpler patch, after reviewing some things. I'll get back to you after watching Important Things with Demetri Martin (with HDMI audio!), then I'll test.

EDIT 2: Nope, apparently got to stick with the original patch.
Reply
#14
TycoonX Wrote:Another update

I've managed to get something running in the mixer

Before the last reboot i had 4 of there SPDIFs, i think 1 was enabled now i can't do anything with the single SPDIF

note that the card is identified as GT240, is that OK?

i've tried to play something, that didn't work before & after reboot


another update: after hours of many combination, i think that updating the kernel and reinstalling nvidia's driver solved the issue.
I am using speaker-test -Dhdmi -c6 and it works well, next i will use mplayer, and that will be it

now i have 1 problem which is not exactly related, the video card insists on outputting 1280x720 to my reciever but my TV is 1360x768, i guess it is a reciever problem

Your SPDIF was muted. I assume that was the issue. Once you have a single SDPIF out showing in the alsamixer controls you’re usually good to go.

As for the resolution issue, I had a similar problem when I first booted with HDMI audio enabled (720p in XBMC although 1080p was explicitly set) but a reboot solved it. I haven’t experienced the issue again since then. Huh

Nice job on the patch paoleary! I’ve linked it in the OP since this seems to be the solution for alsa not recognizing the card at all.
Reply
#15
Hi there I'm still tryiang to catch up, so I tried moep's patch, but it didn't work. After searching I figured out that my car has a different ID (0be2 instead of 0be3) but even if I change this value in the patch. It doesn't make it appears.....

Maybe something with pci vendor idHuh How to check if my card is 10de000d or 10de000a etc...
in lspci I only see 10de...

Thanks in advance

PS: I have a GT220 PNY 1024M
XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 11

Logout Mark Read Team Forum Stats Members Help
Howto: working GT2XX HDMI audio out with alsa1