Commit b1c7649e authored by Max Kellermann's avatar Max Kellermann

output/alsa: non-blocking mode

Use SND_PCM_NONBLOCK, and perform all snd_pcm_writei() calls in the IOThread. Use a lockless queue to copy data from the OutputThread to the IOThread. This rather major change aims to improve MPD's internal latency. All waits are now under MPD's control, instead of blocking inside libasound2. As a side effect, an output's filter is now decoupled from the actual device I/O, which solves a major latency problem with the conversion filter on slow CPUs and small period buffers. See: https://bugs.musicpd.org/view.php?id=3900
parent 853740f1
......@@ -1413,6 +1413,7 @@ libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
if ENABLE_ALSA
liboutput_plugins_a_SOURCES += \
$(ALSA_SOURCES) \
src/output/plugins/AlsaOutputPlugin.cxx \
src/output/plugins/AlsaOutputPlugin.hxx
libmixer_plugins_a_SOURCES += \
......
......@@ -2,6 +2,8 @@ ver 0.21 (not yet released)
* protocol
- "tagtypes" can be used to hide tags
- "find" and "search" can sort
* output
- alsa: non-blocking mode
ver 0.20.5 (not yet released)
* tags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment