• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 11
Howto: working GT2XX HDMI audio out with alsa
#31
sensei73 Wrote:My system is Ubuntu 9.10 64 bits with a GT220 and ALSA 1.0.22.1(official) with patch_nvhdmi.c .

Fixed that. Which nVidia driver?

UPDATE: Interesting note, besides speaker-test not working right (using -t wav, I just hear FronFronFronFronFronFronFron...^C and it never goes to the next channel), aplay with the 5.1 channel WAV file from here doesn't work right either. I just get staticy clicking. However, all the media I've played from within MythTV works fine, including both my usual test videos (Big Buck Bunny@ 720p, Top Gear Polar Special @ 1080p).
Reply
#32
paoleary Wrote: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.

Try to patch in codec ids a-f instead of just b. I’m not at home at the moment and don’t have access to the source but I think you know what I mean.
GPUs other than the 210 may use different codec IDs.

Someone with a card other than the GT210 could also try adding

Code:
printk("vendor_id=0x%x\n", codec->vendor_id);

after line 1394 of had_intel.c and post the resulting debug messages here (check /var/messages)

Oh, and I just noticed that TycoonX also got audio working, also using a GT210. Not sure why the others don’t work… maybe the probe_mask is to blame.
Reply
#33
My card is a gigabyte G210 and is not listed under aplay. I have same system with you moep. Do you know how to apply the patch mentioned here on Arch ? There is no driver package from Arch depo...just alsa-lib-1.0.22-1-i686.pkg.tar.gz & alsa-utils-1.0.22-2-i686.pkg.tar.gz
Reply
#34
spykos Wrote:My card is a gigabyte G210 and is not listed under aplay. I have same system with you moep. Do you know how to apply the patch mentioned here on Arch ? There is no driver package from Arch depo...just alsa-lib-1.0.22-1-i686.pkg.tar.gz & alsa-utils-1.0.22-2-i686.pkg.tar.gz

You’ll have to download the alsa driver from source, patch it and compile:

ftp://ftp.alsa-project.org/pub/driver/al....1.tar.bz2

the file(s) you want are in ./alsa-kernel/pci/hda
Reply
#35
moep Wrote:Try to patch in codec ids a-f instead of just b. I’m not at home at the moment and don’t have access to the source but I think you know what I mean.
GPUs other than the 210 may use different codec IDs.

I think I should have that covered here:
Code:
+struct hda_codec_preset snd_hda_preset_nvhdmi[] = {
+       { .id = 0x10de0002, .name = "NVIDIA MCP77/78 HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de0007, .name = "NVIDIA MCP79/7A HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de8001, .name = "NVIDIA MCP73 HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de000c, .name = "NVIDIA MCP89 HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de000d, .name = "NVIDIA GT240 HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de000a, .name = "NVIDIA GT220 HDMI", .patch = patch_nvhdmi },
+       { .id = 0x10de000b, .name = "NVIDIA G210 HDMI", .patch = patch_nvhdmi },
        {} /* terminator */
};

...based on the GT240 ID in the HD_AUDIO-9.10.tar.gz, and the GT220 ID reported here.
Reply
#36
ok but after compilation how is it going to be integrated to arch alsa package ?
Reply
#37
Also when i apply the patch i get the following. Anyone knows the reason ?
Used patch from http://pastebin.com/f45fa4b81

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru --suppress-common-lines alsa-driver-1.0.22.1/alsa-kernel/pci/hda/hda_intel.c alsa-driver-1.0.22.1-patched/alsa-kernel/pci/hda/hda_intel.c
|--- alsa-driver-1.0.22.1/alsa-kernel/pci/hda/hda_intel.c 2009-12-28 08:21:33.000000000 -0600
|+++ alsa-driver-1.0.22.1-patched/alsa-kernel/pci/hda/hda_intel.c 2010-02-05 20:20:38.000000000 -0600
--------------------------
File to patch:
Reply
#38
paoleary Wrote: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.

Well, I'm also using Arch (which is rolling release btw, so no version numbers) using kernel 2.6.32.7 and a GeForce G210 (driver version 195.30) and sadly the patch doesn't make it work for me. Undecided

As I reported a few posts above, I get like one second of audio and then it loops/stutters and the video also stutters and is generally slugish.
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 4x2048MB PC6400 | Gainward GeForce G210 | Arch Linux (64-bit/x86_64) | xbmc-git
Reply
#39
spykos Wrote:Also when i apply the patch i get the following. Anyone knows the reason ?
Used patch from http://pastebin.com/f45fa4b81

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru --suppress-common-lines alsa-driver-1.0.22.1/alsa-kernel/pci/hda/hda_intel.c alsa-driver-1.0.22.1-patched/alsa-kernel/pci/hda/hda_intel.c
|--- alsa-driver-1.0.22.1/alsa-kernel/pci/hda/hda_intel.c 2009-12-28 08:21:33.000000000 -0600
|+++ alsa-driver-1.0.22.1-patched/alsa-kernel/pci/hda/hda_intel.c 2010-02-05 20:20:38.000000000 -0600
--------------------------
File to patch:

Your working directory will need to be alsa-driver-1.0.22.1/, wherever you happened to have put it. Otherwise, patch will not find the file with the command line that I gave. For more, look at `man patch', particularly the -p and -d options.

Also, what you build won't be integrated with the Arch package, as you are building it separately from source. Goes with the territory. An Arch package update will happily overwrite your work.

You did try just moep's sound.conf first, right?
Reply
#40
yes paoleary you are correct...dir problem! put in correct one location and patch was applied but with the following messages.

patching file pci/hda/patch_nvhdmi.c
Hunk #1 FAILED at 29.
Hunk #2 FAILED at 63.
Hunk #3 FAILED at 96.
Hunk #4 FAILED at 104.
Hunk #5 FAILED at 312.
Hunk #6 FAILED at 339.
Hunk #7 FAILED at 367.
Hunk #8 FAILED at 394.
8 out of 8 hunks FAILED -- saving rejects to file pci/hda/patch_nvhdmi.c.rej

is this normal ? and yes i tried moep's sound.conf but my nvidia doesn't show up.
Reply
#41
Hey All,

I did a clean install on the system this am. Myth 9.10, jya, using the latest binary NV driver 195.36.03 on an Asus P5N7A-VM with a c2d 7400, I also tried it on my Asus P5K3 board and a c2d 7300. Asus GT240 1Gb DDR3

I am using the alsa sources dwlded with the alsa script and just keep a clean copy of the drivers directory for testing clean again patched system.

Anyhow tried both patches separately - no go, either way, first (original) does not find the card and 2nd patch finds the card but destroys playback (video) on anything hd with vdpau and No sound from Myth or XBMC in any setup details.

I am going to set it up for testing in my Asus p5k3 board again and try again but I need to get this other system completed so I will load up the other system later. Anything else you can thing of to try I am keen.

If we can get it working in linux/myth it should work everywhere without damaging playback.

rgds,

Dave
Reply
#42
to clarify, for me the sound.conf setting I’ve posted was just the last missing piece in the puzzle. It makes sure the four non-working SPDIF outs in alsamixer turn into one working SPDIF out. Nothing else.

If your card does not show up to begin with, the probe_mask command will do nothing for you.

Something I still don’t understand is why I can get the card to show up without any modification and some can’t. Does linux cache the kernel modules somewhere? Maybe my system is using a cached modified version even though the .ko files are default?

//EDIT:

I have a new idea — move the (patched!) snd-hda-codec-nvhdmi.ko to /lib/modules/’uname -r’/kernel/sound/pci/ instead of /lib/modules/’uname -r’/kernel/sound/pci/hda/

That’s a quick and very dirty way of making sure the module gets loaded before snd-hda-intel.ko. Might help. I just found a modified copy of the ko in /pci on my system. Rolleyes
Reply
#43
Yeah, the step I’ve mentioned in my posting above seems to be crucial.

I will rewrite the OP when I get home tonight.
Until then just move your patched snd-hda-codec-nvhdmi to …/pci/ instead of …/pci/hda and reboot.

Here is my own confirmed-to-be-working version of it, I suspect only for the 210 though. I don’t have the source anymore. Oo

http://dl.getdropbox.com/u/16719/snd-hda...-nvhdmi.ko
Reply
#44
Patched with paoleary's last patch, moved the file from hda to pci,
but "lsmod | grep hdmi" gives me no results, have to modprobe snd-hda-codec-nvhdmi to get it to show up.. (and to do that, I have to move it back to hda dir)
Also my aplay -l shows no results.

lspci shows up with:
01:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce GT 220] (rev a2)
01:00.1 Audio device: nVidia Corporation Device 0be2 (rev a1)

Really appreciate the work you guys put in to this!
Reply
#45
@moep

I understood that with your G210 you only had to modify the sound.conf. You had to use the patch as well ? I am a bit confused here!
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 11

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