There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

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

Software Installation

  1. First Load the OS onto the SD media
  2. Do the initial configuration steps for Raspbian and update.
  3. 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 avahi-daemon libavahi-client-dev libsoxr-dev
     
    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-systemv --sysconfdir=/etc --with-metadata --with-soxr
     
    make
    sudo make install
    sudo update-rc.d shairport-sync defaults 90 10
  4. Shairport configuration: sudo nano /etc/shairport-sync.conf
  5. In the General section:
    1. Update the name to the correct name and uncomment the line.
    2. Update the volume_range_db to 35 and uncomment the line.
  6. In the alsa section:
    1. Update the output_device to hw:0 and uncomment the line.
    2. Update the mixer_control_name to PCM and uncomment the line.
  7. Finally start the service: sudo service shairport-sync start
  8. 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…

Copyright © 2015 by Julian Easterling. SOME RIGHTS RESERVED.

Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.