Commit Graph
352 Commits
Author SHA1 Message Date
Mike Brady b405c0b896 Version 5.0 Major Release.
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, stdout and Unix pipe output 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 vernier resampling and interpolation method optimized for low-power CPUs.
Better performance on resource-constrained devices.

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_files setting.
New convolution_thread_pool_size setting 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_retain boolean option. When enabled, published MQTT messages have the retain flag 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.

D-Bus Enhancements:
Added new dbus_default_message_bus command-line argument (can be system or session) to set the default message bus for both D-Bus native service and MPRIS service.

Performance Improvements:
Enhanced compatibility with AirPlay 2 AutoMix and Smart Tracklists resulting in less unexplained track skipping.
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 FFmpeg library.
Removed dhclient from 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 mosquitto service is required. Thanks to Hugo Villeneuve for PR #2137.
Fixed compatibility with mbedtls library 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_NODATA returns "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() and die() 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 (replaces convolution_ir_file), convolution_enabled (replaces convolution), convolution_max_length_in_seconds (replaces convolution_max_length), loudness_enabled (replaces loudness).
New convolution_thread_pool_size setting (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 soundio backends 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/checkout from 6.0.1 to 6.0.2.
Bumped docker/login-action from 3.6.0 to 3.7.0.
Bumped docker/build-push-action from 6.13.0 to 6.15.0.
Bumped docker/setup-qemu-action from 3.4.0 to 3.6.0.
Bumped docker/setup-buildx-action from 3.9.0 to 3.10.0.
2026-02-13 15:17:40 +00:00
Mike Brady 5f64722a70 Merge branch 'development' of github.com:mikebrady/shairport-sync into development
forgot online update
2024-06-03 09:37:11 +01:00
Mike Brady eaf923614a Give access to mixers in a HDMI device by attaching the mixer to the device's name but replacing the header hdmi: with hw: 2024-06-03 09:36:37 +01:00
Mike Brady 238e4bbfa3 Modify the alsa help to use the hdmi: prefix for the HDMI devices it finds. 2024-06-01 22:08:41 +01:00
Mike Brady c0f5112b8d Remove some almost-never-used and therefore untested code, and remove a potentially misleading comment from the ALSA backend. 2024-04-24 10:31:10 +01:00
Mike Brady b7d9c22de9 format adjustments 2023-09-11 16:01:38 +01:00
Mike Brady b5bb2fef38 Capture where the device was never there (ENOENT), as opposed to when it was there but disappeared (ENODEV). 2022-12-31 17:57:25 +00:00
Mike Brady 76387f8291 Be more careful checking for ENODEV conditions in audio_alsa.c. Still a few places where it is not done... 2022-12-31 17:16:02 +00:00
Mike Brady ae5910e2e7 make the error message one single identifier by linking the error number to the message with an underscore. 2022-12-30 19:31:01 +00:00
Mike Brady d6536a8e79 Call the unfixable error if the output device can't be opened or disappears. Clang-format. 2022-12-30 18:36:33 +00:00
= 0b03f23795 Fix a bug in audio_alsa.c when there is no hardware device name. 2022-11-19 09:05:26 +00:00
Mike Brady 2bc62c7dd9 Close the DAC when the keep_dac_busy flag is changed (by the activity monitor) from true to false. Wait a little longer for the DAC to drop all frames. 2022-09-30 10:18:51 +01:00
Mike Brady fd880056fb Squashed commit of the following:
Add three parameters to the backend play() function call -- (1) a flag indicating whether the samples are timed or not. If timed, (2) the timestamp and (3) the local time at which the first frame should be heard.
    Update missing pipewire library message.
    Makefile.am fix.
    Update the SHM version and fix the SHM name so that it works with FreeBSD.
    Remove redundant (?) AC_HEADER_STDC check.
    Fix compilation and installation under FreeBSD -- changes to allow building in a separate directory broke the FreeBSD build process.
    Add AC_CHECK_LIB for gcrypt in case PKG_CHECK_MODULES fails to find it.
    Find gcrypt using pkg-config
    Add code to detect when the RTSP channel goes idle for a period, and use it to reset clocks and timings, etc. so that SPS resumes correctly where the source has gone to sleep while playing a realtime stream and has subsequently woken up.
    Don't exit if a UDP Clock Control packet is empty. Also check minimum packet size.
    Remove some very experimental code which may cause memory and port leaks.
    Strip file path from the filename used in debug messages, information messages, warnings and fatal error messages.
    BB fix to Makefile.am -- overwriting the DBUS stuff with MPRIS definitions, duh.
    Fix some problems building on FreeBSD and tidy up the use of the "sed" editor.
    Fix some problems building on picore.
    Fix an uninitialised variable
    start using the "nqptp" SMI
2022-09-12 15:19:52 +01:00
Mike Brady 30510e72f1 Remove a very noisy and redundant debug message. 2022-08-16 09:25:53 +01:00
Mike Brady 449e024c95 If the default device is inaccessible with EHOSTDOWN, try hw:0 instead. Works for Fedora 36 Workstation. Might need to make it a bit smarter. 2022-07-22 15:52:16 +01:00
Mike Brady 129343c165 Don't quit if the ALSA output device is or becomes busy and resume when it becomes available again. 2022-07-20 18:04:42 +01:00
Mike Brady 850fda1055 Fix a typo. 2022-05-19 18:07:32 +01:00
Mike Brady 00bc837bef quieten some debug messages. 2022-05-17 17:50:46 +01:00
Mike Brady 3b4a21f002 Quieten some debug messages. Remove some redundant code. 2022-05-17 15:49:01 +01:00
Mike Brady a295c2a291 Improve the logic for supressing clicks when the alsa disable_standby_mode is active. 2022-04-03 10:35:48 +01:00
Mike Brady 8490c4c1c1 Always record frames successfully sent to DAC even if they are less than requested. 2022-03-16 10:19:15 +11:00
Mike Brady a382ac6672 Clang Format 2022-03-14 11:56:43 +11:00
Mike Brady 3d96f79ddc Quieten a few debug messages. 2022-03-11 17:03:49 +11:00
Mike Brady 0b4b4a73fc make close() a separate function and make flush do a close if we don't have to keep the dac active. 2022-03-10 17:41:53 +11:00
Mike Brady 713492a709 Check to see if the alsa_handle is NULL in standard_delay_and_status. Don't see how it could happen though. 2022-03-07 16:23:59 +11:00
Mike Brady 8476e5efac Check to see if the alsa_handle is NULL in precision_delay_and_status. Don't see how it could happen though. 2022-03-07 13:32:16 +11:00
Mike Brady 9bac04e2d7 Check for NULL pointers before deferencing delay and state variable pointers in audio_alsa.c's delay and delay_and_status functions. 2022-03-04 10:02:40 +11:00
Mike Brady 70ef99e924 Add a special-purpose flush routine called sub_flush. It doesn't close the device ever. 2022-02-26 08:33:19 +00:00
Mike Brady 6ced6bc67d Add a "mixer_control_index" setting to the "alsa" part of ther configuration file. A mixer is fully identified by a name and index, duh. Change some debug messages and add an entry to the sample configuration file. 2022-01-21 18:18:13 +01:00
Mike Brady 56bef8e7dd Use CLOCK_MONOLITHIC_RAW to avoid NTP effects, report raw and corrected timing from audio_alsa. Clean up statistics. Stop watchdog timing out AP2 sessions. CLean up some debug messages. 2021-11-28 16:08:48 +00:00
Mike Brady dc5b8f1a11 Clang format 2021-11-26 18:02:23 +00:00
Mike Brady 136071a621 change stats to report non-zero if output has just opened or if there has been any discontinuity in play from previous time. 2021-11-26 15:17:27 +00:00
Mike Brady 14bfba2724 Add code to check divisions and mods for a potrntial divide by zero problem. MAy cause SPS to terminate but leave a log message. 2021-11-21 21:47:32 +00:00
Mike Brady cd9da86fc3 Add a 'stats' function to the audio back ends to replace the 'rate_info' function. Zero all except the alsa back end. 2021-11-20 13:59:16 +00:00
Mike Brady 5f8e6e3989 attempt to increase the precision of the FPS timing 2021-11-20 12:14:23 +00:00
Mike Brady c0a3dacf30 Working to check for divide / mod by 0's 2021-11-17 10:35:21 +00:00
Mike Brady 99c6638573 Ensure the frame rate calculator allows for silent frames added to disable standby. Clean up outmoded and unused stuff in audio_alsa.c. More to do. 2021-11-06 18:32:26 +00:00
Mike Brady 366eb27afc Stop a message from repeating endlessly. 2021-09-09 11:23:25 +01:00
Mike Brady f058d118c1 Quieten a really noise message on verbosity 3. 2021-09-03 15:38:28 +01:00
Mike Brady 6f9c17690f Bring over some updates that were applied to the master branch. 2021-07-22 17:33:31 +01:00
Mike Brady 1ca4ebcf02 Make some more error conditions terminate the program. 2021-06-30 10:13:13 +01:00
Mike Brady f923e99f98 Terminate the program if the specified output device can not be found. 2021-06-30 10:02:46 +01:00
Mike Brady 5c08ccd4d0 Correct the information in a non-available frame rate error message from audio_alsa.c. 2021-06-30 09:49:16 +01:00
Mike Brady 6e24897d4d Correct the information in a non-available frame rate error message from audio_alsa.c. 2021-06-30 09:46:41 +01:00
Mike Brady 0c7d385f35 Keep an eye on DAC underrun recoveries 2021-06-22 14:09:09 +01:00
Mike Brady 0f1118c142 Exit immediately if the speed or format cannot be set. 2021-06-06 15:48:09 +01:00
Mike Brady e4c82b7700 Add some comments and a new debug message about underrun 2021-06-04 09:41:15 +01:00
Mike Brady c5dafbd28b Remember the original anchor information so that if the master clock become equal to it in the future, it can be restored to those exact numbers and eliminate any intervening approximations. Add some diagnostics. 2021-06-01 14:51:17 +01:00
Mike Brady 7df6ff0a55 Exit if the requested output format is not available. 2021-06-01 09:51:14 +01:00
Mike Brady d4ea91aa65 Rough and hacky but works with the bit depth of the output DAC to automatically choose the correct AAC decoding sample size. Allocation of rotating buffers is fixed and profligate. 2021-06-01 08:56:47 +01:00