Enable HiFiBerry support in Raspbmc
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
snd_soc_bcm2708_i2s bcm2708_dmaengine snd_soc_pcm5102a snd_soc_hifiberry_dac
snd_soc_bcm2708_i2s bcm2708_dmaengine snd_soc_wm8804 snd_soc_hifiberry_digi
- 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.
First you have to enable ALSA support in XBMC. Use the Raspbmc setting tool to enable “Support for external sound cards”
Now, you can route the sound to the HiFiBerry card:
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!
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.