[Spice-commits] Changes to 'pulse'
Gerd Hoffmann
kraxel at kemper.freedesktop.org
Wed Nov 10 04:46:04 PST 2010
New branch 'pulse' available with the following commits:
commit c21251936d59153c72b8c9dde8604f9199c578d6
Author: Gerd Hoffmann <kraxel at redhat.com>
Date: Wed Oct 27 12:21:04 2010 +0200
pulseaudio: tweak config
Zap unused divisor field.
Raise the buffer size default.
commit 882ed62a0a33bc2af0802578eb4df383e8306981
Author: Gerd Hoffmann <kraxel at redhat.com>
Date: Wed Oct 27 12:18:29 2010 +0200
pulseaudio: setup buffer attrs
Request reasonable buffer sizes from pulseaudio. Without this
pa_simple_write() can block quite long and lead to dropouts,
especially with guests which use small audio ring buffers.
commit 467d44553dd14cd3b6ea5c87bfdb1297e725f12f
Author: Gerd Hoffmann <kraxel at redhat.com>
Date: Wed Oct 27 12:14:18 2010 +0200
pulseaudio: process 1/4 buffer max at once
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.
More information about the Spice-commits
mailing list