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

From Official Kodi Wiki
Jump to navigation Jump to search
>JakFrost
(→‎Setting Module Options: - probe_mask explanation and instructions.)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{outdated}}
== XBMC Live [Eden] 11.0 ==
== XBMC Live [Eden] 11.0 ==
'''May 4, 2012'''
'''May 4, 2012'''
Line 42: Line 44:


== Before You Begin/Notes ==
== Before You Begin/Notes ==
This guide assumes that you have a GeForce G210, GT220, GT240, ION, or ION-2 (Next Gen) card, are using a reasonably up-to-date system, and that you have at least the nVidia 190 series or 29x 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.
 
nVidia Driver Link: http://www.nvidia.com/Download/index.aspx
 
nVidia Xfree86/Xorg HDMI Setup Manual: ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html


== Getting ALSA ==
== Getting ALSA ==
Line 72: Line 70:


== Setting Module Options ==
== Setting Module Options ==
You may need to set options in <tt>/etc/modprobe.d/sound.conf</tt> or <tt>/etc/modprobe.d/snd-hda-intel.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:


<tt>options snd-hda-intel ''OPTIONS''</tt>
options snd-hda-intel ''OPTIONS''
 
The option 'enable_msi' is no longer required since the snd-hda-intel driver will detect it and set it automatically.  The 'probe_mask' option tells the driver to only probe the specified device ID and in effect hides sound output devices and whole sound cards from the driver and the entire system making them unusable.  Be careful about 'probe_mask' since you can inadvertenly hide the sound card that you are trying to get sound out of.
 
Note: the 0xfffx,0xfffx format of the probe_mask options shown below is incorrect and deprecated, you should not use it. 
 
You should refer to the nVidia HDMI GPU document linked to above section 12.9.2. probe_mask to understand it.  Basically, it is a comma separated array of bitmask fields, and each bit maps to a hw:CARD:DEV=# from the 'aplay -L' command.  So that if you have two sound cards shown with 'aplay -L' and each of those cards shows a few hw:CARD:DEV=# devices, you can use "probe_mask=card1bitmask,card2bitmask" format to affect the detection of devices on each card.  For each card each device shown represents a bit in the mask making the hexdecimal values equal to 1,2,4,8, etc.  The value "-1" means default bitmask so that the driver tries to detect all devices on that card.  So for example if you only want to see device 2 and are trying to hide devices 1,3,4 on the second sound card on your system you would edit /etc/modprobe.d/snd-hda-intel.conf and put int he line "option snd-hda-intel probe_mask=-1,0x2", if you only wanted to see device 4, then the mask would be "0x8".  If you want to see devices 1,3,4 but not 2 then "0xb", and so on.  If you don't understand binary or bitmasks search Wikipedia or the web to learn.
 
If your computer or HTPC has multiple sound cards, such as a motherboard based on-board sound card like the RealTek or Intel series and a recent nVidia video then you have 2 soundcards since the nVidia video has its own on-board sound chip for HDMI or SPDIF pass-through output.  If you are only interested in using the HDMI connector for both the video and audio output form your computer or HTPC and do not plan to use the on-board sound card at all for any analog or digital/optical SPDIF output then I recommend disabling that on-board sound card in your motherboard's BIOS to clean up sound device detection by the operating system and making configuration and troubleshooting a lot simpler with less devices.  (As an example if you have the Asus AT5ION-I motherboard it comes with the on-board RealTek ALC887 sound chip and nVidia ION-2 video card with its own sound chip.  Disable the On-Board audio option in the BIOS.  Be aware that this will affect the 'probe_mask=' values by removing one card from them.)


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.
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.
Line 122: Line 112:
|-
|-
| ION-2      || Asus AT5IONT-I || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || plughw:X,3
| ION-2      || Asus AT5IONT-I || <tt>enable_msi=0 probe_mask=0xffff,0xfff2</tt> || plughw:X,3
|-
| ION-2      || Asus AT5IONT-I (On-Board Sound Disabled) || <tt>probe_mask=0x2</tt> || hdmi:NVidia
|-
|-
| ION-2      || Jetway Mini-Top || <tt>enable_msi=0</tt> || plughw:X,7
| ION-2      || Jetway Mini-Top || <tt>enable_msi=0</tt> || plughw:X,7
Line 177: Line 165:


Ensure that <tt>$HOME/.asoundrc</tt> is empty, does not exist, or does not override these settings. Reboot.
Ensure that <tt>$HOME/.asoundrc</tt> is empty, does not exist, or does not override these settings. Reboot.
[[Category:How-to]]
[[Category:Linux]]
[[Category:NVidia]]

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.