DAC+ on XBIAN with Automatic Audio Switcher

For those who are interested to know if the DAC+ works on XBIAN, the answer is that it works (almost) out of the box, so this post can serve as a knowledge base article for those wishing to buy the DAC+ and use XBIAN, which is not officially supported by Hifiberry.
My setup also includes the Automatic Audio Switcher, a Kodi script that separates the audio outputs: in my case audio files are only played on the DAC+, while the sound of the video files is played only on the HDMI.
I have successfully tested both things on XBian version 20170203. Kodi version 16.
Congratulations to Hifiberry for producing the DAC+ that sounds great!

1. DAC+ activation:

All you have to do is to use your installed XBIAN system or to install XBIAN in the usual way (with the XBIAN Installer, not the Hifiberry one, which does not support it).
Once it is installed, the simplest thing is to edit the config.txt file, which, in the latest versions, is preconfigured with the commented-out entries for the Hifiberry cards.
In Windows, proceed like this:
Use a text editor that supports the Unix end of line format (not sure if Notepad does it; I used the free and better Notepad++).
Open the drive letter of the SD card and open the config.txt file at the root of it.
Comment out this line by putting a # (hash) at the beginning:
Comment in this other line by removing the # at the beginning:
Save the modifications, put the SD card in the RPi with the DAC+ and start it up.
Otherwise, you can do it from the RPi, connecting to it via SSH and editing the file /boot/config.txt (restart required).
It's done: Kodi will list the DAC+ as an additional audio output named something like "ALSA: (...snd_rpi_hifiberry_dacplus...)".

2. Automatic Audio Switcher

This is a Kodi add-on that makes so that if you have a TV and a HIFI system connected to the RPi, files are not played on the loudspeakers of both devices, but music only on the HIFI and movies only on the TV.
I found the add-on here: http://forum.kodi.tv/showthread.php?tid=201896
It's an old version, but it works just fine. I see that there is a new version here, but I have not tested it: https://github.com/Helly1206/script.audioswitch
The first configuration is not very intuitive. In short: you install it, then go to Configure, Setup, select to run the configuration setup. Go to Settings, System, Audio Device, select the DAC+ [ALSA: (...snd_rpi_hifiberry_dacplus...)] and play a music file. Then go back, select HDMI and play a video file.
The add-on configuration also let you choose different volume levels for the two interfaces (restart required).


Please sign in to leave a comment.