Playback pauses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-02-12 at 08:54 +0100, David Henningsson wrote:
> On 02/11/2013 11:03 AM, Dmitri Paduchikh wrote:
> > Hello,
> >
> > When I play a sound using paplay (or aplay with ALSA configured to use
> > PulseAudio) there is a big pause between two successive runs. For
> > example:
> >
> > $ paplay sound1.wav; paplay sound2.wav
> >
> > The pause between these sounds is something about two seconds. I've
> > tried to adjust latency (through --latency-msec=50) but this doesn't
> > seem to change much.
> >
> > Couldn't you explain what is the cause of this pause? Is it possible to
> > eliminate it?
> >
> 
> This is a well-known issue which we discussed briefly at PulseConf. 
> Fixing it is not trivial, unfortunately.
> 
> I did a quick test here; and for me the delay is 250 - 500 ms, which is 
> consistent with the output of pacmd list-sinks:
> 
> 	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
> 
> Is your maximum latency going up to about 2000 ms? What distro are you 
> running?
> 
> There was some effort a while ago to try to increase this to 2000 ms in 
> order to reduce power consumption, and I think we had that in Ubuntu too 
> at some point? I don't know why this is now down to 371 ms, but given 
> that gstreamer has a latency or similar magnitude (200 - 400 ms, IIRC) 
> for media playback anyway, I see little reason to investigate it 
> further. And in addition, it helps a bit against this bug. :-)

In case you didn't know, the maximum hw buffer size for HDA is defined
by this kernel configuration option: CONFIG_SND_HDA_PREALLOC_SIZE. The
default is 64 (kB), which results in 271.52 ms with 2 ch, 16 bit, 44.1
kHz. It is recommended to change this value to e.g. 2048 on systems that
use PulseAudio. Since Debian still doesn't enable PulseAudio by default,
Debian's kernel uses the default value. Perhaps that has propagated to
Ubuntu by accident at some point?

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux