Commit Graph
338 Commits
Author SHA1 Message Date
Mike Brady 284cb9d3fb Return genuine error codes where available in actual_open_alsa_device. 2018-12-26 10:41:20 +00:00
Mike Brady 70cd4fe81f Further adjustments to the silence thread -- make the sleep time 30 ms, thus if the queue goes below 60 ms of samples, silence will be inserted unless an audio write occurred within the last 30 ms. 2018-12-17 17:11:46 +00:00
Mike Brady 2830cdf712 adjust minimum interval between last audio write and writing silence. 2018-12-17 16:50:36 +00:00
Mike Brady a96d28c4e5 Need to use an untimed play for the silence buffer filler. 2018-12-17 16:44:19 +00:00
Mike Brady cb17fb263a Don't send silence into the alsa device within the scanner's sleep time of the last legitimate write to it. This is to stop the scanner inserting silent frames while the player is flushing fames. 2018-12-17 16:31:03 +00:00
Mike Brady 57e9619e5b Don't add dither if volume control is set to max. 2018-12-17 13:14:40 +00:00
Mike Brady 14e867a66b use dither if using software mixer (i.e. no hardware mixer and not ignoring the volume control) -- fix a mistake in accounting for the ignore_volume_control setting. 2018-12-17 11:30:23 +00:00
Mike Brady 4ba0947ddb Move the keep_dac_busy in to a configuration setting. Always start the keep_dac_busy thread and check if the keep_dac_busy is set. Don't dither is ignore volume control is set. 2018-12-15 15:36:44 +00:00
Mike Brady 7708ee3cdf Bring in the "disable_standby_mode" feature on alsa to stop some DACs making popping noises. Fix dither generation. 2018-12-14 15:28:32 +00:00
Mike Brady 4046c0e73d Fix dither, add dither to silences during lead-in, interpolatied frames and keeping out of standby, only if the output device doesn't use a mixer. Check configuration at initialisation. 2018-12-14 15:07:00 +00:00
Mike Brady 5dd9fbc4fb Don't drop the audio during a flush -- it creates a clunk. 2018-12-13 16:59:18 +00:00
Mike Brady 7cc434e989 Experimentally, add the ability to prevent the DAC making popping noises by feeding it with silence instead of allowing it to stop. 2018-12-13 14:47:52 +00:00
Mike Brady dad5e28208 Stay with the standard delay call for the present time. 2018-12-11 16:25:53 +00:00
Mike Brady 45ce909214 Tidy up some debug messages and warnings, remove old diagnostic codes and settings. 2018-12-11 10:56:36 +00:00
Mike Brady 9d5ff22f2d Connect up the stall response to the external command calling -- add a single argument to the unfixable error call. 2018-12-10 22:28:52 +00:00
Mike Brady 079db2eba8 Set stall threshold to 200 ms. 2018-12-10 12:38:48 +00:00
Mike Brady 46a13dce40 Add stall detection to the alsa subsystem. 2018-12-10 10:50:08 +00:00
Mike Brady ea11547095 add delay to debug output. 2018-12-09 08:58:47 +00:00
Mike Brady 7c42050847 Get timings of play / flush / delay calls. 2018-12-09 08:45:10 +00:00
Mike Brady df61f80607 Time opening of the device 2018-12-08 22:30:34 +00:00
Mike Brady e5452e5172 Make the idle timeout on the RTSP link the same as the overall timeout -- 30 seconds is a bit short. Add checks to the alsa interface timing -- 15 ms to write a packet of frames, 1 ms to ask for the delay. 2018-12-08 14:12:33 +00:00
Mike Brady 50700b46a5 Add timing to writing to the DAC 2018-12-08 12:58:01 +00:00
Mike Brady 53c17276db Continue to use the ordinary snd_pcm_delay call. 2018-12-06 15:39:19 +00:00
Mike Brady 277d401d24 Ensure watchdog always starts with the starting time of the thread. Add watchdog bark count. On the third bark, execute an unfixable error script if present. 2018-12-04 17:25:15 +00:00
Mike Brady 9ddef563ad Shorten the delays to 100 ms 2018-12-04 08:56:29 +00:00
Mike Brady 60315b63c9 Try to ensure that any alsa command sequences are uncancellable. Leave a little time afterwards where possible. 2018-12-03 17:00:12 +00:00
Mike Brady e49707e051 Ensure no pthread cancellation can occur during an ALSA-related call. 2018-12-03 12:44:57 +00:00
Mike Brady 2737222b0b Fix a non-initialisation of parameters if no h/w mixer used. Add a few diagnostics, tidy up initial diagnostic message, add verbosity level and whether mixer used. 2018-12-01 16:52:23 +00:00
Mike Brady 22f3e3e318 Move watchdog to cover connection from start, not just from start of play. Start investigating UDP port allocation. Tidy up handling or RTSP write errors -- remove the pselect code from before a write. 2018-11-28 17:18:03 +00:00
Mike Brady b7ee743a0e Quieten a few debug messages. 2018-11-27 17:44:45 +00:00
Mike Brady eaa98ea7d9 Quieten a few debug messages. 2018-11-27 17:40:07 +00:00
Mike Brady d85f63b4bb Add many improvements, including reliable interruption using new ports, safer pthread_cancel usage. 2018-11-24 22:40:13 +00:00
Mike Brady 3b4654df77 Make some alsa operation sequences un-cancellable. Make some cleanup sequences un-cancellable. 2018-11-24 22:28:52 +00:00
Mike Brady 3709ac8180 experimental 2018-11-23 08:53:27 +00:00
Mike Brady 0e6835589c Try making dropping and closing the DAC un-cancelable to stop the bcm DMA problem. Add some diagnostics. 2018-11-22 21:57:54 +00:00
Mike Brady ccc4fe09af Tidy up the formats. 2018-11-20 22:56:53 +00:00
Mike Brady 0052389d1e Stop noisy mutex unlock 2018-11-19 19:43:17 +00:00
Mike Brady d4435e2068 Try to make the debug stuff pthread_cancel-proof including the debug / warn / inform / die and debug_mutex calls. Tidy up usage of program_stop. 2018-11-19 18:26:03 +00:00
Mike Brady 6ad0b15ec0 Use pthread_cleanup to unlock alsa handle mutex. 2018-11-19 15:35:04 +00:00
Mike Brady e7f70fba32 Tidy up with clang-format 2018-11-08 14:43:52 +00:00
Mike Brady cfd10647aa Make the changes to audio_alsa.c work back to alsa 1.0.28. 2018-11-08 14:39:57 +00:00
Mike Brady 3c00d14d2a Refinements... 2018-11-08 12:48:42 +00:00
Mike Brady d90fec4a8c Prototype working estimated delay. 2018-11-08 12:23:52 +00:00
Mike Brady 1ee63bb2d2 Investigating alternate timing approaches. 2018-11-08 11:25:24 +00:00
Mike Brady cd71b3f727 Enhance error messages to warn if the alsa output device doesn't recover. 2018-10-31 16:33:16 +00:00
Mike Brady 3cb359c747 Tighten up integer promotion checks to calculate large delays properly. Fix input rate calculation restarting. 2018-10-23 10:26:08 +00:00
Mike Brady e0a4e5cde8 Format tidy-up 2018-10-21 17:10:23 +01:00
Mike Brady c2d1da2e5c Generate error messages if there is a problem with getting the delay, and pay attention to it in the player thread. 2018-10-14 15:15:15 +01:00
Mike Brady 1b18f45fac Clang Format Cleanup 2018-09-09 20:43:01 +01:00
Mike Brady 8cabb16f25 Initial very rough attempt at a jackaudio backend. 2018-08-31 12:39:18 +01:00