Releases: mikebrady/shairport-sync
Version 5: Lossless and Multichannel Audio, Performance Improvements
Shairport Sync Version 5 is a major release and represents a significant advancement in Shairport Sync's capabilities, introducing multi-channel audio support, high-resolution playback, automatic transcoding and comprehensive performance improvements.
(Note: A slightly later release tagged 5.0.0 is essentially identical to this release, 5.0. The extra tag was needed to trigger a Docker image builder CI.)
Important Breaking Changes Notice: Version 5.0 includes many breaking changes from previous versions of Shairport Sync. Please review the documentation carefully before upgrading. A useful guide to Version 5 Configuration File Changes in Version 5 is available here.
New Features
-
Multi-Channel and High-Resolution Audio Support
- 48,000 frames per second ("48k") operation.
- 48k lossless stereo support.
- 5.1 and 7.1 surround sound support.
- Multi-channel and multi-rate operation on
ALSA, PipeWire, PulseAudio, FreeBSD,stdoutand Unixpipeoutput backends.
-
Automatic Audio Format Selection
- Flexible and controllable output format selection.
- Automatic rate, sample format, and channel count selection.
-
Full FFmpeg Integration
- Support for transcoding.
- Advanced resampling capabilities.
- New audio format support.
-
Enhanced Resampling
- New
vernierresampling and interpolation method optimized for low-power CPUs. - Better performance on resource-constrained devices.
- New
-
Convolution and Loudness Enhancements
- Convolution system is now multithreaded and works on stereo and multichannel audio at 48k and 44.1k.
- Multiple impulse response (IR) files can now be provided via
convolution_ir_filessetting. - New
convolution_thread_pool_sizesetting for multithreaded processing (defaults to 1). - Loudness processing now works with stereo and multichannel audio at 48k and 44.1k.
- Updated to the most recent HiFi-LoFi FFT convolver.
-
MQTT Enhancements
- Added new
publish_retainboolean option. When enabled, published MQTT messages have theretainflag set, so the MQTT broker stores the last message per topic and new subscribers receive the most recent value immediately. Thanks to lululombard for PR #2142.
- Added new
-
D-Bus Enhancements
- Added new
dbus_default_message_buscommand-line argument (can besystemorsession) to set the default message bus for both D-Bus native service and MPRIS service.
- Added new
Performance Improvements
- Improved compatibility with AirPlay 2 AutoMix and smart playlists.
- Better operation on low-power devices down to Raspberry Pi B.
- Improved efficiency on embedded systems.
- Enhanced timestamp handling for better synchronization.
- Improved sync error calculation.
- Rebuilt buffered audio processor for cleaner handling of immediate and deferred flush requests.
Docker Enhancements
- Reduced Docker image sizes with slimmed-down
FFmpeglibrary. - Removed
dhclientfrom Docker images for smaller footprint.
Bug Fixes
- Fixed MQTT warning on service startup:
Could not establish a mqtt connection. The startup script now correctly states that themosquittoservice is required. Thanks to Hugo Villeneuve for PR #2137. - Fixed compatibility with
mbedtlslibrary version 3.4+ (present on recent Linux versions). Thanks to Christian Beier for finding and fixing the bug. - Fixed PulseAudio backend so that
PA_ERR_NODATAreturns "No latency data yet". Thanks to Vladimir Shakov for the report and fix. - Ensured old flush requests are deleted when a new play session starts. Thanks to saujanyashah for the report.
- Fixed format warnings on 64-bit and 32-bit systems
- Removed compilation warnings on 32-bit builds
- Improved argument checking for
debug(),inform(),warn()anddie()functions - Fixed "daemon" typos throughout codebase. Thanks to Chris Boot for PR #1981.
- Added warning if a convolution impulse response file cannot be read due to bad path or permissions
Build System Improvements
- Unified service file with variable substitution for Avahi support, making it easier to add future service dependencies. Thanks to Hugo Villeneuve.
- Network interface selection now only considers interfaces that are up, running and not loopback interfaces. Thanks to Carl Johnson for the suggestion.
Configuration File Changes and Deprecations
- New settings:
convolution_ir_files(replacesconvolution_ir_file),convolution_enabled(replacesconvolution),convolution_max_length_in_seconds(replacesconvolution_max_length),loudness_enabled(replacesloudness). - New
convolution_thread_pool_sizesetting (defaults to 1). - Deprecated settings:
convolution_ir_file,convolution,convolution_max_length,loudness. - Corresponding D-Bus methods and properties have been updated.
Deprecation Notice
- The Jack Audio and
soundiobackends are deprecated and will be removed in a future release. Consider using the updated PipeWire backend instead.
Documentation Updates
- Updated BUILD.md with latest build instructions.
- Updated AIRPLAY2.md with feature information.
- Enhanced convolution and loudness documentation.
Maintenance
- Fixed FFmpeg deprecation warnings.
- Bumped
actions/checkoutfrom 6.0.1 to 6.0.2. - Bumped
docker/login-actionfrom 3.6.0 to 3.7.0. - Bumped
docker/build-push-actionfrom 6.13.0 to 6.15.0. - Bumped
docker/setup-qemu-actionfrom 3.4.0 to 3.6.0. - Bumped
docker/setup-buildx-actionfrom 3.9.0 to 3.10.0.
Version 5: Lossless and Multichannel Audio, Performance Improvements
Shairport Sync Version 5 is a major release and represents a significant advancement in Shairport Sync's capabilities, introducing multi-channel audio support, high-resolution playback, automatic transcoding and comprehensive performance improvements.
Important Breaking Changes Notice: Version 5.0 includes many breaking changes from previous versions of Shairport Sync. Please review the documentation carefully before upgrading. A useful guide to Version 5 Configuration File Changes in Version 5 is available here.
New Features
-
Multi-Channel and High-Resolution Audio Support
- 48,000 frames per second ("48k") operation.
- 48k lossless stereo support.
- 5.1 and 7.1 surround sound support.
- Multi-channel and multi-rate operation on
ALSA, PipeWire, PulseAudio, FreeBSD,stdoutand Unixpipeoutput backends.
-
Automatic Audio Format Selection
- Flexible and controllable output format selection.
- Automatic rate, sample format, and channel count selection.
-
Full FFmpeg Integration
- Support for transcoding.
- Advanced resampling capabilities.
- New audio format support.
-
Enhanced Resampling
- New
vernierresampling and interpolation method optimized for low-power CPUs. - Better performance on resource-constrained devices.
- New
-
Convolution and Loudness Enhancements
- Convolution system is now multithreaded and works on stereo and multichannel audio at 48k and 44.1k.
- Multiple impulse response (IR) files can now be provided via
convolution_ir_filessetting. - New
convolution_thread_pool_sizesetting for multithreaded processing (defaults to 1). - Loudness processing now works with stereo and multichannel audio at 48k and 44.1k.
- Updated to the most recent HiFi-LoFi FFT convolver.
-
MQTT Enhancements
- Added new
publish_retainboolean option. When enabled, published MQTT messages have theretainflag set, so the MQTT broker stores the last message per topic and new subscribers receive the most recent value immediately. Thanks to lululombard for PR #2142.
- Added new
-
D-Bus Enhancements
- Added new
dbus_default_message_buscommand-line argument (can besystemorsession) to set the default message bus for both D-Bus native service and MPRIS service.
- Added new
Performance Improvements
- Better operation on low-power devices down to Raspberry Pi B.
- Improved efficiency on embedded systems.
- Enhanced timestamp handling for better synchronization.
- Improved sync error calculation.
- Rebuilt buffered audio processor for cleaner handling of immediate and deferred flush requests.
Docker Enhancements
- Reduced Docker image sizes with slimmed-down
FFmpeglibrary. - Removed
dhclientfrom Docker images for smaller footprint.
Bug Fixes
- Fixed MQTT warning on service startup: "Could not establish a mqtt connection". The startup script now correctly states that the
mosquittoservice is required. Thanks to Hugo Villeneuve for PR #2137. - Fixed compatibility with
mbedtlslibrary version 3.4+ (present on recent Linux versions). Thanks to Christian Beier for finding and fixing the bug. - Fixed PulseAudio backend so that
PA_ERR_NODATAreturns "No latency data yet". Thanks to Vladimir Shakov for the report and fix. - Ensured old flush requests are deleted when a new play session starts. Thanks to saujanyashah for the report.
- Fixed format warnings on 64-bit and 32-bit systems
- Removed compilation warnings on 32-bit builds
- Improved argument checking for
debug(),inform(),warn()anddie()functions - Fixed "daemon" typos throughout codebase. Thanks to Chris Boot for PR #1981.
- Added warning if a convolution impulse response file cannot be read due to bad path or permissions
Build System Improvements
- Unified service file with variable substitution for Avahi support, making it easier to add future service dependencies. Thanks to Hugo Villeneuve.
- Network interface selection now only considers interfaces that are up, running and not loopback interfaces. Thanks to Carl Johnson for the suggestion.
Configuration File Changes and Deprecations
- New settings:
convolution_ir_files(replacesconvolution_ir_file),convolution_enabled(replacesconvolution),convolution_max_length_in_seconds(replacesconvolution_max_length),loudness_enabled(replacesloudness). - New
convolution_thread_pool_sizesetting (defaults to 1). - Deprecated settings:
convolution_ir_file,convolution,convolution_max_length,loudness. - Corresponding D-Bus methods and properties have been updated.
Deprecation Notice
- The Jack Audio and
soundiobackends are deprecated and will be removed in a future release. Consider using the updated PipeWire backend instead.
Documentation Updates
- Updated BUILD.md with latest build instructions.
- Updated AIRPLAY2.md with feature information.
- Enhanced convolution and loudness documentation.
Maintenance
- Fixed FFmpeg deprecation warnings.
- Bumped
actions/checkoutfrom 6.0.1 to 6.0.2. - Bumped
docker/login-actionfrom 3.6.0 to 3.7.0. - Bumped
docker/build-push-actionfrom 6.13.0 to 6.15.0. - Bumped
docker/setup-qemu-actionfrom 3.4.0 to 3.6.0. - Bumped
docker/setup-buildx-actionfrom 3.9.0 to 3.10.0.
Version 4.3.7: Minor Docker-Focussed Updates
This update comprises updates to GitHub Actions used for testing and for building Docker. It also includes a small update to the Docker images: the curl tool is included to facilitate automations.
Thanks to Charles Omer for the GitHub Actions and Docker updates and to ironcrafter54 for the suggestion to include curl.
No other changes have been made relative to the previous release, Version 4.3.6.
Version 4.3.6: MQTT documentation and Docker build improvements and a bug fix
This update contains an MQTT documentation update, Docker build updates and a minor bug fix. It is recommended for all users.
Bug Fix
- Fix a potential bug (no issues reported) by checking that a buffer is not zero before attempting to deallocate it.
Documentation Updates
- Show how to use MQTTThing with Homebridge to represent Shairport Syncβs
activestatus. Thanks to keefar for the PR. - Correct and clarify the statistics documentation.
- Fix a typo in the configuration file. Many thanks to Justin.
Docker Build Optimisation
Improve the Dockerfile build sequences as follows:
- Build each dependency in a separate stage, facilitating parallel builds.
- Define default value for ARGS, permitting easier local docker builds.
- Clone the specified branch only, and to a depth of 1, thus getting relevant data faster.
- Copy files in a one-off command, reducing the amount of Docker layers created.
Many thanks to David GirΓ³n for the PR.
Version 4.3.5: Bug fixes and enhancements
This update contains enhancements and minor bug fixes and is recommended for all users.
Enhancements
- Add Home Assistant MQTT Auto-Discovery and
active/playingState Messages. Thanks to aaronk6 for their considerable work and code -- see this PR. - Send
pvolmetadata on mute, thanks to Tucker Kern. - Ensure the PipeWire backend is initially
inactiveand that it goesactiveat the start of a play session andinactiveat the end. This is to facilitate external activity-monitoring software. Thanks to Nemo157. Note that in AirPlay 2, play often stops momentarily between tracks, and so there will be momentary changes fromactivetoinactiveand back toactiveagain in the PipeWire backend. This may change as the backend improves. - Update comments in the
sndiosection of the sample configuration file.
Docker Enhancements
Bug Fixes
- Update the
sndiobackend (native to OpenBSD, also used in FreeBSD) to deal with an intermittent bug. Specifically, use an explicitis_runningflag to keep track of the playing status of the backend. Thanks to Jan Przybylak, Klemens Nanni and Amanda Stjerna for their help and persistence tracking down this problem. Resolves issue: #1765. - Fix a bug in the Jack Audio backend. If the system's Jack Audio server was running at anything other than 44,100 frames per second, the delay information being returned by the backend was incorrect. Thanks to lucianoiam.
- Fix an incompatibility with the recently-introduced FFmpeg version 7. Thanks to Deyan Dragov.
- Stop advertising the SFTP and SSH services on Bonjour. Thanks to Jean-Philippe Baril.
Deprecations
- The
soundiobackend is deprecated and will be removed in a future update. It seems that nobody is using it, and as it stands it is very inflexible.
Version 4.3.4: Bug fixes and minor enhancements
This update contains enhancements and minor bug fixes and is recommended for all users.
Enhancement -- ALSA: better support for HDMI ports
-
If your device has HDMI ports, the Shairport Sync help command previously listed them with a
hw:prefix, e.g.hw:vc4hdmi0. Unfortunately, if you use ahw:prefix on a HDMI device, the device may not be usable by Shairport Sync. But if you use ahdmi:prefix, e.g.hdmi:vc4hdmi0, it may work: something capable of receiving audio must be connected to the HDMI port and it must be powered on when your device boots up.The enhancement is to update the help text for the ALSA backend to denote HDMI devices using the
hdmi:prefix rather thanhw:. Now, for example, on a Raspberry Pi 4, the output is:Settings and options for the audio backend "alsa": -d output-device set the output device, default is "default". -c mixer-control set the mixer control name, default is to use no mixer. -m mixer-device set the mixer device, default is the output device. -i mixer-index set the mixer index, default is 0. hardware output devices: "hdmi:vc4hdmi0" "hdmi:vc4hdmi1"Previously it was:
Settings and options for the audio backend "alsa": -d output-device set the output device, default is "default". -c mixer-control set the mixer control name, default is to use no mixer. -m mixer-device set the mixer device, default is the output device. -i mixer-index set the mixer index, default is 0. hardware output devices: "hw:vc4hdmi0" "hw:vc4hdmi1"...which is technically correct but unfortunately not very useful.
Get more information about the hardware output devices using sps-alsa-explore, which has also been updated.
Docker Enhancements
- Limit the maximum number of open file handles in Docker images. Thanks to Florian Wallner for Issue #1756, iVolt1 for pointing to a fix and rp86 for the reminder!
- Increase the level of optimisation (to
-O3) while building the Shairport Sync application itself.
Bug Fixes
- Enabled termination of a disconnected session in AirPlay 2 operation after a timeout -- it had been disabled by default.
- Fixed a bug that prevented Shairport Sync from terminating cleanly when a fatal error occurred while directly accessing the alsa output device.
- Fixed a bug that prevented Shairport Sync from recovering cleanly if a player disconnected without warning. The problem was that the player thread would not respond to a cancel request. Fixed by moving a
pthreadtestcancel()call to the innermost loop. Thanks to Tobias Huttinger for the bug report -- Issue #1870. - Fixed compilation errors on old versions of Mac OS X by reordering some of the files to be included in
shairport.c. - Avoided using
TCP_KEEPINTVLandTCP_KEEPCNTif they are not defined (they are not defined in older versions of Mac OS X). Thanks to Sergey Federov for raising these issues and pointing at a potential solution. - Fixed a race condition with the metadata queues. The problem was that the queues were being initialised by threads launched by the main thread which, having started the threads, proceeded to use the queues. But if the threads were late in starting, the queues might not be initialised by the time the main thread tried to use them. Fixed by initialising the queues in the main thread.
Version 4.3.3: Enhancements and Minor Bug Fixes
This update contains enhancements and minor bug fixes and is recommended for all users.
Pesky Changes You Should Not Ignore
-
The
manentry for Shairport Sync has moved from Section 7 (Miscellaneous information) to where it should be: Section 1 (General commands (tools and utilities)).For this reason, before running the
make installstep, please delete the file/usr/local/share/man/man7/shairport-sync.7if it exists -- you will need superuser privileges.FYI, the
manentry will now be placed at/usr/local/share/man/man1/shairport-sync.1at themake installstep.
Thanks to Klemens Nanni.
Bug Fixes
- Use
pthread_rwlock_wrlockinstead ofpthread_rdlock_wrlockwhen tearing down a connection. - Fix some OpenBSD-specific issues. Thanks to Klemens Nanni.
Enhancements
- Add support for the
mbedtls3library. Thanks to orangepizza. - If a network interface is specified in the configuration file, limit addresses used for
PTPto that network interface only. Thanks to Ryan Mounce. - Make Shairport Sync terminate if the configuration file exists but can not be opened. Thanks to Klemens Nanni.
- Start using the
pledge(2)facilities to improve security in OpenBSD: limit the set of system calls Shairport Sync is allowed to make, most importantly, permitfork(2)/execve(2)if and only if user defined commands are run. Thanks to Klemens Nanni.
Docker Enhancements
- Set
S6_KEEP_ENV = 1to enable the passing of environment variables from the docker compose file into the image. Thanks to HNKNTA.
Minor Enhancements
- Use
PKG_CHECK_MODULES, if available, to find theaolib. - Remove some almost-never-used and therefore untested code, and remove a potentially misleading comment from the ALSA backend.
- Look for
DACP-IDandActive-Remotein theGET /inforequest, where it sometimes appears in an AirPlay 2 session originating from an Intel Mac. - Do not print the password in debug logs. Thanks to Klemens Nanni.
- If a string argument is a
NULLin some debug messages, output the string(null). Thanks to Klemens Nanni. - Add a separate
install-config-filesMakefiletarget to selectively enable or disable the installation of configuration files atmake install. Thanks to Zane van Iperen. - Add a configuration option
--without-create-user-groupto optionally disable the creation of theshairport-syncuser and group during amake install. This makes packaging easier for some systems, e.g. Yocto. Thanks to hvilleneuve29. - Implement the idea in Issue 1808 to make Fedora package-building easier. Thanks to Bill Peck.
Documentation Updates
- Update and streamline the CAR INSTALL guide, with updates for Bookworm, which uses
NetworkManagerand does not usedhcpcd. Should also make updating easier. - General updates. Thanks to Ambrose Li and porg.
- Update MQTT documentation. Thanks to Craig Lockwood.
- Updates to documentation regarding OpenBSD. Thanks to Klemens Nanni.
Maintenance
- Update the Classic Mac workflow: use
macos-13, add extraCFLAGsettings toconfigure.acforlibconfig,libpopt,opensslandlibcryptoto enable compilation on macOS without extra flag settings.
PipeWire Backend and Bug Fixes
This update contains a brand new PipeWire backend with full synchronisation -- your feedback is welcome on this. The update also contains a number of bug fixes.
Enhancements
- A totally new PipeWire backend featuring full synchronisation.
Bug Fixes
- Stability improvements for the PulseAudio backend.
- Fix a crash when the Avahi subsystem became disconnected. This is normally a rare occurrence, but Shairport Sync was not dereferencing obsolete data correctly when it happened.
- Set and reset Bonjour flags correctly when it's a Classic Airplay session in AirPlay 2 operation.
- Fix a number of FreeBSD compilation errors and warnings.
- Fix various errors when breaking into an existing session to terminate it. Thanks again to aaronk6.
- Fix some debug message errors, sigh. Thanks to Nathan Gray.
Security Updates, Bug Fixes and Enhancements
This update contains important security updates, bug fixes and enhancements. NQPTP must also be updated, and it should be updated before updating Shairport Sync.
The Shared Memory Interface version of both Shairport Sync and NQPTP is now 10, i.e. smi10.
Notes
- When updating NQPTP on Linux, be sure to remove the old service file as directed in the README.
- Having completed both updates and installations, remember to restart NQPTP first and then restart Shairport Sync.
Security Updates
- A crashing bug in NQPTP has been fixed.
- The communications protocol used between NQPTP and Shairport Sync has been revised and made more resilient to attempted misuse.
- In Linux systems, NQPTP no longer runs as
root-- instead it runs as the restriced usernqptp, with access to ports 319 and 320 set by the installer via thesetcaputility.
Enhancements
-
A new volume control profile called
dasl-taperedhas been added in which halving the volume control setting halves the output level.
For example, moving the volume slider from full to half reduces the output level by 10dB, which roughly corresponds with a perceived halving of the audio volume level.
Moving the volume slider from half to a quarter reduces the output level by a a further 10dB.
The tapering rate is slightly modified at the lower end of the range if the device's attenuation range is restricted (less than about 55dB).To activate the
dasl-taperedprofile, set thevolume_control_profileto"dasl_tapered"in the configuration file and restart Shairport Sync.Many thanks to David Leibovic, aka dasl-, for this.
-
On graceful shutdown, an
active_endsignal should now be generated if the system was in the active state. Addresses issue #1647. Thanks to Tucker Kern for raising the issue.
Bug Fixes
- This release, 4.3.1, fixes a bug in Version 4.3 that prevented Shairport Sync from being added to Home.
- Fixed a bug that causes the Docker image to crash occasionally when OwnTone interrupted an existing iOS session. Thanks to aaronk6 for the report.
- Fixed a cross-compliation error caused by not looking for the correct version of the
artool. The fix was to substitute the correct version during theautoreconfphase. Thanks to sternenseemann for raising the issue and the PR containing the fix. - Updated the mDNS strings for the Classic AirPlay feature of AP2, so that it does not appear to provide MFi authentication. Addresses this discussion.
- Always uses a revision number of 1 when looking for status updates on the DACP remote control port. This follows a suggestion in Issue #1658. Thanks to ejurgensen, as ever, for the report and the suggested fix.
- Fixed a
statisticsbug (the minimum buffer size was incorrectly logged) and also tidy up the statistics logging interval logic for resetting min and max counters. - Added an important missing format string argument to a call in the Jack Audio backend. Many thanks to michieldwitte for their PR.
Maintenance
Security Updates, Bug Fixes and Enhancements
This update contains important security updates, bug fixes and enhancements. NQPTP must also be updated, and it should be updated before updating Shairport Sync.
The Shared Memory Interface version of both Shairport Sync and NQPTP is now 10, i.e. smi10.
Notes
- When updating NQPTP on Linux, be sure to remove the old service file as directed in the README.
- Having completed both updates and installations, remember to restart NQPTP first and then restart Shairport Sync.
Security Updates
- A crashing bug in NQPTP has been fixed.
- The communications protocol used between NQPTP and Shairport Sync has been revised and made more resilient to attempted misuse.
- In Linux systems, NQPTP no longer runs as
root-- instead it runs as the restriced usernqptp, with access to ports 319 and 320 set by the installer via thesetcaputility.
Enhancements
-
A new volume control profile called
dasl-taperedhas been added in which halving the volume control setting halves the output level.
For example, moving the volume slider from full to half reduces the output level by 10dB, which roughly corresponds with a perceived halving of the audio volume level.
Moving the volume slider from half to a quarter reduces the output level by a a further 10dB.
The tapering rate is slightly modified at the lower end of the range if the device's attenuation range is restricted (less than about 55dB).To activate the
dasl-taperedprofile, set thevolume_control_profileto"dasl_tapered"in the configuration file and restart Shairport Sync.Many thanks to David Leibovic, aka dasl-, for this.
-
On graceful shutdown, an
active_endsignal should now be generated if the system was in the active state. Addresses issue #1647. Thanks to Tucker Kern for raising the issue.
Bug Fixes
- Fixed a bug that causes the Docker image to crash occasionally when OwnTone interrupted an existing iOS session. Thanks to aaronk6 for the report.
- Fixed a cross-compliation error caused by not looking for the correct version of the
artool. The fix was to substitute the correct version during theautoreconfphase. Thanks to sternenseemann for raising the issue and the PR containing the fix. - Updated the mDNS strings for the Classic AirPlay feature of AP2, so that it does not appear to provide MFi authentication. Addresses this discussion.
- Always uses a revision number of 1 when looking for status updates on the DACP remote control port. This follows a suggestion in Issue #1658. Thanks to ejurgensen, as ever, for the report and the suggested fix.
- Fixed a
statisticsbug (the minimum buffer size was incorrectly logged) and also tidy up the statistics logging interval logic for resetting min and max counters. - Added an important missing format string argument to a call in the Jack Audio backend. Many thanks to michieldwitte for their PR.
Maintenance