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