[MPlayer-dev-eng] ALSA issue, r29549 fix seems incomplete

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Dec 2 05:49:36 CET 2009


On Wed, 2009-12-02 at 01:54 +0100, Sylvain Bertrand wrote:
> > alsa-init: got buffersize=65536
> > alsa-init: got period size 1024
> > alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
> 
> alsa-init: got buffersize=216000
> alsa-init: got period size 6000
> alsa: 48000 Hz/6 channels/12 bpf/216000 bytes buffer/Signed 16 bit Little Endian
> 
> When I dump the initial len and the outburst in the play function, I
> get len=65536 (64k) (sometimes 19392) and outburst=72000 (6000*2*6
> which is set in init function).
> Off course, the truncated len is then 0.

So for some reason ALSA gives you a ratio of 3 (216000 / 3 = 72000) even
though MPlayer says it'd prefer a value around 16 (as specified in
alsa_fragcount), and this takes you a bit over the 64 KiB per-call limit
I mentioned after all. Probably the most practical way to fix it is to
just increase the buffer sizes, though perhaps it's better to make them
dynamically allocated instead. I'll look into it later.




More information about the MPlayer-dev-eng mailing list