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_KEEPINTVL
andTCP_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.