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
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