[alsa-devel] Error with custom driver: playback drain error (DMA or IRQ trouble?)

Stefan Schoenleitner dev.c0debabe at gmail.com
Mon Sep 7 16:25:07 CEST 2009


Hi,

at the moment I'm trying to implement a custom driver which will use SPI
 to transfer the PCM samples to a speech codec chip.

Since I guess that I will also have some problems with getting the SPI
timing right for the speech codec chip, I'm planning to bitbang the data.
For this reason in the driver I'm using non-dma transfers and the
copy/silence callbacks.

However, with my current code the content of the PCM buffer is only
copied a few times.
After that it seems to get stuck followed by the error:
	
	ALSA sound/core/pcm_native.c:1499: playback drain error (DMA or IRQ
trouble?)

The code for the driver is available on pastebin here:
http://pastebin.com/m110336f0

Why do I get the drain error, why does the PCM sample transfer get stuck ?


cheers,
stefan


More information about the Alsa-devel mailing list