Howto: working GT2XX HDMI audio out with alsa

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sensei73 Offline
Senior Member
Posts: 104
Joined: May 2008
Reputation: 0
Wink   
Post: #16
So manage so find out my card is 10de000a and 0be2 (gt220)
I manage to change it to the patch and compiled again alsa driver.
So now the GT220 is detected and present in alsamixer with 4 output before adding ptions snd-hda-intel probe_mask=0xffff,0xfff2, after only 1 output.

But in xbmc when i start a movie I only get 1sec of sound through HDMI, after the sound repeat itself indefinitely and xbmc stop playing the movie...

so far it's a real progress!

XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #17
Thanks for the info about the IDs, sensei73. I'll update the patch.

Please hold, your info is important to us. Your patch will be applied in the order in which it was received.

UPDATE: Since this is getting complicated, decided to clone the git for alsa-driver. Found out that the files I'm modifying actually originate in alsa-kernel, rather than alsa-driver. Now cloning alsa-kmirror. Then I should be able to do the work.

UPDATE 2: Updated patch. I confirmed only that it compiles, but it's not much different than the original patch. Since it's built off of alsa-kmirror, the patch command is now `patch -p1 -d sound < patchfile' from the alsa-driver root.
(This post was last modified: 2010-02-06 21:10 by paoleary.)
find quote
TycoonX Offline
Junior Member
Posts: 6
Joined: Feb 2010
Reputation: 0
Post: #18
Thanks a lot moep, my audio problem is solved Smile
I will try to work something out with the video resolution, i get: Screen(s) found, but none have a usable configuration when trying to output 1360x768
(This post was last modified: 2010-02-06 21:55 by TycoonX.)
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #19
Updated patch again. Turns out no modifications to hda_intel.c are actually needed, since all nVidia stuff is recognized in the existing entry. This means the only file we need to touch against the official release of ALSA is patch_nvhdmi.c. Patch is once again compiled and tested with my G210.
find quote
moep Offline
Junior Member
Posts: 22
Joined: Mar 2004
Reputation: 0
Location: Austria
Post: #20
paoleary Wrote:Updated patch again. Turns out no modifications to hda_intel.c are actually needed, since all nVidia stuff is recognized in the existing entry. This means the only file we need to touch against the official release of ALSA is patch_nvhdmi.c. Patch is once again compiled and tested with my G210.

What's odd is that I have my 210 working just fine despite having both modules in a completely unmodified state (I verified via md5).
Can you try reverting to the standard modules to check if HDMI audio support persists?
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #21
moep Wrote:What's odd is that I have my 210 working just fine despite having both modules in a completely unmodified state (I verified via md5).
Can you try reverting to the standard modules to check if HDMI audio support persists?

Been there, done that, decided a T-shirt was a waste of money (after all, that's where I started). I think a smarter move would be to check the sources of the module you're running in Arch. Maybe it's been patched in some way, and that patch hasn't gone upstream?
(This post was last modified: 2010-02-07 04:57 by paoleary.)
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #22
paoleary Wrote:Updated patch again. Turns out no modifications to hda_intel.c are actually needed, since all nVidia stuff is recognized in the existing entry. This means the only file we need to touch against the official release of ALSA is patch_nvhdmi.c. Patch is once again compiled and tested with my G210.

paoleary,

so is this the right patch to use. I did it and this is what aply shows now, if I hit F6 in alsmixer now I can choose Nvidia HDA and I have 4 iec958 devices, I unmuted them all, I have not inserted the option 0xfff etc as per moep suggest yet. here is my aplay. GT240 Asus 1GB DDR3 by the way.

Code:
xbmc@xbmcmain:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/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: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

**EDIT**10:35est - after setting the /etc/modprobe.d/alsa-base.conf for me as there is no sound.conf in my modprobe.d directory. Then in xbmc I had to restart a couple times to actually see the HDA NVIDIA HDMI option available in the settings. and my aplay -l now shows only one HDMI device #3 no device #7 and alsamixer shows only one spdif channel after pressing F6, it is not in the default window, I clicked on a movie and started watching I did not get the failed to initialize audio settings problem as before. so it seems to be working, no to restore my xorg file and hook it up in the living room and test on the big screen and amp. Thanks for the patched and testing guys this was not as painful as I thought it would be.

You know the one thing confusing me I started to test this in my P5N7A-WM with the 9300GT on board gpu disabled in the bios. The Freaking thing STILL runs as hot as it ever did even disable what good it that.

rgds,

Dave
(This post was last modified: 2010-02-07 05:42 by rodercot.)
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #23
rodercot Wrote:**EDIT**10:35est - after setting the /etc/modprobe.d/alsa-base.conf for me as there is no sound.conf in my modprobe.d directory.

Glad it's working for you. For future reference, you're allowed to create the /etc/modprobe.d/sound.conf file if it doesn't exist. Smile
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #24
paoleary Wrote:Glad it's working for you. For future reference, you're allowed to create the /etc/modprobe.d/sound.conf file if it doesn't exist. Smile


Well I spoke to soon I guess. I have aplay showing the card, if I press f6 I have an unmuted spdif device, I have the HDA NVIDIA HDMI device in xbmc it plays everything fine and no failed to initilaize audio settings but no audio from anything, there is nothing even registering on the rcvr's front panel so it is not seeing anything coming from the hdmi connector.

see I knew it couldn't be that easy.

Dave
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #25
rodercot Wrote:Well I spoke to soon I guess. I have aplay showing the card, if I press f6 I have an unmuted spdif device, I have the HDA NVIDIA HDMI device in xbmc it plays everything fine and no failed to initilaize audio settings but no audio from anything, there is nothing even registering on the rcvr's front panel so it is not seeing anything coming from the hdmi connector.

Well, well darn.

I don't know XBMC, but you've selected the correct ALSA device in its settings? plughw:1,3?
find quote
[vEX] Offline
Junior Member
Posts: 15
Joined: Feb 2010
Reputation: 0
Post: #26
Do you just copy the new snd-codec-hda-nvhdmi.ko to your /lib/modules/[...] folder? Or do you overwrite all the files using "make install"?

- EDIT -
Meh, just went ahead with make install, figuring I can always recover the installation with a live CD if needed. Now "aplay -l" lists NVIDIA HDMI and I have one S/PDIF in alsamixer, now let's see if it plays anything as well!

- EDIT 2 -
Can't get any sound to play with aplay, with XBMC I get ~1 second and then it keeps looping that sound and the video is sluggish so something isn't right there.
(This post was last modified: 2010-02-07 13:11 by [vEX].)
find quote
sensei73 Offline
Senior Member
Posts: 104
Joined: May 2008
Reputation: 0
Post: #27
[vEX];503714 Wrote:Do you just copy the new snd-codec-hda-nvhdmi.ko to your /lib/modules/[...] folder? Or do you overwrite all the files using "make install"?

- EDIT -
Meh, just went ahead with make install, figuring I can always recover the installation with a live CD if needed. Now "aplay -l" lists NVIDIA HDMI and I have one S/PDIF in alsamixer, now let's see if it plays anything as well!

- EDIT 2 -
Can't get any sound to play with aplay, with XBMC I get ~1 second and then it keeps looping that sound and the video is sluggish so something isn't right there.

Same result here!

XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #28
All,

This is what I see in XBMC with any file I try to play. I cannot watch anything HD after the patch. It it it gogogoes liiiiiiike thiiiiiiis on allll theeee fraaaaaames.

Code:
ALSA lib conf.c:4617:(snd_config_expand) Parse arguments error: Invalid argument
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM hdmi:CARD=NVidia:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2

EDIT - @paoleary - so what actual patch do you have working currently the original which does both files or the last which touches nvhdmi.c only. I am about to do a clean install as this is test machine anyhow and I need to clean it up as I am up to eth6 auto now, Quoting Ron White "I'm NOT SURE WHY" - LOL.

Dave
(This post was last modified: 2010-02-07 15:52 by rodercot.)
find quote
paoleary Offline
Junior Member
Posts: 32
Joined: Feb 2010
Reputation: 0
Post: #29
rodercot Wrote:All,

This is what I see in XBMC with any file I try to play. I cannot watch anything HD after the patch. It it it gogogoes liiiiiiike thiiiiiiis on allll theeee fraaaaaames.

Code:
ALSA lib conf.c:4617:(snd_config_expand) Parse arguments error: Invalid argument
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM hdmi:CARD=NVidia:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2

EDIT - @paoleary - so what actual patch do you have working currently the original which does both files or the last which touches nvhdmi.c only. I am about to do a clean install as this is test machine anyhow and I need to clean it up as I am up to eth6 auto now, Quoting Ron White "I'm NOT SURE WHY" - LOL.

Dave

I've tested the first and third versions, which in my specific configuration, work identically. Here's a little more system info.

Base system: Fully updated Mythbuntu 9.10 (Karmic) x86_64 w/JYA VDPAU repository
uname -a: Linux prandtl 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux
nVidia proprietary driver: 195.30 (from JYA)
ALSA: 1.0.22.1 (from ALSA FTP, with patch_nvhdmi.c replaced by version from HD_AUDIO-9.10.tar.gz, then further updated with PCI IDs for G210 and GT220)

lspci | grep nVidia
01:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce 210] (rev a2)
01:00.1 Audio device: nVidia Corporation Device 0be3 (rev a1)

Behavior:
Works fine for media played from MythTV. Running speaker-test does not work. Actual number of channels working unknown (as I have no receiver).

Summary of current situation:
WORKING One user (moep) w/G210 on Arch (2.6.32 -- is that also your kernel version?) using distribution-provided ALSA 1.0.22.1, modified sound.conf.
WORKING One user (paoleary) w/G210 on Ubuntu (9.10) using modified official ALSA 1.0.22.1 patch_nvhdmi.c, modified sound.conf.
BROKEN One user (sensei73) w/GT220 on Ubuntu (9.10) using modified official ALSA 1.0.22.1 patch_nvhdmi.c, modified sound.conf.
BROKEN One users (rodercot) w/GT240, other details unknown, using modified (official?) ALSA 1.0.22.1 patch_nvhdmi.c, modified sound.conf.

So far it appears that my patch will only work for the G210. Since I don't have a GT240, I don't know where to go from here. If you're actually able to get the modules in HD_AUDIO-9.10.tar.gz to run, that's probably the next line of attack. I could also (since I've cloned the repository) produce a complete diff of HD_AUDIO-9.10.tar.gz against 1.0.22.1, if you think it might help. Let me know.

Also, it's probably worth sharing configuration info (see above) to try to nail this down.
(This post was last modified: 2010-02-07 19:29 by paoleary.)
find quote
sensei73 Offline
Senior Member
Posts: 104
Joined: May 2008
Reputation: 0
Post: #30
paoleary Wrote:WORKING One user (paoleary) w/G210 on Ubuntu (9.10) using modified official ALSA 1.0.22.1 patch_nvhdmi.c, modified sound.conf.
BROKEN Two users (sensei73, rodercot) w/GT240, other details unknown, using modified (official?) ALSA 1.0.22.1 patch_nvhdmi.c, modified sound.conf.

My system is Ubuntu 9.10 64 bits with a GT220 and ALSA 1.0.22.1(official) with patch_nvhdmi.c .

XBMC SVN (updated every week) ubuntu Karmic 64bits
Intel E5200/ 3 Go Ram / Nvidia GT220 1Go / 6To (1.5To x 4 Raid 5)
find quote
Post Reply