I ran into some issues while configuring my XBMC HTPC with HDMI audio. After some time with various troubleshooting steps I was able to repair the issue by completing the following steps:
Relevant system specific information:
OS: Ubuntu Desktop 11.04
HDMI Device: XFX ATI 5770
sudo alsamixer
Ensure no devices are muted (indicated by “MM”).
sudo alsactl store 0
This step saves the running alsa configuration
sudo aplay -l
This command will list the installed alsa devices. Choose the device which you want to output the HDMI audio from – paying attention to the card number and device number.
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
The above information is used to configure a custom audio device within XBMC. Within the XBMC system configuration settings, change the output device and output passthrough device to custom with the following name:
plughw:1,3 (Note that yours may differ – it is based on the output of the aplay command.
After saving, restarting the machine, and re-launching XBMC, I was now receiving audio over HDMI – though sounds for the system menus no longer functioned (an issue I’ve since ignored). However, when I played audio, it did not seem as though I was receiving the center channel audio. I was able to fix this by an odd combination of configuration settings. While playing a video I set the audio to analog – changed the volume from -60db to 0db, and switched audio back to HDMI.