[alsa-devel] underruns and strange code in pcm_rate.c

Takashi Iwai tiwai at suse.de
Thu Nov 8 06:38:44 CET 2007

At Thu, 08 Nov 2007 11:09:57 +0300,
Stas Sergeev wrote:
> Hello.
> Takashi Iwai wrote:
> > I'm concerned much because I cannot reproduce the bug here (underrun)
> > in the practical use even with the same application and driver.
> Have you already tried my asound.conf?
> Also, I use the 22050Hz ogg file for
> testing - maybe that makes some difference,
> so please try the 22050Hz ogg file.
> And I explicitly tell "ogg123 -d alsa09",
> or it will apply to some sound server.

Yeah I've seen the problem, but as I wrote, it's basically because you
use periods=2 and unaligned sample rates.  So, of course, it doesn't

For example, set

	slave.periods 3
	slave.period_size 4096

then you'll hear the improvement, I guess.

> > cannot reproduce the bug practically but only you do.
> No, its not only me. As I already
> said, I've got a positive reply from
> the guy saying that it fixes
> portaudio+espeak. I can also try
> mailing the guy that raised that
> problem here before. But unfortunately
> people prefer to mail privately,
> so you'll have to beleive me on
> the other's feedback.

"You" can be plural :)

> > With a test
> > case, we both will be able to check in detail.  OK?
> OK, but first please try my asound.conf
> with 22050Hz ogg, and maybe that will
> rescue me from writing a test-case which
> won't work on your system most probably
> anyway...

A testcase is always a good thing.  At least, it helps to understand
and spot the problem very much.  This is awfully important.
Sometimes (like this case), more useful than a patch.

If it can be easily reproducible via only apps included in alsa-utils,
then it's fine.  We have the known code logic and can trace the flow.
But, when the thing goes through a different layer and a different
app, it's pretty hard to follow.



More information about the Alsa-devel mailing list