363 Commits
Author SHA1 Message Date
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
Mike Brady d2d35cc758 Quieten speed and size debug message 2021-05-10 09:36:14 +01:00
Mike Brady a68f28ac2b clang format 2021-05-01 14:09:38 +01:00
Mike Brady 3a02b79a62 Update the mdns stuff to work with a string, update audio_alsa rtp.c, rtsp.c and shairport.c to build and work in AirPlay 1 but with AirPlay 2 code in place. Some of it is #defined out. 2021-04-30 09:29:30 +01:00
Mike Brady b9854d3fdc Version 3.3.8 is 3.3.8rc7. 2021-04-26 11:23:13 +01:00
Mike Brady 561a129617 Fix a race condition where the alsa_handle could be checked for null but then set to null before use. The code between the check and the use is now protected. 2021-04-08 13:56:13 +01:00
Mike Brady 6a42c76569 Stop using snd_pcm_status_get_driver_htstamp in the alsa precision timing function. It seems to have changed (?). 2021-03-27 16:12:42 +00:00
Mike Brady fd4c429b5a Be more careful with changing precision. Stop using snd_pcm_status_get_driver_htstamp. 2021-03-27 15:37:29 +00:00
Mike Brady bdc2dca3ec 3.3.7rc0 2020-07-06 17:09:15 +01:00
Mike Brady 54d761ff7d Clean up some of the wording and layout of the configuration file
Clean up and improve the way lead-in sillence is used to give a more accurate sync time to the first packet of audio.
Allow very good sync to occur with 0.3 seconds of lead-in silence.
Improve the use of the buffer offset.
Format some other files.
2020-05-18 16:55:09 +01:00
Mike Brady 67e9b1b6cd partial move to using a nanosecond-based system timer. More to come. 2020-02-24 19:40:44 +00:00
Mike Brady 02224666da Squashed commit of the following:
Don't use strndup as old versions of OpenWrt don't seem to have it
    Update FREEBSD.md
    Fix comparison between old and new metadata strings by checking they have equal lengths as well.
    Remove a redundant definition to prevent use on an uninitialised copy, clean up some of the less-used backends
    Remove some unwanted and unused variable declarations from audio_dummy.c and audio_soundio.c
    Add the -fno-common flag to compilation.
    Treat the "mper" attribute as the 64-bit item that it is rather than a 32-bit item as hithereto. Output it as a hexadecimal number to correspond with the format of the track id obtained from AppleScript
    Make changes to that it compiles under gcc-10 with -fno-common
    Add a SIGCHLD handler to reap zombie processes generated after script invocations where wait_for_completion is set to "no".
    Update and rename CONTRIBUTING.md to REPORTING ISSUES.md
    Add a few more commands and clarify some text.
    Change from talking about a server to talking about a client. Technically, e.g. iTunes is a client of Shairport Sync.
    Store the UserAgent so as to recognise forked-daapd so as to always send a revision_number of 1 when asking for playerstatus of forked-daapd.
    Add or update some of the copyright notices
    Add the ability to set the volume directly to the D-Bus RemoteControl interface and to the MPRIS interface. Both use the recently-discovered ability to set the device_volume.
    Merge in Pieter De Gendt's work on resampling on the jack backend.
    Merge pull request #939 from pdgendt/feature/jack-soxr-resampling
    Add SetAirplayVolume to the D-Bus RemoteControl interface.
    Add SetVolume to the MPRIS interface.
    Hook up the Volume property in the MPRIS interface.
    Modify RemoteCommand in the D-Bus interface to return the HTTP status and response.
    Change the type of airplay_volume from int to double in the metadata hub.
    Add a few sample commands in the D-Bus document.
2020-02-20 21:32:35 +00:00
Mike Brady f771774519 Compiles under gcc-10 with -fno-common 2020-02-13 17:37:41 +00:00
Mike Brady 78c9331c2c Update sample D-Bus commands
Rename D-Bus LoudnessFilterActive property to Loudness and friends
Update sample D-Bus commands
Add D-Bus convolution filter controls -- enable convolution filters to be turned on and off or changed; enable convolution gain to be checked and changed; fix loudness control.
Fix D-Bus loudness switch silencing output. Rename LoudnessFiulterActive to Loudness. Add Convolution, ConvolutionGain and ConvolutionImpulseResponseFile properties to the D-Bus interface.
Bug fix: correct frame size entry for S24 format
2019-11-13 22:04:22 +00:00
Mike Brady aeb46892e0 correct frame size entry for S24 format 2019-11-09 09:35:04 +00:00
Mike Brady 1b4c9b1783 quieten a debug message 2019-09-10 13:10:49 +01:00
Mike Brady e8a92d3c3b ensure alsa mixer is initialised before trying to set volume. Normalise the 'pvol' volume mesasages to the hardware devices' maximum volume when using combined hardware and software attenuation. 2019-09-10 13:03:54 +01:00
Chris Boot b9cf91b2bb More typo fixes across the tree
Previously I have made spelling changes as caught by Debian's lintian
tool, which has a short list of common misspellings that it tests for.
This time I decided to run codespell against the source and fix all the
obvious problems it came up with. It also uses a list of misspellings
but it's much larger than lintian's, but also has some false positives
so I went over the list by hand.

The command I used to do check the source was:
git ls-tree -rz --name-only HEAD | xargs -0 codespell -L minimise,errorstring
2019-07-27 00:05:38 -03:00
Mike Brady a8faacd3fc Expose some of the settings used in the disable_standby_mode.
Specifically, firstly, the disable_standby_mode_silence_threshold, which is the
amount of audio in the output device's hardware buffer. It should normally
be close to the value givein in the audio_backend_buffer_desired_length_in_seconds
setting. If it drops to this value, silence is added to the buffer to prevent
the output device from becoming idle.

Secondly, the disable_standby_mode_silence_scan_interval is the time between checks
of the output device's hardware buffer.

The code for generating frames of possibly-dithered silence has been simplified.
2019-06-20 10:45:27 +01:00
Mike Brady c8b0be30b4 find . \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec clang-format -i -style='{BasedOnStyle: llvm, IndentWidth: 2, ColumnLimit: 100}' '{}' \; 2019-06-19 19:06:54 +01:00
Mike BradyandGitHub 1ca9226242 Update audio_alsa.c 2019-06-17 22:25:47 +01:00
Mike Brady 7013b0cc3d refine the selection of precision timing to be allowed only if the device is a real hardware device 2019-06-17 19:43:23 +01:00
Mike Brady 9199bf24dd fix the detection of the availability of precision timing information -- actuall, renable it 2019-06-17 10:38:20 +01:00
Mike Brady a46c761aa6 make snd_pcm_recover silent when the debug level is 0, not the other way around, duh. 2019-06-17 10:04:23 +01:00
Mike Brady 65abca2562 change the threshold for turning off disable standby mode to more than 40 underruns in the first 100 writes. 2019-06-17 09:47:56 +01:00
Mike Brady cd9982c43b if disable_standby_mode is enabled, disable if if more than 20 underruns occur for 50 silence buffers at the start. 2019-06-17 09:39:04 +01:00
Mike Brady dbea82c212 restore full code for checking for precise timing but stop making it necessary for disable standby mode. 2019-06-17 07:54:04 +01:00
Jörg KrauseandGitHub 854942df92 Debug requested period size value 2019-06-04 20:47:43 +02:00
Mike Brady 3ca3408255 Fix error message for invalid standby mode choice 2019-06-04 15:32:10 +01:00
Mike Brady 4bafe1c982 quieten a compilation warning 2019-06-03 10:03:54 +01:00
Mike Brady 76ad4e6a73 enable specification of specific formats and/or speeds to turn off automatic format/speed selection, fixing a bug. Clarify some of the warnings. Fix a few typos in the configuration file sample. 2019-05-29 16:00:47 +01:00
Mike Brady d9168f4aa7 remove a strncpy truncation warning
update a timing setting in the settings file
list the alsa hardware devices in the -h message
2019-05-17 10:43:54 +01:00
Mike Brady f13f22d857 Fix stupid auto format error. 2019-05-07 12:22:23 +01:00
Mike Brady 83c0405d03 Add automatic bit depth and speed selection for alsa devices. Set rate and format to "auto" by default. Always look for the greatest bit depth, but the lowest multiple of 44,100.
Improve support for big-endian CPUs by adding support for explicit -endian formats, i.e. S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE.

For the "disable_standby_mode" setting, change "while_active" to "auto".
2019-05-07 10:19:04 +01:00
Mike Brady 1d32976d07 Improve support for bigendian devices. Add support for S16_LE, S16_BE, S24_LE, S24_BE, S32_LE and S32_BE formats. Make the default S16_LE. Allow precision timing only on alsa devices with names beginning with "hw:". Use snd_pcm_hw_params_is_monotonic() to see if clock is monotonic. 2019-05-01 11:01:15 +01:00
Mike Brady 449a9be55e make Shairport Sync die for some other serious alsa device errors 2019-04-09 22:37:59 +01:00
Mike Brady 84eecaf722 use abort() to exit after a "die" call and fix the logic of opening the alsa device -- success was causing it to die, duh. 2019-04-09 22:26:26 +01:00
Mike Brady d3072ae827 Give error if alsa output device can't be found. 2019-04-09 11:35:46 +01:00
Mike Brady 986f2fb4bd hook up the alsa "use_precision_timing" option and update the sample conf file. 2019-04-09 11:06:52 +01:00
Mike Brady aac57c9cdc add standard timing -- more compatible -- and precision timing -- more precise. Add option reader but it's not connected up yet. 2019-04-09 10:23:23 +01:00