[pulseaudio-discuss] [RFC PATCH] alsa-sink: Reduce hardware pointer update syscalls

Raymond Yau superquad.vortex2 at gmail.com
Fri Oct 3 00:44:47 PDT 2014


> >
> > What do mean when you say default-fragments *
> > default-fragment-size-msec?
> >
>
> I suppose PulseAudio uses a ring of `default-fragments` buffers, with a
> length of `default-fragment-size-msec` each. For example, for 4
> fragments of 25 ms,

The commented  values in daemon.conf are not default fragmemts nor
default-fragment-size-msec

when rate is 48000Hz there are 1200 frames in 25ms

But 25 ms is not a valid fragments size msec when rate is 44100Hz since
there are 1102.5 frames

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/linux/dmaengine.h

* @DMA_RESIDUE_GRANULARITY_BURST: Residue is updated after each transferred
burst. This is typically only supported if the hardware has a progress
register of some sort (E.g. a register with the current read/write address
or a register with the amount of bursts/beats/bytes that have been
transferred or still need to be transferred).

Not all sound cards can report dma residue which provide accurate position
up to dma brust size, hwptr increment by dma brust size

As pulseaudio select 200ms buffer and two periods, it cannot provide
latency lower than 100 ms when driver cannot report dma residur ad  hwptr
only increment by one period at one period time interval

It should reject any latency request lower than buffer/period time of  the
default sink cannot provide these low latency or warn user to select a
lower fragment time when default sink have  SNDRV_PCM_INFO_BATCH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20141003/596773c1/attachment.html>


More information about the pulseaudio-discuss mailing list