OpenELEC on the Asus AT5IONT-I with sound over HDMI

For the past couple of months I’ve been running XBMC on a Windows 7 installation. Worked pretty much instantly after installing, but the boot times were horrible, and every now and then windows updates would nag. When I bought the box I briefly tried XBMCBuntu, but concluded that it was too much tinkering to get it working and gave up.

However, today I set out to give OpenELEC a try. Almost everything worked out of the box, except for audio over HDMI. I’ve tried most of the things on the wiki, but couldn’t get it to work in both the video as well as the XBMC menu. Most people seem to be satisfied with just the video, often calling the XBMC menu sounds “obnoxious”, but I’m rather fond of those, so I set out to fix it.

Here’s a quick guide on what I did.

First hurdle: Installing directly on USB

Seeing as I didn’t want to overwrite my perfectly functioning windows installation, I bought a cheap Albert Heijn USB Stick to install on. However, I quickly found out that the normal installation method uses an USB key as the installation media, and doesn’t allow directly installing to it. Luckily, it’s possible to manually do so from a linux box.

I used this guide, with the small addition that the extlinux.conf file should read “APPEND boot=LABEL=system disk=LABEL=Storage quiet” as the last line.

At this point OpenELEC will boot, and XBMC will come up, but audio is broken beyond repair.

Second hurdle: Audo in videos

There are a lot of forum threads with a lot of different configurations. None of those worked out of the box for me, but by combining a few I found something usable.

The first thing you want to do is open up the windows networking share \\openelec\Configfiles, and in the modprobe.d directory create a file named sound.conf with the following line:

options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2

Next create another file in \\openelec\Configfiles directly named ssh_enable, so we can SSH in later.

At this point you should re boot the box. When it comes back, SSH in using something like putty. Seeing as it exports samba shares, putty will most likely be able to resolve the IP if you just enter openelec. The username is root, the password is openelec.

Once you’re in type ‘aplay -l’ and look at the output. If you did this quickly, it might not show all devices. If it differs a lot from my output, wait a few seconds and try again. It should show something like this:

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC887 Analog [ALC887 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC887 Digital [ALC887 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0

As you can see, HDMI is on card 1 and device 3 on my box. Next in \\openelec\Configfiles I create a file asound.conf with the following text:

pcm.!default {
type plug
slave {
pcm “hw:1,3”
rate 48000

If the card or device on your box differs from card 1 and device 3, don’t forget to change those!

At this point do another reboot, according to most forum posts, audio in the menus should be working now, but it isn’t. We’ll tackle that later. Fow now, let’s first fix the video audio: In XBMC go to System -> Settings -> System -> Audio Output. Set the following, but change 1 or 3 with your card/device number respectively: (You can leave anything non-specified the way you like it)

  • Audio Output: HDMI
  • Audio output device: Custom
  • Custom audio device: plughw:1,3
  • Passthrough output device: Custom
  • Custom passthrough device: plughw:1,3

Note here that I haven’t tested passthrough, as my TV doesn’t actually decode anything, but it should probably work. At this point, feel free to test if the video audio actually works.

Third hurdle: The damn menu sounds

The menu sounds drove me absolutely crazy. At some point I thought I had it working, but it only worked because I’d manually restart XBMC. After some testing, it looked like XBMC was loaded before the audio modules were properly initialized.

I fixed this by writing two loops that waited for ALSA to be properly initialized before going to XBMC.

In \\openelec\Configfiles\, put the following two lines:

while ! (aplay -l | grep -q “HDA Intel”); do sleep 1; done
while ! (aplay -l | grep -q “HDA NVidia”); do sleep 1; done

This will wait first for a HDA Intel device to appear in aplay -l, then for a HDA NVidia device, and will sleep while they’re not loaded.

Lastly, we need to make this file executable, so from SSH type chmod ugo+x /storage/.config/

After a reboot, your sound should now also be working in the menus 🙂

3 thoughts on “OpenELEC on the Asus AT5IONT-I with sound over HDMI”

Leave a Reply

Your email address will not be published. Required fields are marked *