All of lore.kernel.org
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [RESEND PATCH 1/3] pulseaudio: process 1/4 buffer max at once
Date: Tue, 25 Jan 2011 19:57:32 +0300 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.00.1101251957160.1657@linmac> (raw)
In-Reply-To: <1295903266-6458-1-git-send-email-kraxel@redhat.com>

On Mon, 24 Jan 2011, Gerd Hoffmann wrote:

> Limit the size of data pieces processed by the pulseaudio worker
> threads.  Never ever process more than 1/4 of the buffer at once.
> 
> Background: The buffer area currently processed by the pulseaudio thread
> is blocked, i.e. the main thread (or iothread) can't fill in more data
> there.  The buffer processing time is roughly real-time due to the
> pa_simple_write() call blocking when the output queue to the pulse
> server is full.  Thus processing big chunks at once means blocking
> a large part of the buffer for a long time.  This brings high latency
> and can lead to dropouts.
> 
> When processing the buffer in smaller chunks the rpos handling becomes a
> problem though.  The thread reads hw->rpos without knowing whenever
> qpa_run_out has already seen the last (small) chunk processed and
> updated rpos accordingly.  There is no point in reading hw->rpos though,
> pa->rpos can be used instead.  We just need to take care to initialize
> pa->rpos before kicking the thread.
> 
[..snip...]

Thanks, applied.

-- 
mailto:av1474@comtv.ru

      parent reply	other threads:[~2011-01-25 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 21:07 [Qemu-devel] [RESEND PATCH 1/3] pulseaudio: process 1/4 buffer max at once Gerd Hoffmann
2011-01-24 21:07 ` [Qemu-devel] [RESEND PATCH 2/3] pulseaudio: setup buffer attrs Gerd Hoffmann
2011-01-25  9:20   ` Alon Levy
2011-01-25 11:05     ` Gerd Hoffmann
2011-01-24 21:07 ` [Qemu-devel] [RESEND PATCH 3/3] pulseaudio: tweak config Gerd Hoffmann
2011-01-25 16:57 ` malc [this message]

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=alpine.LNX.2.00.1101251957160.1657@linmac \
    --to=av1474@comtv.ru \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.