[alsa-devel] Input/output error while playing a file using aplay

Clemens Ladisch cladisch at fastmail.net
Tue Jun 26 09:21:51 CEST 2007

Pharaoh . wrote:
> After rewriting the pointer function

It would really help if you'd show us the code of the version of the
driver that you're currently talking about.

> I am not getting the input/output error but I am getting underruns.
> ...
> ALSA sound/core/pcm_lib.c:167: BUG: stream = 0, pos = 0x1150000, buffer size = 0x4000, period size = 0x800

Here, "pos" is the value returned by your pointer callback.  This value
should have been a frame number somewhere in the buffer, i.e., in the
range 0..0x3fff.  Apparently, the pointer callback doesn't correctly
calculate this value.

Please remove most printk()s, and add some in the pointer callback to
show both the value that you get from the DMA controller, and the value
that this function returns.


More information about the Alsa-devel mailing list