====== Creating an Air Play Device using a Raspberry Pi ====== I have several iOS devices at home and love the ability to broadcast whatever audio is playing on my device on one or more of the Air Play speakers in the house. I did a lot of research looking for speaker systems with this built in but it seemed that if you put "apple" in it, you have to bump the price tag up by a couple of hundred dollars. I set out to do the same for ~$50 total... ==== Parts List ==== * [[http://www.amazon.com/gp/product/B01C6EQNNK|Raspberry Pi 3 Model B, Power Supply, and Clear Case]] * [[http://www.amazon.com/gp/product/B00488G6P8|SanDisk 8GB microSD Card]] * [[http://www.amazon.com/gp/product/B00GHY5F3K|AmazonBasics USB-Powered Computer Speakers]] ==== Software Installation ==== - First Load the OS onto the SD media - Do the initial configuration steps for Raspbian and update. - Build Shairport-sync sudo apt install -y autoconf libtool libdaemon-dev libasound2-dev sudo apt install -y libpopt-dev libconfig-dev libssl-dev sudo apt install -y avahi-daemon libavahi-client-dev libsoxr-dev sudo apt install -y git mkdir /tmp/shairport-sync git clone https://github.com/mikebrady/shairport-sync.git /tmp/shairport-sync cd /tmp/shairport-sync autoreconf -i -f ./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --sysconfdir=/etc --with-metadata --with-soxr make sudo make install sudo systemctl enable shairport-sync - Shairport configuration: ''sudo nano /etc/shairport-sync.conf'' - In the ''General'' section: - Update the ''name'' to the correct name and uncomment the line. - Update the ''volume_range_db'' to 60 and uncomment the line. - In the ''alsa'' section: - Update the ''output_device'' to ''hw:0'' and uncomment the line. - Update the ''mixer_control_name'' to ''PCM'' and uncomment the line. - Finally start the service: ''sudo service shairport-sync start'' - Open ''AlsaMixer'' and move the volume to the highest setting that doesn't show red. Keep in mind that the speaker output of the Raspberry Pi is not HiFi quality... The Raspberry Pi's built-in audio DAC that is connected to the device's headphone jack provides a low-quality output that is nevertheless useful for my purposes. It can be quite noisy if you turn up the volume in AlsaMixer. If you want higher quality audio, I'd recommend adding an external DAC...