Audio over HDMI
From LinuxMCE wiki
|Version||Status||Date Updated||Updated By|
|810||Deprecated- Use Unmuting_Channels Only||10 october 2010||golgoj4|
(Also see notes on the LinuxMCE-0810 alpha2 page)
That article is started to help people get audio over HDMI. Feel free to post here your experience!
Generally it's possible with kernel 2.6.27 and ALSA 1.0.18. A few notes here. First of all, note that DVI port support video signal only. It's possible to inject audio signal to external video card from the S/PDIF using SPDIF_HDMI headers. Usually integrated video card with HDMI port have possibility to pass audio as well.
Card provided devices
nVidia doesn't provide a separate card for HD. Instead of that it offers a separate device:
linuxmce@dcerouter:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: NVidia [HDA NVidia], device 0: ALC883 Analog [ALC883 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: NVidia [HDA NVidia], device 1: ALC883 Digital [ALC883 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0
linuxmce@dcerouter:~$ aplay -L default:CARD=NVidia HDA NVidia, ALC888 Analog Default Audio Device front:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog Front speakers surround40:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=NVidia,DEV=0 HDA NVidia, ALC888 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers hdmi:CARD=NVidia,DEV=0 HDA NVidia HDMI Audio Output null Discard all samples (playback) or generate zero samples (capture)
Correct LSPCI Output
If you don't see HDA NVidia in the aplay -L output that means you card is not recognized by system correctly. Here is a correct output of lspci:
lspci -v (only the relevant portion): 00:07.0 Audio device: nVidia Corporation MCP78S [GeForce 8200] High Definition Audio (rev a1) Subsystem: ASUSTeK Computer Inc. Device 82fe Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 20 Memory at fcf78000 (32-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel
From the command line, type the following
The alsamixer should should display three digital devices:
- IEC958 D
All of them should be unmuted. Press 'm' to unmute, and the right and left arrows to navigate. Then select 'HDA NVidia NVIDIA HDMI (ALSA)' as output for all items in 'Sound Prefrences' and select 'HDA NVidia (Alsa mixer)' as the mixer.
After that audio over HDMI should work.
The Wrong way
This is an example of doing things the wrong way and potentially screwing things up for other users. asound.conf will be overwritten on reboots, making it less than ideal. Please contact someone in irc and verify information like this before its added to the wiki. -golgoj4
EDITED (geekyhawkes) It might be necessary to create an /etc/asound.conf file to "forward" the audio to your HDMI port. Details of the asound.conf file i am using can be found here
To test your HDMI output run following command:
aplay -D plug:hdmi /usr/share/sounds/KDE_Window_Open.wav
Replace KDE_Window_Open.wav by any other WAV file. You should use plug to convert mono sample to stereo.
Usually integrated ATI video cards come with separated HD sound card (for example, integrated ATI RadeonTM 1250). Sound over HDMI works fine with the latest Catalyst drivers.