Skip to content

Releases: mikebrady/shairport-sync

Version 4.3.4: Bug fixes and minor enhancements

06 Jul 11:11
Compare
Choose a tag to compare

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 a hw: prefix on a HDMI device, the device may not be usable by Shairport Sync. But if you use a hdmi: 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 than hw:. 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_KEEPINTVL and TCP_KEEPCNT if 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

29 May 14:22
Compare
Choose a tag to compare

This update contains enhancements and minor bug fixes and is recommended for all users.

Pesky Changes You Should Not Ignore

  • The man entry 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 install step, please delete the file /usr/local/share/man/man7/shairport-sync.7 if it exists -- you will need superuser privileges.

    FYI, the man entry will now be placed at /usr/local/share/man/man1/shairport-sync.1 at the make install step.
    Thanks to Klemens Nanni.

Bug Fixes

  • Use pthread_rwlock_wrlock instead of pthread_rdlock_wrlock when tearing down a connection.
  • Fix some OpenBSD-specific issues. Thanks to Klemens Nanni.

Enhancements

  • Add support for the mbedtls3 library. Thanks to orangepizza.
  • If a network interface is specified in the configuration file, limit addresses used for PTP to 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, permit fork(2)/execve(2) if and only if user defined commands are run. Thanks to Klemens Nanni.

Docker Enhancements

  • Set S6_KEEP_ENV = 1 to 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 the ao lib.
  • Remove some almost-never-used and therefore untested code, and remove a potentially misleading comment from the ALSA backend.
  • Look for DACP-ID and Active-Remote in the GET /info request, 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 NULL in some debug messages, output the string (null). Thanks to Klemens Nanni.
  • Add a separate install-config-files Makefile target to selectively enable or disable the installation of configuration files at make install. Thanks to Zane van Iperen.
  • Add a configuration option --without-create-user-group to optionally disable the creation of the shairport-sync user and group during a make 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 NetworkManager and does not use dhcpcd. 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 extra CFLAG settings to configure.ac for libconfig, libpopt, openssl and libcrypto to enable compilation on macOS without extra flag settings.

PipeWire Backend and Bug Fixes

15 Oct 17:48
Compare
Choose a tag to compare

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

17 Sep 14:28
Compare
Choose a tag to compare

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

  1. When updating NQPTP on Linux, be sure to remove the old service file as directed in the README.
  2. 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 user nqptp, with access to ports 319 and 320 set by the installer via the setcap utility.

Enhancements

  • A new volume control profile called dasl-tapered has 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-tapered profile, set the volume_control_profile to "dasl_tapered" in the configuration file and restart Shairport Sync.

    Many thanks to David Leibovic, aka dasl-, for this.

  • On graceful shutdown, an active_end signal 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 ar tool. The fix was to substitute the correct version during the autoreconf phase. 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 statistics bug (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

  • Stopped using a deprecated FFmpeg data structure reference.
  • Stopped using deprecated OpenSSL calls. Thanks to yubiuser for their PR -- which did some of the updating -- and for their guidance.
  • Run workflow-based tests on PRs automatically. Thanks to yubiuser for their PR.

Security Updates, Bug Fixes and Enhancements

16 Sep 18:12
Compare
Choose a tag to compare

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

  1. When updating NQPTP on Linux, be sure to remove the old service file as directed in the README.
  2. 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 user nqptp, with access to ports 319 and 320 set by the installer via the setcap utility.

Enhancements

  • A new volume control profile called dasl-tapered has 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-tapered profile, set the volume_control_profile to "dasl_tapered" in the configuration file and restart Shairport Sync.

    Many thanks to David Leibovic, aka dasl-, for this.

  • On graceful shutdown, an active_end signal 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 ar tool. The fix was to substitute the correct version during the autoreconf phase. 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 statistics bug (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

  • Stopped using a deprecated FFmpeg data structure reference.
  • Stopped using deprecated OpenSSL calls. Thanks to yubiuser for their PR -- which did some of the updating -- and for their guidance.
  • Run workflow-based tests on PRs automatically. Thanks to yubiuser for their PR.

Important Bug Fixes and Enhancements

21 May 11:58
Compare
Choose a tag to compare

This release consists of enhancements and important bug fixes to Shairport Sync Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the Version 4.1 Release Note.

Important

If you are updating an existing installation of Shairport Sync, you must also update NQPTP. The reason is that this update to Shairport Sync requires NQPTP with Shared Memory Interface Version smi9 and will not work with older versions.

For details of the enhancements and bug fixes in this release, please refer to the RELEASENOTES.

Enhancements and bug fixes

05 Dec 13:26
Compare
Choose a tag to compare

General

This release consists of enhancements and bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please refer to the 4.1 Release Note.

Enhancements

  • Use the TCP keepalive facility to close a play session if the client connection drops for a minute.

Metadata Enhancements

  • Add FramePosition (phbt), FirstFramePosition (phb0), OutputRate (ofps), OutputFormat (ofmt), StreamType (styp), ServiceName (svna), ClientName (snam) properties to the D-Bus interface and to the metadata stream (codes in brackets).
  • FramePosition/FirstFramePosition metadata is generated only if the progress_interval in the metadata section of the configuration file is non-zero. The progress interval can also be set by a new SetFramePositionUpdateInterval method in the D-Bus interface.
  • FramePosition/FirstFramePosition metadata is of the form <RTP Frame number>/<Local Time> where the local time, in nanoseconds (a 64-bit number), is the precise time that frame should be played. The metadata is generated when the frame is placed in the output buffer, and is thus generated audio_backend_buffer_desired_length_in_seconds (usually 0.2 seconds) before the time in question.
  • Add xesam:albumArtist and xesam:composer metadata (if available) to the metadata bundle presented in the D-Bus interface.
  • Add a new metadata item: sps:songdatakind, derived from the asdk metadata token, to the metadata bundle presented in the D-Bus interface. If 0 it seems to indicate an item of a specific duration such as an audio track; if 1 it seems to mean the stream is of unknown duration, for example an internet radio stream.

Docker Enhancements:

  • Launch the shairport-sync app as root user within the Docker container rather than as the user shairport-sync.
  • Add the configuration file and the sample configuration files back into the Docker image.

Bug Fixes

  • Fix a bug that prevented multiple classic AirPlay instances being recognised. The bug was that the 12-digit classic AirPlay service name prefixes for each instance were all identically derived from a MAC hardware address. The fix was to modify the generation of prefixes to depend on the service name as well as the hardware address.
  • Fix a bug that prevented play to the the PulseAudio backend from resuming after a pause. The bug was due to changes in the way pauses were handled and the fix was to reopen the stream if it is closed whenever a play or latency request was made.
  • Fix a long-standing bug which didn't close the socket used for the RTSP connection, potentially exhausting the sockets available.
  • Fix a bug in audio_alsa.c when there is no hardware device name.
  • Add a configuration check for the xxd program when building for AirPlay 2.
  • Fix a compilation bug on certain platforms by trying to use AC_CHECK_LIB to find libavcodec if the PKG_CHECK_MODULES check fails.

Documentation

  • Include and reference the HTML version of the man page.

Really Big Update -- AirPlay 2!

28 Oct 15:38
Compare
Choose a tag to compare

Version 4.1 brings support for AirPlay 2 operation. It works with iOS, iPadOS, macOS, HomePod mini and Apple TV sources, but not with Windows.

Limited support is available for HomeKit – Shairport Sync speakers can be added to the Home app, though not all features are working.

AirPlay 2 operation requires a companion program called NQPTP and requires a somewhat more powerful system. Please see AIRPLAY2.md for more.

Note that you can still build Shairport Sync to support "classic" AirPlay (aka "AirPlay 1") as before.

The various guides for building and updating Shairport Sync have been consolidated into BUILD.md.

Here is a brief initial list of the high-level new features and changes:

  • AirPlay 2 support.
  • Improved libao backend for better compatibility with HomeBrew installations.
  • Improved MQTT and D-Bus facilities.
  • Metadata improvements.
  • Automatically-generated Docker images.

There have been many many bug fixes and enhancements to the core operation of Shairport Sync.

Many thanks to everyone who contributed to Shairport Sync now and in the past.

Really Big Update -- AirPlay 2!

26 Oct 18:58
Compare
Choose a tag to compare
Pre-release

Version 4.1 brings support for AirPlay 2 operation. It works with iOS, iPadOS, macOS, HomePod mini and Apple TV sources, but not with Windows.

Limited support is available for HomeKit -- Shairport Sync speakers can be added to the Home app, though not all features are working.

AirPlay 2 operation requires a companion program called NQPTP and requires a somewhat more powerful system. Please see AIRPLAY2.md for more.

Note that you can still build Shairport Sync to support "classic" AirPlay (aka "AirPlay 1") as before.

The various guides for building and updating Shairport Sync have been consolidated into BUILD.md.

Here is a brief initial list of the high-level new features and changes:

  • AirPlay 2 operation.
  • Improved libao backend for better compatibility with HomeBrew installations.
  • Improved MQTT and D-Bus facilities.
  • Metadata improvements.
  • Automatically-generated Docker images.

There have been many many bug fixes and enhancements to the core operation of Shairport Sync.

Changes

Changes in 4.1-rc1:

  • Bug fixes: close DAC when SPS goes inactive under the "auto" setting.
  • Fix some minor Makefile issues.
  • Documentation: Improved "Events.md" page.

Changes in 4.1-rc2:

  • Bug fixes: Fix a memory allocation crashing bug. Fix two memory leaks.
  • Start using libgcrypt again to avoid a memory leak in libcrypto.
  • Documentation updates.

IMPORTANT -- the libgcrypt library is now needed (again) for building Shairport Sync -- see the BUILD.md guide.

Changes in 4.1-rc3:

  • Bug fix: Fix an elusive crashing bug when a session key is missing from an AirPlay 2 play request.
  • Enhancement: Add a new information/debugging option --displayConfig or -X.
  • Enhancement: Improve debug messaging with libdaemon.
  • Enhancement: Help message update.
  • Enhancement: The xmltoman library is no longer needed.
  • Enhancement: Improve the use of lightweight git tags used by GitHub to tag releases.
  • Documentation: Update man page.
  • Documentation: Add a page on adjusting synchronization to match other speakers.

Changes in 4.1-rc4:

  • Bug fix: Fix a bug that delayed metadata appearing in the D-Bus, MPRIS and MQTT interfaces.
  • Docker: Additional command line arguments to the docker run command are passed to the shairport-sync application on the AirPlay 2 docker image.
  • Docker: Use the s6-overlay system on the Classic docker image.
  • Enhancement: Clean up the generation of Play/Pause/Stop conditions. Add true Pause for AirPlay 2 Buffered streams.
  • Documentation: Some cleanups and updates.

Changes in 4.1-rc5:

  • Docker: start using latest and rolling tags like Ubuntu and use development tags as well.
  • Enhancement: tidy up the --display_config output to skip empty stanzas and to note if there are not active settings whatever.

Automake Building Bug Fix

08 Dec 10:52
Compare
Choose a tag to compare

Version 3.3.9 is a single bug fix release.

Bug Fix

Details