[alsa-devel] How to report error in _pointer function?

Timur Tabi timur at freescale.com
Wed Jul 30 17:56:31 CEST 2008

In my driver, I can detect in the _pointer callback function whether
or not the DMA engine has actually started.  Sometimes, when I have a
programming error, the DMA will not start, so my _pointer function
calculates a crazy value for the current position.  The number it
returns causes ALSA to go haywire (see my post titled, "underrun!!!
(at least 1786051083.613 ms long)".

What is the best way to handle this?  Is there a way I can tell ALSA,
"hey, this is really screwed up, just abort playback and return an
error to the app"?

Timur Tabi
Linux kernel developer at Freescale

More information about the Alsa-devel mailing list