From 37c2932ff37466fe7a590b9ac47619f24b0b999f Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sun, 21 Jan 2024 22:35:46 +0100 Subject: [PATCH] shairport-sync: update to v4.3.2 - update mbedtls to v2.28.6 - adjust config (daemon_pid_dir is still required, despite it got removed in sample config) --- cross/libdaemon/Makefile | 2 +- cross/libsndfile/Makefile | 3 +- cross/mbedtls/Makefile | 2 +- cross/mbedtls/PLIST | 6 +- cross/mbedtls/digests | 6 +- cross/shairport-sync/Makefile | 3 +- cross/shairport-sync/digests | 6 +- ...o-psabi-unknown-by-older-c-compilers.patch | 7 +- cross/sps-alsa-explore/Makefile | 30 +++++ cross/sps-alsa-explore/PLIST | 1 + cross/sps-alsa-explore/digests | 3 + spk/shairport-sync/Makefile | 10 +- spk/shairport-sync/src/shairport-sync.conf | 116 ++++++++++++++---- 13 files changed, 147 insertions(+), 48 deletions(-) create mode 100644 cross/sps-alsa-explore/Makefile create mode 100644 cross/sps-alsa-explore/PLIST create mode 100644 cross/sps-alsa-explore/digests diff --git a/cross/libdaemon/Makefile b/cross/libdaemon/Makefile index afeb8003b4c..8d6c4b8e4e9 100644 --- a/cross/libdaemon/Makefile +++ b/cross/libdaemon/Makefile @@ -2,7 +2,7 @@ PKG_NAME = libdaemon PKG_VERS = 0.14 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = http://0pointer.de/lennart/projects/$(PKG_NAME) +PKG_DIST_SITE = http://0pointer.de/lennart/projects/libdaemon PKG_DIR = $(PKG_NAME)-$(PKG_VERS) DEPENDS = diff --git a/cross/libsndfile/Makefile b/cross/libsndfile/Makefile index a70e06ef5cd..bbb1009088b 100644 --- a/cross/libsndfile/Makefile +++ b/cross/libsndfile/Makefile @@ -5,7 +5,7 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = http://www.mega-nerd.com/libsndfile/files PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -DEPENDS = +DEPENDS = cross/flac cross/libogg cross/libvorbis HOMEPAGE = http://www.mega-nerd.com/libsndfile/ COMMENT = C library for reading and writing files containing sampled sound. @@ -14,7 +14,6 @@ LICENSE = LGPL GNU_CONFIGURE = 1 CONFIGURE_ARGS = --disable-static -# Avoid warning that _FORTIFY_SOURCE requires compiling with optimization ADDITIONAL_CFLAGS = -O2 include ../../mk/spksrc.cross-cc.mk diff --git a/cross/mbedtls/Makefile b/cross/mbedtls/Makefile index bfeae839a05..3b1be6b4737 100644 --- a/cross/mbedtls/Makefile +++ b/cross/mbedtls/Makefile @@ -1,5 +1,5 @@ PKG_NAME = mbedtls -PKG_VERS = 2.28.4 +PKG_VERS = 2.28.6 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/ARMmbed/mbedtls/archive diff --git a/cross/mbedtls/PLIST b/cross/mbedtls/PLIST index f3dfc7e5b68..28d66470426 100644 --- a/cross/mbedtls/PLIST +++ b/cross/mbedtls/PLIST @@ -1,9 +1,9 @@ lnk:lib/libmbedcrypto.so -lib:lib/libmbedcrypto.so.2.28.4 +lib:lib/libmbedcrypto.so.2.28.6 lnk:lib/libmbedcrypto.so.7 lnk:lib/libmbedtls.so lnk:lib/libmbedtls.so.14 -lib:lib/libmbedtls.so.2.28.4 +lib:lib/libmbedtls.so.2.28.6 lnk:lib/libmbedx509.so lib:lib/libmbedx509.so.1 -lib:lib/libmbedx509.so.2.28.4 +lib:lib/libmbedx509.so.2.28.6 diff --git a/cross/mbedtls/digests b/cross/mbedtls/digests index eb36f6738e6..6adaf444df7 100644 --- a/cross/mbedtls/digests +++ b/cross/mbedtls/digests @@ -1,3 +1,3 @@ -mbedtls-2.28.4.tar.gz SHA1 6fdf9583f64c9944b764bf09dd369044ca8383d6 -mbedtls-2.28.4.tar.gz SHA256 504bd29af6e7f9f3de1f0f7b7e16c73987a4194338681acd72b82383a49d55d5 -mbedtls-2.28.4.tar.gz MD5 5fbc51c611b466530f24cf015eb0e129 +mbedtls-2.28.6.tar.gz SHA1 bcf9e3e1877a8f951b7014fd5178ae041bc1177d +mbedtls-2.28.6.tar.gz SHA256 18cac49f4efef7269d233972bb09c57ace40d992229fa49804e7b10cf0debe43 +mbedtls-2.28.6.tar.gz MD5 220cb91781b69d5b180d4acf3ed8286b diff --git a/cross/shairport-sync/Makefile b/cross/shairport-sync/Makefile index ff374c035dc..2ae81262c8f 100644 --- a/cross/shairport-sync/Makefile +++ b/cross/shairport-sync/Makefile @@ -1,5 +1,5 @@ PKG_NAME = shairport-sync -PKG_VERS = 3.3.9 +PKG_VERS = 4.3.2 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/mikebrady/shairport-sync/archive @@ -25,6 +25,7 @@ CONFIGURE_ARGS += --with-tinysvcmdns CONFIGURE_ARGS += --with-external-mdns CONFIGURE_ARGS += --with-soxr CONFIGURE_ARGS += --with-alsa +CONFIGURE_ARGS += --with-piddir=$(INSTALL_DIR)/var include ../../mk/spksrc.archs.mk ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS) $(ARMv5_ARCHS)),$(ARCH)) diff --git a/cross/shairport-sync/digests b/cross/shairport-sync/digests index e02d858933f..2d09cf8810d 100644 --- a/cross/shairport-sync/digests +++ b/cross/shairport-sync/digests @@ -1,3 +1,3 @@ -shairport-sync-3.3.9.tar.gz SHA1 0c7dde82759059e73c184ce11c035303b9ce31c8 -shairport-sync-3.3.9.tar.gz SHA256 17990cb2620551caa07a1c3b371889e55803071eaada04e958c356547a7e1795 -shairport-sync-3.3.9.tar.gz MD5 ca1fa16eb03f8e0abbb4baf6b1e2c9be +shairport-sync-4.3.2.tar.gz SHA1 4adfc9dc8c3c8c1dfc391df0b919c343170bf89d +shairport-sync-4.3.2.tar.gz SHA256 dfb485c0603398032a00e51f84b874749bbf155b257adda3d270d5989de08bfd +shairport-sync-4.3.2.tar.gz MD5 d3f9d3e1d031e7748a2697037218ece2 diff --git a/cross/shairport-sync/patches/001_remove-Wno-psabi-unknown-by-older-c-compilers.patch b/cross/shairport-sync/patches/001_remove-Wno-psabi-unknown-by-older-c-compilers.patch index cd04a13dabf..12632b4ecab 100644 --- a/cross/shairport-sync/patches/001_remove-Wno-psabi-unknown-by-older-c-compilers.patch +++ b/cross/shairport-sync/patches/001_remove-Wno-psabi-unknown-by-older-c-compilers.patch @@ -1,8 +1,8 @@ # remove flag -Wno-psabi as it is not known by older compilers # ---- Makefile.am.orig 2020-06-30 05:11:35.597469700 +0000 -+++ Makefile.am 2020-06-30 05:13:02.237496785 +0000 -@@ -15,11 +15,11 @@ +--- Makefile.am.orig 2023-10-15 19:42:38.000000000 +0200 ++++ Makefile.am 2024-01-21 12:29:19.170277164 +0100 +@@ -29,11 +29,11 @@ AM_CFLAGS = -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\" else if BUILD_FOR_OPENBSD @@ -16,3 +16,4 @@ + AM_CFLAGS = -fno-common -Wno-multichar -Wall -Wextra -Wno-clobbered -pthread -DSYSCONFDIR=\"$(sysconfdir)\" endif endif + endif diff --git a/cross/sps-alsa-explore/Makefile b/cross/sps-alsa-explore/Makefile new file mode 100644 index 00000000000..d34397d3a04 --- /dev/null +++ b/cross/sps-alsa-explore/Makefile @@ -0,0 +1,30 @@ +PKG_NAME = sps-alsa-explore +PKG_VERS = 1.1 +PKG_EXT = tar.gz +# git hash from February 17th 2023 +PKG_GIT_HASH = defb2ab6ccda8c6bb0506b4c3f0d145ddc0d0bf0 +PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/mikebrady/sps-alsa-explore/archive +PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT) +PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH) + +DEPENDS = cross/alsa-lib + +HOMEPAGE = https://github.com/mikebrady/sps-alsa-explore +COMMENT = A tool to scan ALSA devices for use by Shairport Sync. +LICENSE = GPLv2 + +GNU_CONFIGURE = 1 +PRE_CONFIGURE_TARGET = sps-alsa-explore_pre_configure + +include ../../mk/spksrc.archs.mk +ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH)) +# take clock_gettime from librt +ADDITIONAL_LDFLAGS = -lrt +endif + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: sps-alsa-explore_pre_configure +sps-alsa-explore_pre_configure: + @$(RUN) autoreconf -fi diff --git a/cross/sps-alsa-explore/PLIST b/cross/sps-alsa-explore/PLIST new file mode 100644 index 00000000000..76da978d731 --- /dev/null +++ b/cross/sps-alsa-explore/PLIST @@ -0,0 +1 @@ +bin:bin/sps-alsa-explore diff --git a/cross/sps-alsa-explore/digests b/cross/sps-alsa-explore/digests new file mode 100644 index 00000000000..b00c45276f9 --- /dev/null +++ b/cross/sps-alsa-explore/digests @@ -0,0 +1,3 @@ +sps-alsa-explore-gitdefb2ab6ccda8c6bb0506b4c3f0d145ddc0d0bf0.tar.gz SHA1 20f16965472b9a1d18c1ccd9fa9ec89d05972723 +sps-alsa-explore-gitdefb2ab6ccda8c6bb0506b4c3f0d145ddc0d0bf0.tar.gz SHA256 f67cfc569a34fb5e91b678c42c719fb11fe65f77d4f4180973cf99abd1453e6f +sps-alsa-explore-gitdefb2ab6ccda8c6bb0506b4c3f0d145ddc0d0bf0.tar.gz MD5 5af3d8c410cc49c94f6f91443ac98f98 diff --git a/spk/shairport-sync/Makefile b/spk/shairport-sync/Makefile index edf9a72d3a3..a2f1607bd71 100644 --- a/spk/shairport-sync/Makefile +++ b/spk/shairport-sync/Makefile @@ -1,5 +1,5 @@ SPK_NAME = shairport-sync -SPK_VERS = 3.3.9 +SPK_VERS = 4.3.2 SPK_REV = 3 SPK_ICON = src/shairport-sync.png @@ -8,7 +8,7 @@ DEPENDS = cross/shairport-sync MAINTAINER = SynoCommunity DESCRIPTION = AirPlay audio player. Shairport Sync adds multi-room capability with Audio Synchronisation. Requires USB soundcard or speakers. DISPLAY_NAME = Shairport Sync -CHANGELOG = "1. Update to v3.3.9.
2. Update for DSM 7 compatibility.
3. Fix DSM 6 service installation.
4. Add soxr support.
5. Add convolution filter support except for limitted CPUs." +CHANGELOG = "1. Update to v4.3.2.
2. Update for DSM 7 compatibility.
3. Fix DSM 6 service installation.
4. Add soxr support.
5. Add convolution filter support except for limitted CPUs." HOMEPAGE = https://github.com/mikebrady/shairport-sync LICENSE = Please refer to the individual source files for licenses. @@ -27,6 +27,6 @@ include ../../mk/spksrc.spk.mk .PHONY: shairport_extra_install shairport_extra_install: - install -m 755 -d $(STAGING_DIR)/var - install -m 644 src/alsa.conf $(STAGING_DIR)/share/alsa/alsa.conf - install -m 644 src/shairport-sync.conf $(STAGING_DIR)/var/shairport-sync.conf + @install -m 755 -d $(STAGING_DIR)/var + @install -m 644 src/alsa.conf $(STAGING_DIR)/share/alsa/alsa.conf + @install -m 644 src/shairport-sync.conf $(STAGING_DIR)/var/shairport-sync.conf diff --git a/spk/shairport-sync/src/shairport-sync.conf b/spk/shairport-sync/src/shairport-sync.conf index 19237a370f0..7e8fd9bf78b 100644 --- a/spk/shairport-sync/src/shairport-sync.conf +++ b/spk/shairport-sync/src/shairport-sync.conf @@ -18,11 +18,22 @@ general = // interpolation = "auto"; // aka "stuffing". Default is "auto". Alternatives are "basic" or "soxr". Choose "soxr" only if you have a reasonably fast processor and Shairport Sync has been built with "soxr" support. // output_backend = "alsa"; // Run "shairport-sync -h" to get a list of all output_backends, e.g. "alsa", "pipe", "stdout". The default is the first one. // mdns_backend = "avahi"; // Run "shairport-sync -h" to get a list of all mdns_backends. The default is the first one. - port = 8303; // Listen for service requests on this port - udp_port_base = 8304; // start allocating UDP ports from this port number when needed - udp_port_range = 10; // look for free ports in this number of places, starting at the UDP port base. Allow at least 10, though only three are needed in a steady state. +// interface = "name"; // Use this advanced setting to specify the interface on which Shairport Sync should provide its service. Leave it commented out to get the default, which is to select the interface(s) automatically. + port = 8303; // Listen for service requests on this port. 5000 for AirPlay 1, 7000 for AirPlay 2 + udp_port_base = 8304; // (AirPlay 1 only) start allocating UDP ports from this port number when needed + udp_port_range = 10; // (AirPlay 1 only) look for free ports in this number of places, starting at the UDP port base. Allow at least 10, though only three are needed in a steady state. +// airplay_device_id_offset = 0; // (AirPlay 2 only) add this to the default airplay_device_id calculated from one of the device's MAC address +// airplay_device_id = 0xL; // (AirPlay 2 only) use this as the airplay_device_id e.g. 0xDCA632D4E8F3L -- remember the "L" at the end as it's a 64-bit quantity! +// regtype = ""; // Use this advanced setting to set the service type and transport to be advertised by Zeroconf/Bonjour. Default is "_raop._tcp" for AirPlay 1, "_airplay._tcp" for AirPlay 2. + // drift_tolerance_in_seconds = 0.002; // allow a timing error of this number of seconds of drift away from exact synchronisation before attempting to correct it // resync_threshold_in_seconds = 0.050; // a synchronisation error greater than this number of seconds will cause resynchronisation; 0 disables it +// resync_recovery_time_in_seconds = 0.100; // allow this extra time to recover after a late resync. Increase the value, possibly to 0.5, in a virtual machine. +// playback_mode = "stereo"; // This can be "stereo", "mono", "reverse stereo", "both left" or "both right". Default is "stereo". +// alac_decoder = "hammerton"; // This can be "hammerton" or "apple". This advanced setting allows you to choose +// the original Shairport decoder by David Hammerton or the Apple Lossless Audio Codec (ALAC) decoder written by Apple. +// If you build Shairport Sync with the flag --with-apple-alac, the Apple ALAC decoder will be chosen by default. + // ignore_volume_control = "no"; // set this to "yes" if you want the volume to be at 100% no matter what the source's volume control is set to. // volume_range_db = 60 ; // use this advanced setting to set the range, in dB, you want between the maximum volume and the minimum volume. Range is 30 to 150 dB. Leave it commented out to use mixer's native range. // volume_max_db = 0.0 ; // use this advanced setting, which must have a decimal point in it, to set the maximum volume, in dB, you wish to use. @@ -31,22 +42,45 @@ general = // volume_control_profile = "standard" ; // use this advanced setting to specify how the airplay volume is transferred to the mixer volume. // "standard" makes the volume change more quickly at lower volumes and slower at higher volumes. // "flat" makes the volume change at the same rate at all volumes. -// volume_range_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator. +// "dasl_tapered" is similar to "standard" - it makes the volume change more quickly at lower volumes and slower at higher volumes. +// The intention behind dasl_tapered is that a given percentage change in volume should result in the same percentage change in +// perceived loudness. For instance, doubling the volume level should result in doubling the perceived loudness. +// With the range of AirPlay volume being from -30 to 0, doubling the volume from -22.5 to -15 results in an increase of 10 dB. +// Similarly, doubling the volume from -15 to 0 results in an increase of 10 dB. +// For compatibility with mixers having a restricted attenuation range (e.g. 30 dB), "dasl_tapered" will switch to a flat profile at low AirPlay volumes. + +// volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator. + +// default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed + +// The following settings are for dealing with potentially surprising high ("very loud") volume levels. +// When a new play session starts, it usually requests a suggested volume level from Shairport Sync. This is normally the volume level of the last session. +// This can cause unpleasant surprises if the last session was (a) very loud and (b) a long time ago. +// Thus, the user could be unpleasantly surprised by the volume level of the new session. + +// To deal with this, when the last session volume is "very loud", the following two settings will lower the suggested volume after a period of idleness: + +// high_threshold_airplay_volume = -16.0; // airplay volume greater or equal to this is "very loud" +// high_volume_idle_timeout_in_minutes = 0; // if the current volume is "very loud" and the device is not playing for more than this time, suggest the default volume for new connections instead of the current volume. +// Note 1: This timeout is set to 0 by default to disable this feature. Set it to some positive number, e.g. 180 to activate the feature. +// Note 2: Not all applications use the suggested volume: MacOS Music and Mac OS System Sounds use their own settings. + // run_this_when_volume_is_set = "/full/path/to/application/and/args"; // Run the specified application whenever the volume control is set or changed. // The desired AirPlay volume is appended to the end of the command line – leave a space if you want it treated as an extra argument. -// AirPlay volume goes from 0 to -30 and -144 means "mute". - -// regtype = "_raop._tcp"; // Use this advanced setting to set the service type and transport to be advertised by Zeroconf/Bonjour. Default is "_raop._tcp". -// playback_mode = "stereo"; // This can be "stereo", "mono", "reverse stereo", "both left" or "both right". Default is "stereo". -// alac_decoder = "hammerton"; // This can be "hammerton" or "apple". This advanced setting allows you to choose -// the original Shairport decoder by David Hammerton or the Apple Lossless Audio Codec (ALAC) decoder written by Apple. -// If you build Shairport Sync with the flag --with-apple-alac, the Apple ALAC decoder will be chosen by default. -// interface = "name"; // Use this advanced setting to specify the interface on which Shairport Sync should provide its service. Leave it commented out to get the default, which is to select the interface(s) automatically. +// AirPlay volume goes from 0.0 to -30.0 and -144.0 means "mute". -// audio_backend_latency_offset_in_seconds = 0.0; // Set this offset to compensate for a fixed delay in the audio back end. E.g. if the output device delays by 100 ms, set this to -0.1. -// audio_backend_buffer_desired_length_in_seconds = 0.2; // If set too small, buffer underflow occurs on low-powered machines. Too long and the response time to volume changes becomes annoying. Default is 0.15 seconds in the alsa backend, 0.35 seconds in the pa backend and 1.0 seconds otherwise. +// audio_backend_latency_offset_in_seconds = 0.0; // This is added to the latency requested by the player to delay or advance the output by a fixed amount. +// Use it, for example, to compensate for a fixed delay in the audio back end. +// E.g. if the output device, e.g. a soundbar, takes 100 ms to process audio, set this to -0.1 to deliver the audio +// to the output device 100 ms early, allowing it time to process the audio and output it perfectly in sync. +// audio_backend_buffer_desired_length_in_seconds = 0.2; // If set too small, buffer underflow occurs on low-powered machines. +// Too long and the response time to volume changes becomes annoying. +// Default is 0.2 seconds in the alsa backend, 0.35 seconds in the pa backend and 1.0 seconds otherwise. // audio_backend_buffer_interpolation_threshold_in_seconds = 0.075; // Advanced feature. If the buffer size drops below this, stop using time-consuming interpolation like soxr to avoid dropouts due to underrun. -// audio_backend_silent_lead_in_time = 2.0; // This optional advanced setting, from 0.0 and 4.0 seconds, sets the length of the period of silence that precedes the start of the audio. The default is the latency, usually 2.0 seconds. Values greater than the latency are ignored. Values that are too low will affect initial synchronisation. +// audio_backend_silent_lead_in_time = "auto"; // This optional advanced setting, either "auto" or a positive number, sets the length of the period of silence that precedes the start of the audio. +// The default is "auto" -- the silent lead-in starts as soon as the player starts sending packets. +// Values greater than the latency are ignored. Values that are too low will affect initial synchronisation. + // dbus_service_bus = "system"; // The Shairport Sync dbus interface, if selected at compilation, will appear // as "org.gnome.ShairportSync" on the whichever bus you specify here: "system" (default) or "session". // mpris_service_bus = "system"; // The Shairport Sync mpris interface, if selected at compilation, will appear @@ -54,22 +88,23 @@ general = // resend_control_first_check_time = 0.10; // Use this optional advanced setting to set the wait time in seconds before deciding a packet is missing. // resend_control_check_interval_time = 0.25; // Use this optional advanced setting to set the time in seconds between requests for a missing packet. // resend_control_last_check_time = 0.10; // Use this optional advanced setting to set the latest time, in seconds, by which the last check should be done before the estimated time of a missing packet's transfer to the output buffer. -// +// missing_port_dacp_scan_interval_seconds = 2.0; // Use this optional advanced setting to set the time interval between scans for a DACP port number if no port number has been provided by the player for remote control commands }; // Advanced parameters for controlling how Shairport Sync stays active and how it runs a session sessioncontrol = { daemon_pid_dir = "/var/packages/shairport-sync/var"; -// run_this_before_play_begins = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line -// run_this_after_play_ends = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line - // "active" state starts when play begins and ends when the active_state_timeout has elapsed after play ends, unless another play session starts before the timeout has fully elapsed. // run_this_before_entering_active_state = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line // run_this_after_exiting_active_state = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line // active_state_timeout = 10.0; // wait for this number of seconds after play ends before leaving the active state, unless another play session begins. -// run_this_if_an_unfixable_error_is_detected = "/full/path/to/application and args"; // if a problem occurs that can't be cleared by Shairport Sync itself, hook a program on here to deal with it. An error code-string is passed as the last argument. +// run_this_before_play_begins = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line +// run_this_after_play_ends = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line + +// run_this_if_an_unfixable_error_is_detected = "/full/path/to/application and args"; // if a problem occurs that can't be cleared by Shairport Sync itself, hook a program on here to deal with it. +// An error code-string is passed as the last argument. // Many of these "unfixable" problems are caused by malfunctioning output devices, and sometimes it is necessary to restart the whole device to clear the problem. // You could hook on a program to do this automatically, but beware -- the device may then power off and restart without warning! // wait_for_completion = "no"; // set to "yes" to get Shairport Sync to wait until the "run_this..." applications have terminated before continuing @@ -85,23 +120,38 @@ sessioncontrol = // --with-alsa alsa = { -// output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc. -// mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software. +// output_device = "default"; // the name of the alsa output device. Use "shairport-sync -h" to discover the names of ALSA hardware devices. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc. +// mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. No default. If not specified, no mixer is used and volume in adjusted in software. +// mixer_control_index = 0; // the index of the mixer to use to adjust output volume. Default is 0. The mixer is fully identified by the combination of the mixer_control_name and the mixer_control_index, e.g. "PCM",0 would be such a specification. // mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this. + // output_rate = "auto"; // can be "auto", 44100, 88200, 176400 or 352800, but the device must have the capability. // output_format = "auto"; // can be "auto", "U8", "S8", "S16", "S16_LE", "S16_BE", "S24", "S24_LE", "S24_BE", "S24_3LE", "S24_3BE", "S32", "S32_LE" or "S32_BE" but the device must have the capability. Except where stated using (*LE or *BE), endianness matches that of the processor. -// disable_synchronization = "no"; // Set to "yes" to disable synchronization. Default is "no". + +// disable_synchronization = "no"; // Set to "yes" to disable synchronization. Default is "no" This is really meant for troubleshootingG. + // period_size = ; // Use this optional advanced setting to set the alsa period size near to this value // buffer_size = ; // Use this optional advanced setting to set the alsa buffer size near to this value // use_mmap_if_available = "yes"; // Use this optional advanced setting to control whether MMAP-based output is used to communicate with the DAC. Default is "yes" // use_hardware_mute_if_available = "no"; // Use this optional advanced setting to control whether the hardware in the DAC is used for muting. Default is "no", for compatibility with other audio players. // maximum_stall_time = 0.200; // Use this optional advanced setting to control how long to wait for data to be consumed by the output device before considering it an error. It should never approach 200 ms. // use_precision_timing = "auto"; // Use this optional advanced setting to control how Shairport Sync gathers timing information. When set to "auto", if the output device is a real hardware device, precision timing will be used. Choose "no" for more compatible standard timing, choose "yes" to force the use of precision timing, which may cause problems. + // disable_standby_mode = "never"; // This setting prevents the DAC from entering the standby mode. Some DACs make small "popping" noises when they go in and out of standby mode. Settings can be: "always", "auto" or "never". Default is "never", but only for backwards compatibility. The "auto" setting prevents entry to standby mode while Shairport Sync is in the "active" mode. You can use "yes" instead of "always" and "no" instead of "never". // disable_standby_mode_silence_threshold = 0.040; // Use this optional advanced setting to control how little audio should remain in the output buffer before the disable_standby code should start sending silence to the output device. // disable_standby_mode_silence_scan_interval = 0.004; // Use this optional advanced setting to control how often the amount of audio remaining in the output buffer should be checked. }; +// Parameters for the "pw" PipeWire backend. +// For this section to be operative, Shairport Sync must be built with the following configuration flag: +// --with-pw +pw = +{ +// application_name = "Shairport Sync"; // Set this to the name that should appear in the Sounds "Applications" or "Volume Levels". +// node_name = "Shairport Sync"; // This appears in some PipeWire CLI tool outputs. +// sink_target = ""; // Leave this commented out to get the sink target already chosen by the PipeWire system. +}; + // Parameters for the "sndio" audio back end. All are optional. // For this section to be operative, Shairport Sync must be built with the following configuration flag: // --with-sndio @@ -119,6 +169,8 @@ sndio = // --with-pa pa = { +// server = "host"; // Set this to override the default pulseaudio server that should be used. +// sink = "Sink Name"; // Set this to override the default pulseaudio sink that should be used. (Untested) // application_name = "Shairport Sync"; //Set this to the name that should appear in the Sounds "Applications" tab when Shairport Sync is active. }; @@ -139,12 +191,12 @@ jack = // bufsz = ; // advanced optional setting to set the buffer size to this value }; -// Parameters for the "pipe" audio back end, a back end that directs raw CD-style audio output to a pipe. No interpolation is done. +// Parameters for the "pipe" audio back end, a back end that directs raw CD-format audio output to a pipe. No interpolation is done. // For this section to be operative, Shairport Sync must have been built with the following configuration flag: // --with-pipe pipe = { -// name = "/path/to/pipe"; // there is no default pipe name for the output +// name = "/tmp/shairport-sync-audio"; // this is the default }; // There are no configuration file parameters for the "stdout" audio back end. No interpolation is done. @@ -197,6 +249,9 @@ metadata = // cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; // artwork will be stored in this directory if the dbus or MPRIS interfaces are enabled or if the MQTT client is in use. Set it to "" to prevent caching, which may be useful on some systems // pipe_name = "/tmp/shairport-sync-metadata"; // pipe_timeout = 5000; // wait for this number of milliseconds for a blocked pipe to unblock before giving up +// progress_interval = 0.0; // if non-zero, progress 'phbt' messages will be sent at the interval specified in seconds. A 'phb0' message will also be sent when the first audio frame of a play session is about to be played. +// Each message consists of the RTPtime of a a frame of audio and the exact system time when it is to be played. The system time, in nanoseconds, is based the CLOCK_MONOTONIC_RAW of the machine -- if available -- or CLOCK_MONOTONIC otherwise. +// Messages are sent when the frame is placed in the output device's buffer, thus, they will be _approximately_ 'audio_backend_buffer_desired_length_in_seconds' (default 0.2 seconds) ahead of time. // socket_address = "226.0.0.1"; // if set to a host name or IP address, UDP packets containing metadata will be sent to this address. May be a multicast address. "socket-port" must be non-zero and "enabled" must be set to yes" // socket_port = 5555; // if socket_address is set, the port to send UDP packets to // socket_msglength = 65000; // the maximum packet size for any UDP metadata. This will be clipped to be between 500 or 65000. The default is 500. @@ -205,6 +260,12 @@ metadata = // How to enable the MQTT-metadata/remote-service // For this section to be operative, Shairport Sync must be built with the following configuration flag: // --with-mqtt-client + +// Note that, for compatability with many MQTT brokers and applications, +// every message that has no extra data is given a +// payload consisting of the string "--". +// You can change this or you can enable empty payloads -- see below. + mqtt = { // enabled = "no"; // set this to yes to enable the mqtt-metadata-service @@ -219,8 +280,10 @@ mqtt = // topic = NULL; //MQTT topic where this instance of shairport-sync should publish. If not set, the general.name value is used. // publish_raw = "no"; //whether to publish all available metadata under the codes given in the 'metadata' docs. // publish_parsed = "no"; //whether to publish a small (but useful) subset of metadata under human-understandable topics +// empty_payload_substitute = "--"; // MQTT messages with empty payloads often are invisible or have special significance to MQTT brokers and readers. +// To avoid empty payload problems, the string here is used instead of any empty payload. Set it to the empty string -- "" -- to leave the payload empty. // Currently published topics:artist,album,title,genre,format,songalbum,volume,client_ip, -// Additionally, empty messages at the topics play_start,play_end,play_flush,play_resume are published +// Additionally, messages at the topics play_start,play_end,play_flush,play_resume are published // publish_cover = "no"; //whether to publish the cover over mqtt in binary form. This may lead to a bit of load on the broker // enable_remote = "no"; //whether to remote control via MQTT. RC is available under `topic`/remote. // Available commands are "command", "beginff", "beginrew", "mutetoggle", "nextitem", "previtem", "pause", "playpause", "play", "stop", "playresume", "shuffle_songs", "volumedown", "volumeup" @@ -230,6 +293,7 @@ mqtt = diagnostics = { // disable_resend_requests = "no"; // set this to yes to stop Shairport Sync from requesting the retransmission of missing packets. Default is "no". +// log_output_to = "syslog"; // set this to "syslog" (default), "stderr" or "stdout" or a file or pipe path to specify were all logs, statistics and diagnostic messages are written to. If there's anything wrong with the file spec, output will be to "stderr". // statistics = "no"; // set to "yes" to print statistics in the log // log_verbosity = 0; // "0" means no debug verbosity, "3" is most verbose. // log_show_file_and_line = "yes"; // set this to yes if you want the file and line number of the message source in the log file