HiFiBerry DAC Software

 

HiFiBerry DAC Software

Starting with kernel version 3.10.23, HiFiBerry DAC support is included in the Linux kernel. So for many use cases, you don’t have to compile your own kernel, but can simply upgrade to the latest kernel.

Install the software

The easiest way is to use the standard Raspbian distribution (or other distributions based on it). You only have to update your system to the newest kernel. Login to your Raspberry and use the following commands:

sudo rpi-update
sync
sudo reboot

If you’re using Volumio (formerly known as RaspyFi),  you have to enable I2S DAC support on the settings page and reboot. In this software, the HiFiBerry DAC support is already included.

Configure the software

Most likely, the modules aren’t enabled yet on your system. Add the following lines to the file /etc/modules:

snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_pcm5102a
snd_soc_hifiberry_dac

If you don’t have any specific modules already configured in /etc/modules (e.g., a plain Raspian installation), you can just run the following command as root to create the /etc/modules file (copy/paste it into a root shell):

cat >/etc/modules <<EOF
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_pcm5102a
snd_soc_hifiberry_dac
EOF
sync

Reboot again now.

Test it

Check if the sound card is enabled with “aplay”:

pi@raspberrypi ~ $ 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

You can use aplay to playback a WAV file. For other file formats (MP3, FLAC, etc.), I recommend using mplayer.

Problems?

To check for common problems, we created a small test script. If “aplay -l” doesn’t list the HiFiBerry DAC as a sound card, run the following commands:

wget www.hifiberry.com/files/dac/check-system
mv check-system check-system.dac
chmod u+rx ./check-system.dac
./check-system.dac

If wget is not installed on your system, download the file at www.hifiberry.com/files/dac/check-system and run it on your Raspberry Pi. If you’re still having problems, please check our forum at our Crazy Audio site.