Archive:Set up HDMI audio on GeForce GT210, GT220, or GT240: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 42: Line 42:


<tt>load-module module-alsa-sink device=hw:1,3</tt>
<tt>load-module module-alsa-sink device=hw:1,3</tt>
Where 1,3 is your card #, device # given by <tt>aplay -l</tt>


== Finishing Installation ==
== Finishing Installation ==
Now, reboot your system.  Using <tt>`alsamixer'</tt>, select your nVidia card (select it from the F6 menu, or use the <tt>-c</tt> option) and unmute the S/PDIF output (press "m"; the box should change from "MM" to "OO".)  Enjoy!
Now, reboot your system.  Using <tt>`alsamixer'</tt>, select your nVidia card (select it from the F6 menu, or use the <tt>-c</tt> option) and unmute the S/PDIF output (press "m"; the box should change from "MM" to "OO".)  Enjoy!

Revision as of 22:51, 23 February 2010

Before You Begin/Notes

This guide assumes that you have a GeForce G210, GT220, or GT240 card, are using a reasonably up-to-date system, and that you have at least the nVidia 190 series proprietary drivers installed.

Note that this is a work in progress and there are still significant limitations to the current method. The GT240, while it becomes recognized, may not work (please post feedback here!). Channel mapping is known to be incorrect. In videos, audio may occasionally drop with corresponding video stutter.

Getting ALSA

You will need to compile a patched version of ALSA 1.0.22.1 from source. An easy way to do this is with the ALSA Upgrade Script. Alternatively, you can download the sources from the ALSA Project. If using the upgrade script, only complete the first (-d) step. If using downloaded sources, this how-to assumes that you've unpacked them to /usr/src/Alsa-1.0.22.1/.

Patching ALSA

First, download the patch. This how-to assumes that the patch is in your home directory and is named alsa_nvidia.patch. This patch modifies patch_nvhdmi.c so it recognizes the G210, GT220, and GT240. Apply the patch by entering:

$ sudo patch -p1 -d /usr/src/Alsa-1.0.22.1/alsa-driver-1.0.22.1/sound < ~/alsa_nvidia.patch
patching file pci/hda/patch_nvhdmi.c
$

Compiling and Installing ALSA

If using the upgrade script, run the -c and -i steps now (hint for the adventurous: make the -c step faster on multicore systems). Otherwise, follow the standard ALSA configure, make, and install process, but do not reboot.

Setting Module Options

$ sudo cat - >> /etc/modprobe.d/sound.conf <<EOF
> options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2
> EOF
$ 

Where there is a single "0xffff," for each card that appears before the nVidia device in `aplay -l'. In the example, the nVidia device is Card 1.

Alternative method

if probe_mask doesn't work for you (it didn't for me, one boot my GT220 came up first instead of second, but next reboot it came up second without me touching the probe_mask parameter, you can try this (which works reliably for me):

options snd-hda-intel enable_msi=0 index=-2

or

options snd-hda-intel enable_msi=0 index=1

The first one tells snd-hda-intel "don't grab index 0", while the second one says "grab index 1" (so even if you disable your on-board card, your GT220 is still going to be hw:1,7)

I have to make a BIG NOTE that I don't have another Nvidia sound card on the motherboard, and that's why the above works for me. It won't work if you have an integrated nvidia sound AND a GT220.


In addition to the steps above, some people have had to add the following line to /etc/pulse/default.pa:

load-module module-alsa-sink device=hw:1,3

Where 1,3 is your card #, device # given by aplay -l

Finishing Installation

Now, reboot your system. Using `alsamixer', select your nVidia card (select it from the F6 menu, or use the -c option) and unmute the S/PDIF output (press "m"; the box should change from "MM" to "OO".) Enjoy!