Shairport-sync allow to use the Raspberry Pi (Model A, B) as an AirPlay Audio gateway.
It's a wonderful option to add AirPlay on an old amplifier for example !
- Install Raspbian latest on a SD Card
- Boot
sudo raspi-config
- Next > Localisation + Wi-Fi + SSH (if needed)
Next get the "basics" from Mike Brady readme
git clone https://github.com/mikebrady/shairport-sync.git
(and cd into)autoreconf -i -f
./configure --sysconfdir=/etc --with-alsa --with-pa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd
make
make install
sudo systemctl enable shairport-sync
Next, edit /boot/config.txt
and append this line somewhere : audio_pwm_mode=2
Set the alsa config in shairport-sync.conf (in /etc
by default)
general = {
name = "PiPlay";
};
alsa =
{
output_device = "hw:0"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.
}
To start the service : /etc/init.d/shairport-sync start
The Raspberry Pi should be displayed in System Preferences > Sound :D