Volumio 2 + Airplay 2

I have been able to update shairport-sync on Volumio 2 (System Version: 2.917, RP 4), so that I can use Airplay 2 (multi-room support).

I thought I’d share the process.

There is only one problem at the moment: the ui on Volumio does not show artwork/album when using Airplay 2. I am not sure if that worked with Airplay 1.
Maybe someone out there can help with that.

Plugins I have installed (that are still working after the update)

  • Nanosound CD
  • Volumio Spotify Connect2

Process

Login

ssh volumio@volumio.local

Turn off WiFi power management

sudo iwconfig wlan0 power off

Update Dependencies

sudo apt-get update
sudo apt-get install --only-upgrade dhcpcd5 e2fslibs e2fsprogs libblas-common libblas3 libbluray1 libcairo2 libcomerr2 libdrm2 libfreetype6 liblapack3 liborc-0.4-0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libss2 libva-drm1 libva-x11-1 libva1 x11-common

NOTE: I have here skipped updating dependencies firmware-ralink and libsdl1.2debian because they broke the OS for me.

Remove old version

# backup
mv /usr/local/bin/shairport-sync /usr/local/bin/shairport-sync.old
# remove services (see https://github.com/mikebrady/shairport-sync/blob/master/BUILD.md#1-prepare)
sudo rm /lib/systemd/system/shairport-sync.service
sudo rm /etc/dbus-1/system.d/shairport-sync-dbus.conf

Install build-essential

  1. Edit file /etc/apt/sources.list
  2. Add a new line at the bottom with the following deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
  3. Save
  4. Then:
sudo apt-get update
sudo apt-get -y install binutils
sudo apt-get -y install libstdc++-4.9-dev
sudo apt-get -y install gcc-4.9 gcc g++-4.9 g++ dpkg-dev
  1. Remove line from /etc/apt/sources.list
  2. Then:
sudo apt-get update

NOTE For reference on this step, check out 2aCD’s post.

Install Airplay 2 Dependencies

sudo apt install --no-install-recommends git xxd xmltoman autoconf automake libtool
sudo apt install --no-install-recommends libpopt-dev libconfig-dev
sudo apt install --no-install-recommends avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev
sudo apt install --no-install-recommends libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev

NOTE I skipped installing dependecies libasound2-dev because it broke the OS and build-essential because we have already installed it on previous step.

Install NQPTP

NQPTP Is needed for Airplay 2 functionality. More info here.

# Make a temporary folder
mkdir temp
cd temp

# Clone nqptp repository
git clone https://github.com/mikebrady/nqptp.git
cd nqptp

# Install
autoreconf -fi
./configure --with-systemd-startup
make
sudo make install

# Enable service
sudo systemctl enable nqptp
sudo systemctl start nqptp 
cd ..

NOTE: For NQPTP to work properly, port 319 and 320 should be open.
Check with netstat --listen that the ports are open.

Update libplist-dev

Shairport sync uses libplist-dev version 2.2.0-6.
In order to update it:

  1. Edit file /etc/apt/sources.list
  2. Add new line at the bottom deb http://deb.debian.org/debian bullseye main contrib non-free
  3. Save
  4. Then:
sudo apt-get update
sudo apt-get install libplist-dev=2.2.0-6
  1. Remove line from file /etc/apt/sources.list
  2. Then:
sudo apt-get update

Install Shairport-sync

# Clone repo
git clone https://github.com/mikebrady/shairport-sync.git
cd shairport-sync
git checkout tags/4.1-rc2

NOTE : The previous command is checking out tag 4.1-rc2 which is were Airplay 2 support is at the moment. Be sure to checkout the right tag/branch for your case. Hopefully it will just be released on main soon.

# Install
autoreconf -fi
./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-metadata  --with-systemd --with-airplay-2  
make -j
sudo make install

# Enable service
sudo systemctl enable shairport-sync

NOTE: The ./configure command has many options. Be sure to apply the correct flags for your specific system (more info here)

Configuration of output device

  1. Launch command shairport-sync -h to list all system’s output devices.
  2. Edit configuration file /etc/shairport-sync.conf and add the correct output_device.
  3. Reboot

You will notice Airplay 2 is working because of the different icon (tick within a circle) displayed closed to device name when streaming to Volumio from iOS or MacOS.

This seems to be broken now, are these instructions still the same?

I haven’t touched the install since I have posted this.
Not sure if it is still valid today.

What’s the error you get?

One point where it might get wrong is this:

NOTE : The previous command is checking out tag 4.1-rc2 which is were Airplay 2 support is at the moment. Be sure to checkout the right tag/branch for your case. Hopefully it will just be released on main soon.

Ah, it may be because im using Volumio 3, not Volumio 2. Looks like its built on Buster, and breaks a heap of dependencies in the installed packages…

I successfully installed installed Shairport Sync 4.1.1 to use Airplay 2 on Volumio 3 using following steps:

sudo apt update
sudo apt install --no-install-recommends build-essential git autoconf automake libtool \
    libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev \
    libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev xxd

git clone https://github.com/mikebrady/nqptp.git
cd nqptp
autoreconf -fi
./configure --with-systemd-startup
make
sudo make install
sudo systemctl enable nqptp
sudo systemctl start nqptp
cd ..

git clone https://github.com/mikebrady/shairport-sync.git
cd shairport-sync/
git checkout 4.1.1
autoreconf -i -f
./configure --sysconfdir=/etc --with-alsa --with-pa --with-pipe --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd --with-airplay-2
make
sudo make install
sudo systemctl stop shairport-sync
cd ..
mv /usr/bin/shairport-sync /usr/bin/shairport-sync-orig
sudo mv /usr/local/bin/shairport-sync /usr/bin/shairport-sync
sudo systemctl restart shairport-sync
systemctl status shairport-sync

Album art on the external volumio display works just fine.

3 Likes

Stange, fresh install and I get the following error when trying to install the packages. Can’t seem to resolve the issue…

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

libavcodec-dev : Depends: libavcodec58 (= 7:4.1.10-0+deb10u1+rpt1)

libavformat-dev : Depends: libavformat58 (= 7:4.1.10-0+deb10u1+rpt1) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

I get the same thing here on my end had me puzzled all day

Does Airplay 2 allow for high-res streamming to the device? (more than 16 44.1 I mean)

1 Like

Does it? I really need to know too… please someone help. tnx.

Volumio 2 is no longer supported since the arrival of Volumio 3. Volumio 2 did not support Airplay 2.

Anyone have any luck getting Shairport Sync updated to allow Airplay 2? I followed the steps and got the same error as @mvn and @rocco