Converting your RaspberryPi into AirPlay speaker

Just turned my #raspberrypi into AirPlay speaker, so I don’t have to keep my computer powered on all the time to listen music on my home audio system.

Following commands were used to convert standard Raspbian installation into AirPlay speaker:

  • Edit /boot/config.txt and uncomment hdmi_drive=2 to change audio output to HDMI instead of analog jack. Reboot.
  • Install Shairport
    sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl \
        libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
    git clone perl-net-sdp
    cd perl-net-sdp
    perl Build.PL
    sudo ./Build
    sudo ./Build test
    sudo ./Build install
    cd ..
git clone <a href=""></a>
cd shairport
./ -a AudioPI &amp;
make install
sudo cp shairport.init.sample /etc/init.d/shairport
sudo chmod a+x /etc/init.d/shairport
sudo update-rc.d shairport defaults
  • Setup a name in /etc/init.d/shairport
  • Test it :)