[pulseaudio-discuss] [PATCH] use CLOCK_MONOTONIC_COARSE to reduce the system call
rong deng
dzrongg at gmail.com
Sat Mar 31 05:59:49 PDT 2012
在 2012年3月30日 下午12:48,Arun Raghavan <arun.raghavan at collabora.co.uk>写道:
> Hi,
>
> On Thu, 2012-03-29 at 21:31 +0800, Deng Zhenrong wrote:
> > According to the description below:
> >
> > http://lkml.org/lkml/2009/7/17/258
> >
> > There are two benefits:
> > a) it doesn't need to access the hardware.
> > b) avoid the syscall by using vdso clock_gettime().
> >
> > The cons is the CLOCK_MONOTONIC_COARSE returns the time at the last
> > tick.
>
> As Pierre mentions, we actually _want_ high resolution time sources for
> our uses. We use these timers to predict when the audio buffer will be
> nearing being empty so that we can wake up and fill the buffer again.
> Having a coarse timer for this purpose would mean that we can be woken
> up late, causing the device to underrun and users to hear glitches.
>
>
Maybe I'm testing this patch in an idle state, so there's no underrun seen,
I'll take that into account. Thanks for your clarification here. It helps
me understand pulseaudio better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20120331/5ebfe277/attachment.htm>
More information about the pulseaudio-discuss
mailing list