Raspberry Pi 3 as Airplay audio server

This is how I turned a Raspberry Pi 3 into an AirPlay audio player using Shairport Sync.

Install the packages required to compile Shairport Sync

sudo apt-get install build-essential autoconf automake libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev libavahi-client-dev libssl-dev libsoxr-dev

Download Shairport Sync

wget -O shairport-sync-master.zip https://github.com/mikebrady/shairport-sync/archive/master.zip
unzip shairport-sync-master.zip

Compile

cd shairport-sync-master
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd --sysconfdir=/etc
make

Install and configure

sudo make install
getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null
getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null

Edit /etc/shairport-sync.conf, look for alsa = { and add the entries required for the output device. For my PiFi DAC V2 (see this other article, I added:

output_device = "hwplug:0";
mixer_device = "Digital";

Finally, enable the service at startup:

sudo systemctl enable shairport-sync
[ Last modified: 2016-09-28 21:24:00+02:00 ]