Make Raspberry PI an Airplay Speaker

 



This article explain how to create a Airplay 2 speaker connector with a Raspberry PI.

In first time :
We deploy shairport-sync, an Airplay connector (https://github.com/mikebrady/shairport-sync).
This is the Airplay 2 installation.

sudo apt update
sudo apt upgrade
sudo apt install --no-install-recommends build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev
Deploy nqptp service :
git clone https://github.com/mikebrady/nqptp.git
cd nqptp
autoreconf -fi
./configure --with-systemd-startup
make
sudo make install
sudo systemctl enable nqptp
sudo systemctl start nqptp
cd ..
Install Shareport-sync :
git clone https://github.com/mikebrady/shairport-sync.git
cd shairport-sync
git checkout development
autoreconf -fi
./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2
make -j
sudo make install
Modify Shareport-sync configuration file :
sudo vim /etc/shairport-sync.conf
general =
{
name = "Hifi-Airplay";
}

alsa =
{
output_device = "hw:sndrpihifiberry";
mixer_control_name = "Digital";
}
sudo systemctl enable shairport-sync
sudo systemctl start shairport-sync

Command to know

start service : sudo systemctl start shairport-sync
stop service : sudo systemctl stop shairport-sync
restart service : sudo systemctl restart shairport-sync
shairport-sync stat : sudo shairport-sync -vu --statistics
log file : sudo journalctl -u shairport-sync

Comments