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

From Official Kodi Wiki
Jump to navigation Jump to search
>Dorgan
 
(54 intermediate revisions by 22 users not shown)
Line 1: Line 1:
{{outdated}}
== XBMC Live [Eden] 11.0 ==
'''May 4, 2012'''
Update : Lesser configuration in Eden:
In XBMC
System => System => Audio output
[Both Audio Out and passthrough] on custom : hdmi:CARD=NVidia
Use :
add-apt-repository ppa:team-iquik/alsa
add-apt-repository ppa:ubuntu-audio-dev/ppa
apt-get update
apt-get upgrade
When you dont have sound, start alsamixer, choose your card, en unmute it (M).
If this still dont works, use the manual below.
== XBMC Live [Dharma] 10.1 ==
'''April 11, 2011'''
EVGA GT210 - added file "sudo nano /etc/asound.conf" for menu sound
pcm.!default {
    type plug
    slave {
        pcm "hw:0,3"
        rate 48000
    }
}
In XBMC
System => System => Audio output
[Both Audio Out and passthrough] on custom "plughw:0,3" [Card 0, Device 3 from "aplay -l in telnet"]
Update: Didn't need to put custom "plughw:0,3" "HDA Nvidia hdmi" works also.
Tested with G210 / Asus EN210
== Before You Begin/Notes ==
== 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.
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.


== Getting ALSA ==
== Getting ALSA ==
You will need to compile a patched version of ALSA 1.0.22.1 from source with updated drivers.  An easy way to do this is with the [http://ubuntuforums.org/showthread.php?p=6589810 ALSA Upgrade Script].  Alternatively, you can download the sources from the [http://www.alsa-project.org/main/index.php/Download ALSA Project].  If using the upgrade script, only complete the first (<tt>-d</tt>) step.  If using downloaded sources, this how-to assumes that you've unpacked them to <tt>/usr/src/Alsa-1.0.22.1/</tt>.
== Patching ALSA ==
The latest snapshots of alsa-drivers packaged by Takashi Iwai include an updated version of the drivers from Wei Ni of nVidia.  Try this snapshot first.
If using the upgrade script, execute the <tt>-s</tt> step to download the snapshot to the sources directory.  Otherwise, you can download the latest alsa-driver snapshot from [http://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/alsa-driver/ Takashi Iwai's FTP].


If you have a G210 or GT240, proceed to "Compiling and Installing ALSA," below.  GT220 owners, read on.
Team iQuick also has a PPA with the latest ALSA drivers and Ubuntu Audio Dev PPA has the necessary kernel modules for Lucid (What XBMC-Live is based on).


=== The GT220 Patch ===
add-apt-repository ppa:team-iquik/alsa
'''This is relatively untested, though early indications are positive. Please report successes/failures back on [http://forum.xbmc.org/showthread.php?t=69601 the original thread].'''
  add-apt-repository ppa:ubuntu-audio-dev/ppa
If you use a GT220, the latest snapshots get you most of the way there. For whatever reason, the driver does not include the PCI IDs for the GT220.  To add them, [https://gist.github.com/324070/ download this small patch] to your home directory as <tt>alsa_nvidia_gt220.patch</tt> and apply it by entering:
apt-get update
  apt-get upgrade
apt-get install linux-alsa-driver-modules-$(uname -r) --force-yes


$ sudo patch -p1 -d /usr/src/Alsa-1.0.22.1/alsa-driver-1.0.22.1/sound < ~/alsa_nvidia_gt220.patch
Or if you haven't yet installed ALSA:
patching file pci/hda/patch_nvhdmi.c
$


Then proceed to "Compiling and Installing ALSA," below.
apt-get install alsa-base alsa-utils linux-alsa-driver-modules-$(uname -r)


=== The Original Patch ===
-----
If the driver snapshot fails, the old proven method is based on ALSA 1.0.22.1.  You will want the original drivers package.  If using the upgrade script, re-run the <tt>-d</tt> step before doing the below; otherwise, replace the snapshot driver sources with the original ALSA 1.0.22.1 driver sources.
Compiling from source:


First, [http://pastebin.com/pastebin.php?dl=f5bfdf853 download the patch]. This how-to assumes that the patch is in your home directory and is named <tt>alsa_nvidia.patch</tt>. This patch modifies <tt>patch_nvhdmi.c</tt> so it recognizes the G210, GT220, and GT240. Apply the patch by entering:
ALSA 1.0.23 contains the new drivers. You can download, compile, and install it without further additions, and proceed to configuration. The drivers are also included with the 2.6.34 Linux kernel; users of this kernel should be able to skip straight to configuration as long as the <tt>snd_hda_codec_nvhdmi</tt> module (and its dependencies) are available.


$ sudo patch -p1 -d /usr/src/Alsa-1.0.22.1/alsa-driver-1.0.22.1/sound < ~/alsa_nvidia.patch
In general, you can choose to [http://www.alsa-project.org/main/index.php/Download install ALSA from source] or use the [http://ubuntuforums.org/showthread.php?p=6589810 ALSA Upgrade Script]. Alternatively, you can find updated packages for your distribution. Note that only the ''drivers'' from 1.0.23 or later are required; updating the ALSA userspace tools is optional.
patching file pci/hda/patch_nvhdmi.c
$


== Compiling and Installing ALSA ==
Ubuntu users make sure to remove the <tt>linux-backports-modules-alsa-`uname -r`</tt> package or your newly compiled ALSA drivers will be ignored.
If using the upgrade script, run the <tt>-c</tt> and <tt>-i</tt> steps now (hint for the adventurous: [http://ubuntuforums.org/showpost.php?p=8782075&postcount=640 make the <tt>-c</tt> step faster on multicore systems]).  Otherwise, follow the standard ALSA configure, make, and install process, but do not reboot.


== Setting Module Options ==
== Setting Module Options ==
You will need to set options in <tt>/etc/modprobe.d/sound.conf</tt> depending on your card. The general format is:
You may need to set options in <tt>/etc/modprobe.d/sound.conf</tt> depending on your card. The general format is:


  options snd-hda-intel ''OPTIONS''
  options snd-hda-intel ''OPTIONS''


The snapshot driver seems to work sufficiently differently than the leaked driver that the original patch is based on that the module options may change.  Please list your card and working module options below, along with the working device(s).
Please list your card and working module options below, along with the working device(s). Note that these options may change with future revisions and refinements to the drivers.




{| style="width:100%;"
{| class="wikitable" style="width:100%;"
! nVidia GPU !! Manufacturer/Model        !! Options                                !! Best/working device (X=Card #)
! nVidia GPU !! Manufacturer/Model        !! Options                                !! Best/working device (X=Card #)
|-
| G210      || Point of View GF G210    || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || plughw:X,7 (only stereo confirmed)
|-
|-
| G210      || MSI N210 MD512H          || <tt>enable_msi=0</tt>                  || plughw:X,7 (only stereo confirmed)
| G210      || MSI N210 MD512H          || <tt>enable_msi=0</tt>                  || plughw:X,7 (only stereo confirmed)
|-
| G210      || Asus EN210                || no options needed with a current alsa snapshot || plughw:X,7 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES)
|-
| G210      || Club 3D CGNX-212LI        || <tt>enable_msi=0 probe_mask=0xfff2</tt> || plughw:X,7 (only stereo confirmed)
|-
| G210      || Galaxy G210 PCI-E 512M    || <tt>enable_msi=0 probe_mask=0xfff2</tt> || hw:X,3 (6 channels)
|-
| G210      || EVGA 512-P3-1213-LR      || <tt>probe_mask=2</tt> || plughw:X,3 (confirmed 2ch PCM, 6ch AC3 bitstream)
|-
| GT220      || Asus BRAVO 220 SILENT/DI/1GD2(LP)  || no options needed with a current alsa snapshot || plughw:X,7 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES)
|-
|-
| GT220      || Zontac ZT-20201-10L GT220 || <tt>enable_msi=0 probe_mask=0xfff2</tt> || plughw:X,3 (6 channels)
| GT220      || Zontac ZT-20201-10L GT220 || <tt>enable_msi=0 probe_mask=0xfff2</tt> || plughw:X,3 (6 channels)
|-
| GT220      || ASUS ENGT220/DI/1GD2(LP)  || <tt>enable_msi=0 probe_mask=0xfff2</tt> || hw:X,3 (only stereo confirmed)
|-
| GT220      || ASUS ENGT220/G/DI/1GD3(LP)/A  || <tt>enable_msi=0 probe_mask=0xfff2</tt> || hw:X,3 (PCM, multichannel PCM, bitstream (DD/DD-EX/DTS/DTS-ES)
|-
| GT220      || HP Pavilion Elite HPE-141F  || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || hw:X,3 (only stereo confirmed)
|-
| GT210/GT220/GT240 || Any GT210/GT220/GT240  || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || plughw:X,3 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES))
|-
| GT240      || MSI N240GT-MD1G  || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || hw:X,3 (only stereo confirmed)
|-
| GT240      || ASUS ENGT240/DI/512MD5/A  || <tt>enable_msi=0</tt> || plughw:X,7 (only stereo confirmed)
|
|-
| GT240      || Zotac ZEGT240/DI/1024  || <tt>enable_msi=0 probe_mask=0xfff2</tt> || plughw:X,3
|-
| ION-2      || Asus AT5IONT-I || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || plughw:X,3
|-
| ION-2      || Jetway Mini-Top || <tt>enable_msi=0</tt> || plughw:X,7
|-
| ION-2      || Asus S1-AT5NM10E ||  no options needed with a current alsa snapshot || hw:X,7 (6 channels)
|}
|}
* I'm asserting that any GT210/GT220/GT240 should use plughw or plug to allow AC3 passthru. I'm not an alsa expert but the following link suggests plug should be used. However I found this info after getting it working with plughw and I'm loath to break a working system to test it (volunteers?). [http://www.alsa-project.org/main/index.php/DeviceNames Alsa Recommened DeviceNames]


Once you've set your module options, proceed to "PulseAudio Configuration" (if applicable) or "Finishing Configuration".  
Once you've set your module options, proceed to "PulseAudio Configuration" (if applicable) or "Finishing Configuration".  
=== Original 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 "<tt>0xffff,</tt>" for each card that appears before the nVidia device in <tt>`aplay -l'</tt>.  In the example, the nVidia device is Card 1.


=== If that doesn't work... ===
=== If that doesn't work... ===
Line 71: Line 133:
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)
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 <b>BIG NOTE</b> 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.
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.
 
For the case with Nvidia motherboard audio + GT210/GT220/GT240 HDMI don't be discouraged by the note above. I added the "enable_msi=0 probe_mask=0xffff,0xfff2" to /etc/modprobe.d/alsa-base.conf (Ubuntu 9.04) but I'm not 100% sure that's even necessary with 1.0.23. After that my HDMI audio showed up as plughw:2,3.


If multiple nVidia devices still show up with the recommended probe_mask, you may need to adjust it. More information about selecting the correct parameters for this option can be found in [http://www.kernel.org/pub/linux/kernel/people/tiwai/docs/HD-Audio.html#_codec_probing_problem Takashi Iwai's documentation for the High-Definition Audio drivers].
If multiple nVidia devices still show up with the recommended probe_mask, you may need to adjust it. More information about selecting the correct parameters for this option can be found in [http://www.kernel.org/pub/linux/kernel/people/tiwai/docs/HD-Audio.html#_codec_probing_problem Takashi Iwai's documentation for the High-Definition Audio drivers].
 
== XBMC Configuration ==
It may happen that even the PulseAudio configuration doesn't work. For example with the Point of View GeForce G210. In this case, simply set up the module options as described above, and then go into the XBMC Settings -> System -> Audio, select a custom device for audio and insert plughw:X,7. The audio should now work!


== PulseAudio Configuration ==
== PulseAudio Configuration ==
Line 83: Line 150:


== 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!


If you have no sound, you should ensure that your user is a member of the "audio" group:
$ groups
adm dialout cdrom '''audio''' video plugdev mythtv lpadmin
Consult your distributions' documentation to determine how to add users to groups.


If you still have no sound, you can try editing/creating /etc/asound.conf:
If you still have no sound, you can try editing/creating /etc/asound.conf:
Line 90: Line 163:
  pcm.!default hdmi:NVidia
  pcm.!default hdmi:NVidia
  pcm:iec958 hdmi:NVidia
  pcm:iec958 hdmi:NVidia
Ensure that <tt>$HOME/.asoundrc</tt> is empty, does not exist, or does not override these settings. Reboot.

Latest revision as of 08:32, 18 June 2020

Time.png THIS PAGE IS OUTDATED:

This page or section has not been updated in a long time, no longer applies, refers to features that have been replaced/removed, and/or may not be reliable.

This page is only kept for historical reasons, or in case someone wants to try updating it.

XBMC Live [Eden] 11.0

May 4, 2012

Update : Lesser configuration in Eden:

In XBMC System => System => Audio output [Both Audio Out and passthrough] on custom : hdmi:CARD=NVidia

Use :

add-apt-repository ppa:team-iquik/alsa
add-apt-repository ppa:ubuntu-audio-dev/ppa
apt-get update
apt-get upgrade

When you dont have sound, start alsamixer, choose your card, en unmute it (M).

If this still dont works, use the manual below.

XBMC Live [Dharma] 10.1

April 11, 2011

EVGA GT210 - added file "sudo nano /etc/asound.conf" for menu sound

pcm.!default {
   type plug
   slave {
       pcm "hw:0,3"
       rate 48000
   }
}

In XBMC System => System => Audio output [Both Audio Out and passthrough] on custom "plughw:0,3" [Card 0, Device 3 from "aplay -l in telnet"]

Update: Didn't need to put custom "plughw:0,3" "HDA Nvidia hdmi" works also. Tested with G210 / Asus EN210


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.

Getting ALSA

Team iQuick also has a PPA with the latest ALSA drivers and Ubuntu Audio Dev PPA has the necessary kernel modules for Lucid (What XBMC-Live is based on).

add-apt-repository ppa:team-iquik/alsa
add-apt-repository ppa:ubuntu-audio-dev/ppa
apt-get update
apt-get upgrade
apt-get install linux-alsa-driver-modules-$(uname -r) --force-yes

Or if you haven't yet installed ALSA:

apt-get install alsa-base alsa-utils linux-alsa-driver-modules-$(uname -r)

Compiling from source:

ALSA 1.0.23 contains the new drivers. You can download, compile, and install it without further additions, and proceed to configuration. The drivers are also included with the 2.6.34 Linux kernel; users of this kernel should be able to skip straight to configuration as long as the snd_hda_codec_nvhdmi module (and its dependencies) are available.

In general, you can choose to install ALSA from source or use the ALSA Upgrade Script. Alternatively, you can find updated packages for your distribution. Note that only the drivers from 1.0.23 or later are required; updating the ALSA userspace tools is optional.

Ubuntu users make sure to remove the linux-backports-modules-alsa-`uname -r` package or your newly compiled ALSA drivers will be ignored.

Setting Module Options

You may need to set options in /etc/modprobe.d/sound.conf depending on your card. The general format is:

options snd-hda-intel OPTIONS

Please list your card and working module options below, along with the working device(s). Note that these options may change with future revisions and refinements to the drivers.


nVidia GPU Manufacturer/Model Options Best/working device (X=Card #)
G210 Point of View GF G210 enable_msi=0 probe_mask=0xffff,0xfff2 plughw:X,7 (only stereo confirmed)
G210 MSI N210 MD512H enable_msi=0 plughw:X,7 (only stereo confirmed)
G210 Asus EN210 no options needed with a current alsa snapshot plughw:X,7 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES)
G210 Club 3D CGNX-212LI enable_msi=0 probe_mask=0xfff2 plughw:X,7 (only stereo confirmed)
G210 Galaxy G210 PCI-E 512M enable_msi=0 probe_mask=0xfff2 hw:X,3 (6 channels)
G210 EVGA 512-P3-1213-LR probe_mask=2 plughw:X,3 (confirmed 2ch PCM, 6ch AC3 bitstream)
GT220 Asus BRAVO 220 SILENT/DI/1GD2(LP) no options needed with a current alsa snapshot plughw:X,7 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES)
GT220 Zontac ZT-20201-10L GT220 enable_msi=0 probe_mask=0xfff2 plughw:X,3 (6 channels)
GT220 ASUS ENGT220/DI/1GD2(LP) enable_msi=0 probe_mask=0xfff2 hw:X,3 (only stereo confirmed)
GT220 ASUS ENGT220/G/DI/1GD3(LP)/A enable_msi=0 probe_mask=0xfff2 hw:X,3 (PCM, multichannel PCM, bitstream (DD/DD-EX/DTS/DTS-ES)
GT220 HP Pavilion Elite HPE-141F enable_msi=0 probe_mask=0xffff,0xfff2 hw:X,3 (only stereo confirmed)
GT210/GT220/GT240 Any GT210/GT220/GT240 enable_msi=0 probe_mask=0xffff,0xfff2 plughw:X,3 (PCM, multichannel PCM, bitsteam (DD/DD-EX/DTS/DTS-ES))
GT240 MSI N240GT-MD1G enable_msi=0 probe_mask=0xffff,0xfff2 hw:X,3 (only stereo confirmed)
GT240 ASUS ENGT240/DI/512MD5/A enable_msi=0 plughw:X,7 (only stereo confirmed)
GT240 Zotac ZEGT240/DI/1024 enable_msi=0 probe_mask=0xfff2 plughw:X,3
ION-2 Asus AT5IONT-I enable_msi=0 probe_mask=0xffff,0xfff2 plughw:X,3
ION-2 Jetway Mini-Top enable_msi=0 plughw:X,7
ION-2 Asus S1-AT5NM10E no options needed with a current alsa snapshot hw:X,7 (6 channels)
  • I'm asserting that any GT210/GT220/GT240 should use plughw or plug to allow AC3 passthru. I'm not an alsa expert but the following link suggests plug should be used. However I found this info after getting it working with plughw and I'm loath to break a working system to test it (volunteers?). Alsa Recommened DeviceNames

Once you've set your module options, proceed to "PulseAudio Configuration" (if applicable) or "Finishing Configuration".

If that doesn't work...

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.

For the case with Nvidia motherboard audio + GT210/GT220/GT240 HDMI don't be discouraged by the note above. I added the "enable_msi=0 probe_mask=0xffff,0xfff2" to /etc/modprobe.d/alsa-base.conf (Ubuntu 9.04) but I'm not 100% sure that's even necessary with 1.0.23. After that my HDMI audio showed up as plughw:2,3.

If multiple nVidia devices still show up with the recommended probe_mask, you may need to adjust it. More information about selecting the correct parameters for this option can be found in Takashi Iwai's documentation for the High-Definition Audio drivers.

XBMC Configuration

It may happen that even the PulseAudio configuration doesn't work. For example with the Point of View GeForce G210. In this case, simply set up the module options as described above, and then go into the XBMC Settings -> System -> Audio, select a custom device for audio and insert plughw:X,7. The audio should now work!

PulseAudio Configuration

If using PulseAudio, add the following line to /etc/pulse/default.pa:

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

Where 1,3 is card#,device# for the nVidia HDMI output 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!

If you have no sound, you should ensure that your user is a member of the "audio" group:

$ groups
adm dialout cdrom audio video plugdev mythtv lpadmin

Consult your distributions' documentation to determine how to add users to groups.

If you still have no sound, you can try editing/creating /etc/asound.conf:

pcm.!default hdmi:NVidia
pcm:iec958 hdmi:NVidia

Ensure that $HOME/.asoundrc is empty, does not exist, or does not override these settings. Reboot.