Enable HiFiBerry support in Raspbmc

 

Enable HiFiBerry support in Raspbmc

This is an archived documentation. It won't be updated anymore and it might not be accurate anymore.

This documentation is outdated. Raspbmc has been replaced by OSMC.

Since the release in April 2014, Raspbmc officially supports the HiFiBerry add-on cards without the need to replace XBMC or the kernel. This guide shows how to configure Raspbmc to use our cards.

Base system configuration

  • Download and install the official Raspbmc Gotham release
  • Login to the system using ssh or console
  • Install ALSA utilities. This is not needed, but helps debugging
    sudo apt-get install alsa-utils
  • Edit /etc/modules.
    sudo vi /etc/modules
    HiFiBerry DAC

    snd_soc_bcm2708_i2s
    bcm2708_dmaengine
    snd_soc_pcm5102a
    snd_soc_hifiberry_dac

    HiFiBerry Digi

    snd_soc_bcm2708_i2s
    bcm2708_dmaengine
    snd_soc_wm8804
    snd_soc_hifiberry_digi
  • Reboot
    sync
    sudo reboot
  • Check that the sound card is listed
    pi@raspbmc:~$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []   Subdevices: 1/1   Subdevice #0: subdevice #0

At this point, the operating system is configured. Now XBMC configuration has to be done.

XBMC configuration

First you have to enable ALSA support in XBMC. Use the Raspbmc setting tool to enable “Support for external sound cards”

raspbmc1 raspbmc2

Now, you can route the sound to the HiFiBerry card:

raspbmc3 raspbmc4 raspbmc5 raspbmc6

That’s it. Now all sound output of XBMC will be sent to the HiFiBerry card. However, the sound output for movie playback will still be sent directly to the HDMI output. This can be an interesting setup if you want to playback music over the HiFiBerry but use a TV set or home theater system attached to the HDMI output for video playback

Optional: Route all sound to the HiFiBerry card

The current XBMC release still uses the “omxplayer” movie player that does not support any other output than the onboard connectors. You have to switch to the the newer “dvdplayer” that can use external sound cards. Note that dvdplayer has still some performance problems with some movies. There is a lot of development going on and some users have reported they have no problems at all. Therefore this might not impact you.

To use the new dvdplayer backend, you have to create an “advancedsettings.xml” file in ~/.xbmc/userdata with the following content:

<advancedsettings>
<video>
<defaultplayer>dvdplayer</defaultplayer>
<defaultdvdplayer>dvdplayer</defaultdvdplayer>
</video>
</advancedsettings>

Now restart XBMC and the movie audio output will be routed to the HiFiBerry card.
Note that this does not enable Dolby-Digital or DTS pass-trough on the HiFiBerry Digi yet!

Problems?

Raspbmc often releases new version. We’re not able to test every version. If this guide does not work, the best way is aksing other Raspbmc users in the Raspbmc forum.

Last updated: October 4, 2019