You are not logged in.
I've been fighting with my recently purchased Zotac mini-PC for about 2 months now trying to get the HDMI audio output to work. I tried extensive modifications of /etc/asound.conf, different versions of ALSA, and even OSS without success. I've finally succeeded using ALSA and GNOME.
First I installed ALSA according to the Arch wiki.
Next I verified that ALSA detected my sound card(s):
cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfe9fc000 irq 28
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcf7c000 irq 18
Next I checked which sound card had the HDMI jack:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
From these two commands, I concluded that I have 2 sound cards (important later on) and that my HDMI sound card was card 1 (NVidia) and that it had 4 possible devices (3,7,8, and 9). To determine which device must be used, I ran the following command for each device (for example, to test card X and device Y, use' plughw:X,Y'):
aplay /usr/share/sounds/alsa/Front_Center.wav -D plughw:1,7
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
I tried each device and got the best sound from device 7 (8 and 9 also worked, device 3 gave static...).
Now, since I had 2 sound cards, I needed to change the default ALSA device. My default ALSA device was card 0 (the Intel card), which wasn't plugged in, so I needed to change the default card to be card 1 (the HDMI card). After reading the ALSA FAQ, I found that modifying /usr/share/alsa.conf should work, though modifying /etc/asound.conf should have also worked. For whatever reason, I couldn't get my modifications to /etc/asound.conf to work, so I edited /usr/share/alsa/alsa.conf. In the "# defaults" section I replaced the following:
defaults.ctl.card NVidia
defaults.pcm.card NVidia
defaults.pcm.device 7
I opted to use the key NVidia rather than the card number (1) since I've read in numerous places that the card index can change unexpectedly after a reboot/update. The key can be checked with cat /proc/asound/cards as shown above.
After this, I reloaded ALSA (/etc/rc.d/alsa restart) and verified that the sound worked through the default channel:
aplay /usr/share/sounds/alsa/Front_Center.wav -D default
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Finally, I rebooted, chose the HDA NVidia (ALSA Mixer) option from gnome-volume-control, and loaded a movie in gnome-mplayer. I was pleased to hear crystal clear sound with functioning volume control
I Hope this helps someone else, I found it very hard to piece together how to diagnose and resolve this problem. Here are some of the resources I found useful:
Arch Wiki ALSA Page
ALSA FAQ for how to change default sound card
ALSA FAQ
XBMC Troubleshooting for ION HDMI
Offline
Glad you got it working, but howtos should be added to the wiki, not to the forums .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Thank you very much sprince09, your post helped me a lot :-)
There's only one premise missing: install the propietary nVidia driver first.
Offline
@sprince09 Can you hear sound through HDMI when you run aplay /usr/share/sounds/alsa/Front_Center.wav -D plughw:1,7 ?
(8 and 9 also worked, device 3 gave static...)
- what does it mean? How do you know that they are working?
What options do you have for snd_hda_intel in /etc/modprobe.d/ ? Can you play the following:
mplayer -ao alsa:device=hw=1,7 file.wav
?
BTW, can you hear sound form video files in xine? If yes, can you post your ~/.xine/config ?
Last edited by knedlyk (2012-01-21 23:41:57)
Offline