Close Menu
    Facebook X (Twitter) Instagram
    AirPlay Guru
    • Best
    • Comparison
    • Gaming Consoles
    • How To
    • Smart TV
    • Streaming
    • Troubleshooting
    AirPlay Guru
    Home » How to Make Raspberry Pi an AirPlay Receiver [Easy Guide]
    How To

    How to Make Raspberry Pi an AirPlay Receiver [Easy Guide]

    Oliver SinclairBy Oliver SinclairApril 3, 2023No Comments5 Mins Read
    Facebook Twitter WhatsApp Telegram Email
    Airplay Raspberry Pi

    AirPlay can transmit audio and video files, such as movies, series, sports, cartoons, music, etc., from any Apple device via AirPlay/AirPlay 2 using an internet connection. Since there are numerous AirPlay 2 compatible speakers out there in the market, listening to songs over it from iOS or Mac is made easy. For those unaware, you can even use Raspberry Pi as an AirPlay receiver by using Shairport Sync, an open-source software. By having the Raspberry Pi and inputting a few codes, you can build an AirPlay Receiver server for your speaker.

    Once you build the Raspberry Pi AirPlay 2 receiver server to your speakers, you can AirPlay any songs from your iOS or any AirPlay 2 compatible devices to your speakers.

    Table of Contents

    Toggle
    • Things You Need to Set Up Raspberry Pi AirPlay 2 Receiver on your Speakers
    • How to Set Up a Raspberry Pi AirPlay Receiver
    • How to Improve the Audio Output with Raspberry Pi Receiver Setup
    • How to Improve the Raspberry Pi AirPlay Receivers WIFI Performance
    • Why Not Use the 3.5MM Audio Out with Raspberry Pi AirPlay?
    • FAQ

    Things You Need to Set Up Raspberry Pi AirPlay 2 Receiver on your Speakers

    • Raspberry Pi
    • Uninterrupted Power Supply
    • Micro SD Card
    • WIFI or Ethernet connection
    • Speakers
    • AirPlay-compatible devices such as iPhone, iPad, iPod, etc.

    How to Set Up a Raspberry Pi AirPlay Receiver

    Make sure you update the Raspberry Pi. With that, setting up your Raspberry Pi AirPlay Receiver on your speaker is straightforward.

    1. To update the Raspbian OS on the Raspberry Pi, open the Terminal, and check for updates using the below commands to upgrade the software.

    sudo apt update
    sudo apt upgrade

    2. Once you have checked the above updates, you must install several additional packages by following the commands below.

    sudo apt install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev
    sudo apt install avahi-daemon libavahi-client-dev
    sudo apt install libssl-dev

    3. Now, you need to get the Shairport sync source to your Raspberry Pi to allow it to sync among multiple rooms of audio streams from iOS devices or third-party AirPlay sources. First, run the below command to clone the Shairport-Sync repository.

    cd ~
    git clone https://github.com/mikebrady/shairport-sync.git

    4. Now, you must build and install the Shairport software to your Raspberry Pi. Before installing the software, you must configure the system under the Shairport-sync folder. To do so, run the below commands on the Raspberry Pi to set up the basic config file and built system to utilize the ALSA audio backend, the Avahi network, and to use OpenSSL for encryption.

    cd shairport-sync
    autoreconf -i -f
    ./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata

    5. After the configuration, you need to input the below commands into your Raspberry Pi to install the Shirport-sync to the device.

    make
    sudo make install

    6. After the installation, you need to enter the below commands to enable the Shairport software to start automatically.

    sudo systemctl enable shairport-sync

    7. To Start Up the Shairport Software, you must run the below command.

    sudo service shairport-sync start

    Once the Shairport Software has been started, you can play the audio files from any AirPlay-compatible device to your speaker.

    How to Improve the Audio Output with Raspberry Pi Receiver Setup

    You can do the following on the Raspberry Pi AirPlay 2 receiver to improve your speaker’s audio output.

    1. Update the Raspberry Pi’s firmware by inputting the following command on the terminal.

    sudo rpi-update

    2. Remove the SD card and power off your Raspberry Pi upon successful firmware update. Now insert the SD card into a reader connected to your computer to change the Raspberry Pi’s boot config file. On the SD card, you can get the config file at the file location /boot/config.txt.

    Go to the file location, open it, and modify the config file by adding the below new line and save it.

    audio_pwm_mode=2

    3. Now place the SD card back into the Rasberry Pi and input the below command into the terminal to set the analog jack as the main audio out.

    amixer cset numid=3 1

    4. Next to that, modify the Shairport db range to improve the Raspberry Pi AirPlay device. You can edit the content by changing it in the configuration file.

    To change the Configuration file, you can input the below commands into the terminal.

    sudo nano /usr/local/etc/shairport-sync.conf

    5. Within the file, make the below changes by inputting the below codes into the terminal. Once the changes below have been made, to save the file, press CTRL + X, press Y, and finally give ENTER.

    Find

    //      volume_range_db = 60 ;

    Replace with

    volume_range_db = 30;

    6. Once all the above changes have been made, you can restart the Raspberry Pi by running the below command to get the improved audio output.

    sudo reboot

    How to Improve the Raspberry Pi AirPlay Receivers WIFI Performance

    While hearing the songs, if you get an interpretation, it may spoil the whole song’s output towards your feeling or emotion. Hence you can follow the below steps o improve the AirPlay Recrivers WIFI performance.

    1. Modify the network interface file to disable the Raspberry Pi’s WLAN adaptor power management. To do so, open the file and input the following command in the terminal.

    sudo nano /etc/network/interfaces

    2. Then, you need to modify the interface within the file by adding the below-following text to input the Raspberry Pi not to manage its wireless power and will not turn off the saving power.

    Once you have made the below changes to save the file, press CTRL + X, press Y, and finally give ENTER.

    Find

    iface wlan0 inet manual

    Add Below

    wireless-power off

    3. Once all the above changes have been made to the file, restart the Raspberry Pi by inputting the below command into the terminal.

    sudo reboot

    Why Not Use the 3.5MM Audio Out with Raspberry Pi AirPlay?

    Since AirPlay already gives the best audio than Bluetooth, using the 3.5mm audio output built into the Raspberry Pi is not advisable. Using it will diminish the audio quality before it gets to the speakers. Apart from this, using an HDMI audio output is also the best option to be used on the receivers.

    FAQ

    Can I Use AirPlay on Raspberry Pi 3?

    Yes. You shall use the above setup procedure to use AirPlay on your Raspberry Pi 3.

    AirPlay 2 iPad iPhone Mac Raspberry Pi
    Previous Article10 Best AirPlay 2 Receivers Worth Buying [Latest 2023]
    Next Article How to AirPlay Libby from iOS & Mac to Apple TV/Smart TV
    Oliver Sinclair

    Hello fellows! This is Oliver Sinclair. I write and share about technologies that fascinate me. We are a household of Apple users, and one of the features we love to use is AirPlay. Once you understand the knack of it, there isn’t something better and more comfortable than AirPlay. You needn’t download or sign in to so many different devices. Just AirPlay it and save your time and device storage. My articles will focus on the tricks and techniques you can use and how to AirPlay different apps, shows, sports, and so on from all your Apple devices, including your iPhone, iPad, and Mac. Let's AirPlay!

    Related Posts

    How to AirPlay Hoopla from iPhone and Mac

    December 20, 2024 How To

    How to AirPlay Philo to Apple TV & Compatible TVs

    December 17, 2024 How To

    How to AirPlay Sling TV from iPhone,iPad,& Mac to Apple TV/Smart TV

    August 13, 2024 How To
    Add A Comment
    Leave A Reply Cancel Reply

    Latest Articles

    How to AirPlay Hoopla from iPhone and Mac

    December 20, 2024

    How to AirPlay Philo to Apple TV & Compatible TVs

    December 17, 2024

    How to AirPlay Sling TV from iPhone,iPad,& Mac to Apple TV/Smart TV

    August 13, 2024

    What is AirPlay Code & How to Enable the Security Feature on TV

    August 7, 2024

    How to AirPlay MusicBee to Apple TV & AirPlay 2-Devices

    July 31, 2024

    How to AirPlay Golden Globe Awards 2023 from iOS & Mac

    July 30, 2024

    How to AirPlay Linux to iPhone/Mac & Screen Mirror from Linux

    July 29, 2024

    QuickTime Player AirPlay Not Working: Causes & Fixes

    July 26, 2024
    • Home
    • Privacy Policy
    • Contact Us
    © 2025 Airplayguru.com.

    Type above and press Enter to search. Press Esc to cancel.