Difference between revisions of "NVidia HDMI Audio on LinuxMCE 1004"

From LinuxMCE
Jump to: navigation, search
(How to setup nVidia ION2 and GTxxx HDMI Audio on LinuxMCE 1004)
(How to setup nVidia ION2 and GTxxx HDMI Audio on LinuxMCE 1004)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
* '''This page is outdated, please see http://wiki.linuxmce.org/index.php/Audio_in_1004'''
 +
The system does much better detection for audio now, and alternative control is afforded the user with a conf setting detailed in the link above.
 +
 +
 +
 +
 
==How to setup nVidia ION2 and GTxxx HDMI Audio on LinuxMCE 1004==
 
==How to setup nVidia ION2 and GTxxx HDMI Audio on LinuxMCE 1004==
  
Line 21: Line 27:
 
or
 
or
 
  options snd-hda-intel enable_msi=0 index=-2
 
  options snd-hda-intel enable_msi=0 index=-2
to /etc/modprobe.d/alsa-base.conf to place the HDMI audo as card 0. For some reason, it has to be card 0. After making this change, you can try
+
to /etc/modprobe.d/alsa-base.conf to place the HDMI audo as card 0. For some reason, HDMI has to be on card 0. After making this change, you can try
 
  sudo alsa -f reload
 
  sudo alsa -f reload
 
But sometimes this is problematic, and a reboot is preferred. Check again with the sudo aplay -l command to see that HDMI is card 0
 
But sometimes this is problematic, and a reboot is preferred. Check again with the sudo aplay -l command to see that HDMI is card 0
Line 40: Line 46:
 
  ## Run Orbiter
 
  ## Run Orbiter
 
  xset m 2 2
 
  xset m 2 2
  '''DISPLAY=:0 mplayer /usr/share/sounds/pop.wav'''
+
  '''aplay -D plughw:0,7 /usr/share/sounds/pop.wav'''
 
   
 
   
 
Please report back to L3mce with your results.
 
Please report back to L3mce with your results.

Latest revision as of 21:38, 24 October 2012

The system does much better detection for audio now, and alternative control is afforded the user with a conf setting detailed in the link above.



How to setup nVidia ION2 and GTxxx HDMI Audio on LinuxMCE 1004

This how-to specifically is geared towards nVidia ION2 and GTxxx cards for HDMI audio, but may work for other cards as well, especially if they are not listing in aplay. In these examples sudo is used, however if you have ssh'ed into the moon unit, it is not needed as you are already root.

It is firstly assumed that:

sudo aplay -l

Does NOT list your HDMI audio devices. IF that is the case then:

sudo apt-get install linux-backports-modules-alsa-$(uname -r)
reboot

They should now be listed. Check with:

sudo aplay -l | grep -i 'hdmi'

You will likely have devices 3,7,8, and 9 on card 0 or 1. Configured correctly, they should look something like:

 card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
 card 0: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
 card 0: NVidia [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]
 card 0: NVidia [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]

What is important to us here is the card number, and the device number. IF HDMI cards list as card 1: You will have to add either

options snd-hda-intel model=auto  

or

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

to /etc/modprobe.d/alsa-base.conf to place the HDMI audo as card 0. For some reason, HDMI has to be on card 0. After making this change, you can try

sudo alsa -f reload

But sometimes this is problematic, and a reboot is preferred. Check again with the sudo aplay -l command to see that HDMI is card 0

You can test which will work for you with:

sudo speaker-test -c 2 -l 1 -t sine -D hw:0,7

etc based on the output of aplay where the 0 is the card and 7 is the device in our example. Move through each device number listed until you hear a sine wave test left and right audio channels. It is always 0,3 or 0,7 on the id41, for instance, and seems to be completely random which. Others output on 0,9... others output on everything. Once the correct audio out is buzzed by the tone, they should all now work.

Now getting that to stick is another trick. In /usr/pluto/templates/asound.conf I would replace %MAIN_CARD% with 0,7 as per the example or whatever yours turns out to be.

pcm.asym_hdmi {
       type asym
       playback.pcm "hdmi_playback"
       capture.pcm "plughw:%MAIN_CARD%"
}

Lastly we will add a command in the /usr/pluto/bin/LaunchOrbiter.sh script to let mplayer play a sound-file on startup of the orbiter. This sound should exist on all installs, and is the smallest least intrusive one pre-packaged on the system. Its the line right below the xset m command

## Run Orbiter
xset m 2 2
aplay -D plughw:0,7 /usr/share/sounds/pop.wav

Please report back to L3mce with your results.