Preface: I’ve worked around the discrepancy between the Debian and upstream builds by leveraging pbuilder
and tandum with some Debian-specific packaging tools to rebuild the qemu-system-*
packages.
I’ve reproduced the problem! After extracting the generated packages and dependencies:
$ /tmp/usr/bin/qemu-system-x86_64 -audio-help
Environment variable based configuration deprecated.
Please use the new -audiodev option.
Equivalent -audiodev to your current environment variables:
(Since you didn't specify QEMU_AUDIO_DRV, I'll list all possibilities)
-audiodev id=alsa,driver=alsa
-audiodev id=oss,driver=oss
-audiodev id=none,driver=none
Notice the absence of PulseAudio? Let’s dig through the build log:
--audio-drv-list=pa,alsa,oss
This seems to indicate there’s a disconnect between the build config and compilation, so following filtered compiler output:
# PulseAudio trace
cc ... -c -o audio/paaudio.o /build/qemu-5.0/audio/paaudio.c
cc ... -r -o audio/pa.mo audio/paaudio.o # audio/pa.mo is not used again
c++ ... -shared -o audio/pa.so module-common.o audio/paaudio.o
cp audio/pa.so audio-pa.so # audio-pa.so is not used again
for s in block/iscsi.so block/nfs.so block/curl.so block/rbd.so block/gluster.so block/ssh.so audio/pa.so ui/gtk.so ui/spice-app.so; do \
t="/build/qemu-5.0/debian/tmp/usr/lib/x86_64-linux-gnu/qemu/$(echo $s | tr / -)"; \
install -c -m 0644 $s "$t"; \
test -z "" || "$t"; \
done
And sure enough, there it is:
$ ls /usr/local/lib/x86_64-linux-gnu/qemu/audio-pa.so
/usr/local/lib/x86_64-linux-gnu/qemu/audio-pa.so
For reference, here’s the “known-good” ALSA driver:
# ALSA trace
cc ... -c -o audio/alsaaudio.o /build/qemu-5.0/audio/alsaaudio.c
c++ ... audio/alsaaudio.o ... ../libqemuutil.a # this occurs several times, for all the build archs(?)
It’s clear the two are integrated differently, namely dynamically and statically linked for PulseAudio and ALSA respectively. Does this necessarily indicate “incorrect” packaging? Maybe. If there is a way to configure PulseAudio to work “correctly”, why is it different than any of the other audio backends, and why was this not noted in a changelog anywhere?
More to come tomorrow. I’m tired.