Re: Audio skipping with alsa

From: Con Kolivas
Date: Wed Sep 10 2003 - 10:22:16 EST


On Thu, 11 Sep 2003 00:45, Richard B. Johnson wrote:
> I don't see the driver in linux-2.4.22/drivers/sound, so I can't
> look at it directly, but normally all you have to do is keep
> a FIFO full (not empty) during play. There should not be any
> scheduling issues with sound chips although I am seeing too
> much of that lately. Maybe somebody should look at the driver
> before the scheduler is blamed. Perhaps the driver is not
> designed properly so it assumes the user-mode code can do
> something it can't possibly be expected to do with any
> reliability. For instance, perhaps it's the user-mode's
> responsibility to keep a FIFO full? And, you can never
> guarantee that.

That may be the case, but there is a very clear problem with the vanilla
scheduler that can cause too low priority for audio apps for up to 25 seconds
after starting a new thread (eg new song). In turn they will skip madly when
any higher priority task uses a burst of cpu and repeatedly preempts it (X,
mozilla, the neighbour's dog...). Only the largest buffer audio cards wont
skip with the vanilla scheduler, and _no_ amount of single cpu capability
today is enough to avoid the scheduler based starvation. So while it never
hurts to keep an eye on driver performance, the scheduler itself _must_ be
fixed to prevent this happening.

Con

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/