[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Intel HDA and ALSA audio driver hogging event loop
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] Intel HDA and ALSA audio driver hogging event loop |
Date: |
Fri, 04 Nov 2016 13:55:43 +0100 |
Hi,
> > I think the QEMU ALSA sound driver should not be monitoring the
> > playback file descriptor if the emulated sound card decides it needs
> > to wait for the guest.
I think it should never monitor the file descriptor.
> > Should we add an AUD_plug_out()/AUD_unplug_out() interface to the QEMU
> > audio subsystem so soundcards can suspend file descriptor monitoring?
spiceaudio has a rate control which calculates the number of audio
samples based on time. That works pretty well and I think it is the
best way to handle it. The other audio drivers do the same.
Trying to keep the alsa audio buffers full (by watching the playback
file handle) does not only cause problems in case the guest hasn't
enough audio data to fill them, it also increases the latency in the
audio playback pipeline.
cheers,
Gerd