Jon Smirl wrote:
On Mon, Aug 10, 2009 at 3:40 AM, Clemens Ladischclemens@ladisch.de wrote:
There is no common code for the two substreams. Is your hardware actually capable of starting them at exactly the same time?
Sync start is working. This is in the loop and starts the streams: bcom_enable(s->bcom_task); s is set to two different values in the loop.
But you are calling bcom_enable() twice, once for each stream. The same would happen if you didn't implement sync start and let ALSA handle the linked streams.
Sync start/stop is intended for hardware that can actually start two streams at _exactly_ the same time, by, e.g., writing a value with two bits set to a register.
I'm having problems with the drain error on stop. ALSA sound/core/pcm_native.c:1499: playback drain error (DMA or IRQ trouble?)
ALSA did not get the snd_pcm_period_elapsed() call (or the correct pointer value) for the last samples.
HTH Clemens