From c6daef227b2faa3388b5a300269d263ba9cdaad2 Mon Sep 17 00:00:00 2001 From: Will Mortensen Date: Sun, 9 Feb 2025 09:20:16 +0000 Subject: [PATCH] shairport-sync: add drift and ALSA mixer config options Allow setting drift_tolerance_in_seconds, which replaces the now-deprecated drift option. Also allow setting alsa.mixer_control_index, which is necessary to use the hardware mixer correctly on some devices (like the Apple USB-C Headphone Adapter when a headset is plugged in). Signed-off-by: Will Mortensen --- sound/shairport-sync/Makefile | 2 +- sound/shairport-sync/files/shairport-sync.config | 4 +++- sound/shairport-sync/files/shairport-sync.init | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/shairport-sync/Makefile b/sound/shairport-sync/Makefile index 0c227967e..ce9b3f589 100644 --- a/sound/shairport-sync/Makefile +++ b/sound/shairport-sync/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shairport-sync PKG_VERSION:=4.3.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/mikebrady/shairport-sync/tar.gz/$(PKG_VERSION)? diff --git a/sound/shairport-sync/files/shairport-sync.config b/sound/shairport-sync/files/shairport-sync.config index d0bd4fad7..aaa00daa2 100644 --- a/sound/shairport-sync/files/shairport-sync.config +++ b/sound/shairport-sync/files/shairport-sync.config @@ -19,7 +19,8 @@ config shairport-sync 'shairport_sync' option udp_port_base '' # 6001 option udp_port_range '' # 100 option statistics '' # no/yes - DEPRECATED: This option will be removed in a future release. Use 'diagnostics_statistics' instead - option drift '' # 88 + option drift '' # 88 -- DEPRECATED: use 'drift_tolerance_in_seconds' instead + option drift_tolerance_in_seconds '' # 0.002 option resync_threshold '' # 2205 option log_verbosity '' # 0/1/2/3 - DEPRECATED: This option will be removed in a future release. Use 'diagnostics_log_verbosity' instead option ignore_volume_control '' # no/yes @@ -47,6 +48,7 @@ config shairport-sync 'shairport_sync' # ALSA option alsa_output_device '' # default option alsa_mixer_control_name '' # PCM + option alsa_mixer_control_index '' # 0 option alsa_mixer_device '' # default option alsa_latency_offset '' # 0 option alsa_buffer_length '' # 6615 diff --git a/sound/shairport-sync/files/shairport-sync.init b/sound/shairport-sync/files/shairport-sync.init index 6eafcd02d..e03512b38 100644 --- a/sound/shairport-sync/files/shairport-sync.init +++ b/sound/shairport-sync/files/shairport-sync.init @@ -57,6 +57,7 @@ start_instance() { append_num "$cfg" udp_port_base "udp_port_base" append_num "$cfg" udp_port_range "udp_port_range" append_num "$cfg" drift "drift" + append_num "$cfg" drift_tolerance_in_seconds "drift_tolerance_in_seconds" append_num "$cfg" resync_threshold "resync_threshold" append_str "$cfg" ignore_volume_control "ignore_volume_control" append_num "$cfg" volume_range_db "volume_range_db" @@ -95,6 +96,7 @@ start_instance() { printf "{\n" append_str "$cfg" alsa_output_device "output_device" append_str "$cfg" alsa_mixer_control_name "mixer_control_name" + append_num "$cfg" alsa_mixer_control_index "mixer_control_index" append_str "$cfg" alsa_mixer_device "mixer_device" append_num "$cfg" alsa_latency_offset "audio_backend_latency_offset" append_num "$cfg" alsa_buffer_length "audio_backend_buffer_desired_length"