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

Takashi Iwai tiwai at suse.de
Wed Nov 7 12:28:56 CET 2007

At Tue, 06 Nov 2007 20:14:26 +0300,
Stas Sergeev wrote:
> Hi.
> James Courtier-Dutton wrote:
> > Are any steps being taken to change the design so that sample rate
> > conversion works better?
> Yes, you've seen it, its in my patch. :)
> Seriously though, I think that attitude
> is unfair. I dare to claim that it was
> not some random hack that just happened
> to work. But rather a correct and reliable
> fix.

Sorry but the deep problem of the rate plugin cannot be fixed in that

> > 2) allow the user application to use different buffer/period sizes than
> > the hardware itself.
> That's what the rate plugin already
> allows, it seems.

Not exactly.  The buffer/period sizes of rate plugin is bound to the
ones of its slave.  They cannot be arbitrary values but must be the
converted sizes from the sizes of the slave.  Allowing arbitrary sizes
means the possiblity of wake-up at arbitrary timing, which isn't
implemented right now.

> > 3) Try to encourage applications not to use the pcm_rate plugin at
> > all!!!  Instead force each application to do its own sample rate
> > conversion to match what the hardware can do.
> The applications have nothing to do
> with that plugin I think - it all in
> an alsa config.

ALSA config can disallow it, too, of course.  But, I won't call it a
solution :)


More information about the Alsa-devel mailing list