qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Intel HDA and ALSA audio driver hogging event loop
Date: Fri, 04 Nov 2016 13:55:43 +0100	[thread overview]
Message-ID: <1478264143.17235.32.camel@redhat.com> (raw)
In-Reply-To: <CAJSP0QVSM2pYR=n_Vcc5b=2+17KeZmmE_3RG_VBdn-B1tp8EZw@mail.gmail.com>

  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

  reply	other threads:[~2016-11-04 12:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  8:40 [Qemu-devel] Intel HDA and ALSA audio driver hogging event loop Stefan Hajnoczi
2016-10-20  9:08 ` P J P
2016-10-20  9:38   ` Stefan Hajnoczi
2016-11-04 10:35 ` Stefan Hajnoczi
2016-11-04 12:55   ` Gerd Hoffmann [this message]
2016-11-04 13:01     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478264143.17235.32.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).