[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: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Intel HDA and ALSA audio driver hogging event loop |
Date: |
Fri, 4 Nov 2016 13:01:27 +0000 |
On Fri, Nov 4, 2016 at 12:55 PM, Gerd Hoffmann <address@hidden> wrote:
>> > 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.
Okay, then the ALSA backend needs to be changed. Thanks for explaining.
I probably won't have time to look into this issue.
Stefan