package/shairport-sync: Add support for AirPlay2
cover package/shairport-sync: Add support for AirPlay2
These patches add support for streaming audio with the AirPlay2 protocol to shairport-sync. Configuring AirPlay2 support is optional since it adds several other requirements such as ffmpeg, which may be too heavy for some systems that only want to stream AirPlay1 music.
It also requires the nqptp helper package that provides not-quite-PTP time synchronization for multi-zone audio.
Trammell Hudson (2):
package/nqptp: Add version 1.2.4 package/shairport-sync: Add support for AirPlay2
package/Config.in | 1 + package/nqptp/Config.in | 6 +++++ package/nqptp/S90nqptp | 24 ++++++++++++++++++ package/nqptp/nqptp.hash | 3 +++ package/nqptp/nqptp.mk | 31 ++++++++++++++++++++++++ package/shairport-sync/Config.in | 15 ++++++++++++ package/shairport-sync/shairport-sync.mk | 5 ++++ 7 files changed, 85 insertions(+) create mode 100644 package/nqptp/Config.in create mode 100644 package/nqptp/S90nqptp create mode 100644 package/nqptp/nqptp.hash create mode 100644 package/nqptp/nqptp.mk
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/2 package/nqptp: Add version 1.2.4
This is the Not Quite PTP timing library necessary for AirPlay2 support with shairport-sync.
--- package/Config.in | 1 + package/nqptp/Config.in | 6 ++++++ package/nqptp/S90nqptp | 24 ++++++++++++++++++++++++ package/nqptp/nqptp.hash | 3 +++ package/nqptp/nqptp.mk | 31 +++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+) create mode 100644 package/nqptp/Config.in create mode 100644 package/nqptp/S90nqptp create mode 100644 package/nqptp/nqptp.hash create mode 100644 package/nqptp/nqptp.mk
package/Config.in +1 -0
@@ -2603,6 +2603,7 @@ endif source "package/nload/Config.in" source "package/nmap/Config.in" source "package/noip/Config.in" + source "package/nqptp/Config.in" source "package/ntp/Config.in" source "package/ntpsec/Config.in" source "package/nuttcp/Config.in"
package/nqptp/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_NQPTP + bool "NQPTP" + help + Not Quite PTP for shairport-sync AirPlay 2 support. + https://github.com/mikebrady/shairport-sync +
package/nqptp/S90nqptp new file +24 -0
@@ -0,0 +1,24 @@ +#! /bin/sh + +case "$1" in + start) + printf "Starting nqptp: " + start-stop-daemon -S -q -b --exec /usr/bin/nqptp + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping shairport-sync: " + start-stop-daemon -K -q --exec /usr/bin/nqptp \ + -p /var/run/nqptp/nqptp.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac
package/nqptp/nqptp.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1df1d5edd5b713010d6495b3abca4c1cf4ad8fa6029df0abeb9e4de8e0eb707a nqptp-1.2.4.tar.gz +sha256 1daaa904985807b7f9f2fa91f6b19f3faadf8df4e813f7451a691f89a6965e3f LICENSES
package/nqptp/nqptp.mk new file +31 -0
@@ -0,0 +1,31 @@ +################################################################################ +# +# nqptp +# +################################################################################ + +NQPTP_VERSION = 1.2.4 +NQPTP_SITE = $(call github,mikebrady,nqptp,$(NQPTP_VERSION)) + +NQPTP_LICENSE = MIT, BSD-3-Clause +NQPTP_LICENSE_FILES = LICENSES +NQPTP_DEPENDENCIES = libconfig host-pkgconf + +# git clone, no configure +NQPTP_AUTORECONF = YES + +NQPTP_CONF_OPTS = + +#NQPTP_CONF_ENV += LIBS="$(NQPTP_CONF_LIBS)" + +define NQPTP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nqptp \ + $(TARGET_DIR)/usr/bin/nqptp +endef + +define NQPTP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/nqptp/S90nqptp \ + $(TARGET_DIR)/etc/init.d/S90nqptp +endef + +$(eval $(autotools-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/shairport-sync: Add support for AirPlay2
This patch adds the dependencies necessary to enable the newer version of shairplay-sync support for the AirPlay2 protocol.
--- package/shairport-sync/Config.in | 15 +++++++++++++++ package/shairport-sync/shairport-sync.mk | 5 +++++ 2 files changed, 20 insertions(+)
package/shairport-sync/Config.in +15 -0
@@ -26,6 +26,21 @@ config BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION help Enable audio DSP convolution support. +config BR2_PACKAGE_SHAIRPORT_SYNC_AIRPLAY2 + bool "AirPlay2 support" + select BR2_PACKAGE_NQPTP + select BR2_PACKAGE_LIBPLIST + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_GPL + select BR2_PACKAGE_FFMPEG_NONFREE + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Enable support for the more modern AirPlay2 protocol. + This will also require ffmpeg and many other libraries. + config BR2_PACKAGE_SHAIRPORT_SYNC_DBUS bool "dbus support" depends on BR2_USE_WCHAR # libglib2
package/shairport-sync/shairport-sync.mk +5 -0
@@ -53,6 +53,11 @@ else SHAIRPORT_SYNC_CONF_OPTS += --without-convolution endif +ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_AIRPLAY2),y) +SHAIRPORT_SYNC_DEPENDENCIES += libplist libsodium libgcrypt ffmpeg util-linux +SHAIRPORT_SYNC_CONF_OPTS += --with-airplay-2 +endif + ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_DBUS),y) SHAIRPORT_SYNC_DEPENDENCIES += libglib2 SHAIRPORT_SYNC_CONF_OPTS += --with-dbus-interface --with-mpris-interface
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Trammell,
Thanks for your patch, which I have applied, after doing some tweaks. See below.
package/shairport-sync/Config.in config BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION · line 31
Quoted 11 lines · On Sat, 25 Oct 2025 13:06:10 -0600 Trammell Hudson via buildroot…
package/shairport-sync/Config.in +3
-0@@ -26,6 +26,21 @@ config BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION help Enable audio DSP convolution support. +config BR2_PACKAGE_SHAIRPORT_SYNC_AIRPLAY2 + bool "AirPlay2 support" + select BR2_PACKAGE_NQPTP
Added an indication in a comment that this is a runtime dependency (as opposed to a build time dependency).
package/shairport-sync/Config.in config BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION · line 37
Quoted 6 lines
package/shairport-sync/Config.in +6
-0+ select BR2_PACKAGE_LIBPLIST + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_GPL + select BR2_PACKAGE_FFMPEG_NONFREE
These two were not needed according to my testing (BR2_PACKAGE_FFMPEG_GPL BR2_PACKAGE_FFMPEG_NONFREE).
package/shairport-sync/Config.in config BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION · line 39
Quoted 2 lines
package/shairport-sync/Config.in +2
-0+ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_AIRPLAY2),y) +SHAIRPORT_SYNC_DEPENDENCIES += libplist libsodium libgcrypt ffmpeg util-linux
I've added host-vim in this list because the "xxd" tool is needed on the host, and the host-vim package provides it.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 1/2] package/nqptp: Add version 1.2.4
In reply to Trammell Hudson via buildrootHello Trammell,
Sorry for the long delay in taking your contribution into account. I have merged it after a number of changes, see below.
First, I've adjusted the commit title to:
package/nqptp: new package
Quoted 11 lines · On Sat, 25 Oct 2025 13:05:39 -0600 Trammell Hudson via buildroot…
This is the Not Quite PTP timing library necessary for AirPlay2 support with shairport-sync.
Signed-off-by Trammell Hudson <[email protected]>--- package/Config.in | 1 + package/nqptp/Config.in | 6 ++++++ package/nqptp/S90nqptp | 24 ++++++++++++++++++++++++ package/nqptp/nqptp.hash | 3 +++ package/nqptp/nqptp.mk | 31 +++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+)
I've added an entry in the DEVELOPERS file.
package/nqptp/Config.in line 2
Quoted 8 lines
package/nqptp/Config.in new file +2
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_NQPTP + bool "NQPTP"
Changed to:
bool "nqptp"
I've added:
depends on BR2_USE_MMU
as it doesn't build for noMMU platforms.
And also, I've added:
select BR2_PACKAGE_LIBCONFIG
since you have a build-time dependency on it.
package/nqptp/Config.in line 5
Quoted 3 lines
package/nqptp/Config.in new file +3
-0+ help + Not Quite PTP for shairport-sync AirPlay 2 support. + https://github.com/mikebrady/shairport-sync
Changed to:
+ nqptp is a daemon that monitors timing data from PTP clocks + it sees on ports 319 and 320. It maintains records for one + clock, identified by its Clock ID.
+
+ It is a companion application to Shairport Sync and provides
+ timing information for AirPlay 2 operation.
+
+ https://github.com/mikebrady/nqptp
The important bit being that the homepage URL of the project is on a separate line, which our coding style requires.
package/nqptp/S90nqptp line 1
Quoted 8 lines
package/nqptp/Config.in new file +1
-0+package/nqptp/S90nqptp new file +1
-0@@ -0,0 +1,24 @@ +#! /bin/sh
I've fixed this script so that it is modeled after our standard package/busybox/S01syslogd script.
package/nqptp/nqptp.hash line 3
Quoted 9 lines
package/nqptp/nqptp.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1df1d5edd5b713010d6495b3abca4c1cf4ad8fa6029df0abeb9e4de8e0eb707a nqptp-1.2.4.tar.gz +sha256 1daaa904985807b7f9f2fa91f6b19f3faadf8df4e813f7451a691f89a6965e3f LICENSES
LICENSES didn't exist.
Quoted 6 lines
package/nqptp/nqptp.mk new file +0
-0
package/nqptp/nqptp.mk line 9
Quoted 9 lines
package/nqptp/nqptp.mk new file +9
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# nqptp +# +################################################################################ + +NQPTP_VERSION = 1.2.4 +NQPTP_SITE = $(call github,mikebrady,nqptp,$(NQPTP_VERSION)) +
I dropped this empty line.
package/nqptp/nqptp.mk line 10
Quoted 1 line
package/nqptp/nqptp.mk new file +1
-0+NQPTP_LICENSE = MIT, BSD-3-Clause
License is GPL-2.0.
package/nqptp/nqptp.mk line 11
Quoted 1 line
package/nqptp/nqptp.mk new file +1
-0+NQPTP_LICENSE_FILES = LICENSES
The file is LICENSE, not LICENSES.
package/nqptp/nqptp.mk line 17
Quoted 6 lines
package/nqptp/nqptp.mk new file +6
-0+NQPTP_DEPENDENCIES = libconfig host-pkgconf + +# git clone, no configure +NQPTP_AUTORECONF = YES + +NQPTP_CONF_OPTS =
Dropped.
package/nqptp/nqptp.mk line 19
Quoted 1 line
package/nqptp/nqptp.mk new file +1
-0+#NQPTP_CONF_ENV += LIBS="$(NQPTP_CONF_LIBS)"
Dropped.
package/nqptp/nqptp.mk line 31
Quoted 12 lines
package/nqptp/nqptp.mk new file +12
-0+ +define NQPTP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nqptp \ + $(TARGET_DIR)/usr/bin/nqptp +endef + +define NQPTP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/nqptp/S90nqptp \ + $(TARGET_DIR)/etc/init.d/S90nqptp +endef + +$(eval $(autotools-package))
Applied with all those changes. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot