qemu/audio
BALATON Zoltan f6ccfd5d16 alsaaudio: Set try-poll to false by default
Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to
use an event loop instead of the audio timer. This works most of the
time. But the poll event handler in the ALSA backend has a bug. For
example, if the guest can't provide enough audio frames in time, the
ALSA buffer is only partly full and the event handler will be called
again and again on every iteration of the main loop. This increases
the processor load and the guest has less processor time to provide
new audio frames in time. I have two examples where a guest can't
recover from this situation and the guest seems to hang."

One reproducer I've found is booting MorphOS demo iso on
qemu-system-ppc -machine pegasos2 -audio alsa which should play a
startup sound but instead it freezes. Even when it does not hang it
plays choppy sound. Volker suggested using command line to set
try-poll=off saying: "The try-poll=off arguments are typically
necessary, because the alsa backend has a design issue with
try-poll=on. If the guest can't provide enough audio frames, it's
really unhelpful to ask for new audio frames on every main loop
iteration until the guest can provide enough audio frames. Timer based
playback doesn't have that problem."

But users cannot easily find this option and having a non-working
default is really unhelpful so to make life easier just set it to
false by default which works until the issue with the alsa backend can
be fixed.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[ Marc-André - Updated QAPI and CLI doc ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20250316002046.D066A4E6004@zero.eik.bme.hu>
2025-05-25 15:24:43 +02:00
..
alsaaudio.c alsaaudio: Set try-poll to false by default 2025-05-25 15:24:43 +02:00
audio-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
audio.c audio: add float sample endianness converters 2025-05-25 11:28:28 +02:00
audio.h audio: reintroduce default audio backend for VNC 2023-10-08 21:08:27 +02:00
audio_int.h audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
audio_template.h audio: add float sample endianness converters 2025-05-25 11:28:28 +02:00
audio_win_int.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
audio_win_int.h Windows Waveform Audio driver (no ADC support yet) 2009-10-10 01:18:24 +04:00
coreaudio.m audio: Drop ifdef for macOS versions older than 12.0 2024-07-02 06:58:48 +02:00
dbusaudio.c dbus: add -audio dbus nsamples option 2025-02-03 21:16:07 +04:00
dsound_template.h dsoundaudio: replace GetForegroundWindow() 2021-01-15 11:25:22 +01:00
dsoundaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
jackaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
meson.build meson: remove unnecessary dependency 2024-05-25 13:28:02 +02:00
mixeng.c audio: add float sample endianness converters 2025-05-25 11:28:28 +02:00
mixeng.h audio: add float sample endianness converters 2025-05-25 11:28:28 +02:00
mixeng_template.h audio: fix saturation nonlinearity in clip_* functions 2020-03-16 10:18:07 +01:00
noaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
ossaudio.c audio/ossaudio: Fix compiler warning with -Wshadow 2023-10-06 10:56:54 +02:00
paaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
pwaudio.c audio/pw: Report more accurate error when connecting to PipeWire fails 2024-10-14 17:35:24 +04:00
rate_template.h audio: make the resampling code greedy 2023-03-06 10:30:23 +04:00
sdlaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
sndioaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2023-10-03 10:29:39 +02:00
spiceaudio.c audio: allow returning an error from the driver init 2023-10-03 10:29:39 +02:00
trace-events ui: add more tracing for dbus 2024-07-22 12:47:28 +04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
wavaudio.c audio: don't abort on f32 audio format in wav backend 2023-11-07 14:58:54 +00:00
wavcapture.c monitor: Use getter/setter functions for cur_mon 2020-10-09 07:08:19 +02:00