Am 21.08.23 um 08:10 schrieb Manos Pitsidianakis:
Hello Volker,
On Sun, 20 Aug 2023 14:46, Volker Rümelin <vr_q...@t-online.de> wrote:
I tested the virtio-sound-pci device. It seems the device works
unreliably. Audio playback has a lot of dropouts. I can actually hear
my mouse moving around. Audio recording with audacity doesn't work.
Either recording stops with an error or the recorded stream is silent.
I'll see if I can change the code so audio playback works reliably. I
don't think it makes sense to review the current code as it is. I
will of course report any issues I find.
have you been having this bad performance with pulseaudio/pipewire?
Are you using alsa for playback/recording in the guest?
I am asking because this was my setup and I was wondering if it
affected the code I ended up with. For me I had normal playback,
except for a short delay at first (maybe something to do with alsa
buffer lengths, I am not familiar with ALSA much).
If you can share your guest and host setup you used for this I can try
replicating it.
Hi Manos,
on the host I use pipewire. The audio device used for playback and
recording is a Intel HDA device. I also tested recording from the
playback monitor of the HDA device. The important command line arguments
are: ./qemu-system-x86_64 -machine q35 -device
virtio-vga-gl,xres=1280,yres=768,bus=pcie.0 -display
gtk,zoom-to-fit=off,gl=on -machine pcspk-audiodev=audio0 -device
virtio-sound-pci,bus=pcie.0,audiodev=audio0 -audiodev
pipewire,out.frequency=48000,in.frequency=48000,id=audio0
The guest is Linux OpenSUSE 15.5 system. The guest uses PulseAudio. This
means audacity ALSA audio recording was routed through PulseAudio.
Audacity doesn't really start recording but after a few seconds it
reports 'Wait timed out' and 'Error opening sound device. Try changing
the audio host, recording device and the project sample rate'.
When I start QEMU with -audiodev
pipewire,out.mixing-engine=off,in.mixing-engine=off,id=audio0 audacity
only records silence.
For playback I use Rhythmbox or Audacity. If you don't immediately hear
dropouts try activating and deactivating the QEMU gtk window in quick
succession. A slightly increased processor load like moving the mouse
around also increases the dropout rate.
With best regards,
Volker