[pulseaudio-discuss] [PATCH] Change the default fragment size to 5 ms

Raymond Yau superquad.vortex2 at gmail.com
Wed Oct 22 20:05:53 PDT 2014


>
> Of course, this only applies to ALSA devices that can't use tsched, as
> well as to OSS on more exotic platforms.
>
> This is needed for compatibility with Wine games that use DirectSound8
> on distributions such as Arch Linux who don't accept the unofficial
> winepulse patch. The reason is that Wine DirectSound8 emulation requests
> a period of 10 ms and expects it to work for the purposes of timing. And
> in fact, it cannot know (via ALSA API) that it is not going to work!
>
> A known malware-free test application is Foobar2000 version 1.2. Later
> versions no longer use DirectSound.
>
> This issue is not going to be fixed on the Wine side, because the audio
> subsystem in Wine is not really maintained, and the maintainer has
> already privately expressed some negative thoughts about the state of
> the linux audio ecosystem in general.
>
> The correct solution (at least from the "isolate the clients from
> hardware limitations as thoroughly as possible"

It is the hardware limitation affect the low latency,
this mean that pulseaudio have to select the maximum of lowest latency of
all the sinks / sources as default latency

viewpoint) would be to
> consume audio from sink inputs using a timer if the actual sink does not
> provide sufficiently small minreq. In other words, adapt tsched to BATCH
> cards and drop non-tsched. But that's a whole project. So, as a stopgap
> solution for running Wine games on e.g. USB audio (which is a topic that
> pops up regularly on #pulseaudio IRC channel), let's reduce the default
> fragment size to a value suitable for unpatched Wine.
>
> Regarding the value: on my system, for mp3 playback through Foobar2000,
> 8ms fragments work, 9ms fragments result in constant underruns.
>
> Wine wiki recommends 5ms.
>
> On devices that can use tsched, there is no problem.

>
> diff --git a/man/pulse-daemon.conf.5.xml.inb/man/
pulse-daemon.conf.5.xml.in
> index 8bd076d..ff54435 100644
> --- a/man/pulse-daemon.conf.5.xml.in
> +++ b/man/pulse-daemon.conf.5.xml.in
> @@ -463,8 +463,8 @@ USA.
>      </option>
>      <option>
>        <p><opt>default-fragment-size-msec=</opt>The duration of a
> -      single fragment. Defaults to 25ms (i.e. the total buffer is thus
> -      100ms long).</p>
> +      single fragment. Defaults to 5ms (i.e. the total buffer is thus
> +      20ms long).</p>
>      </option>
>

Is it feasible to add an alternative parameter in fragment size since some
soc driver does not support disable period wakep but dma brust sizes
require 8 frames ?

https://bugs.freedesktop.org/show_bug.cgi?id=84585
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20141023/5cd4951c/attachment.html>


More information about the pulseaudio-discuss mailing list