[alsa-devel] linked streams question
linux at audioscience.com
Thu Jul 5 09:53:36 CEST 2007
I'm adding linked stream support to my driver (asihpi), and having some
trouble with the end of playback.
What happens is that the slave streams never transition to SETUP state at the
end of playback.
(Eg playing 4 channel wav file to 2 linked stereo streams with aplay).
The master stream reaches snd_pcm_drain_done() which then causes
trigger(stop), resulting in all linked streams being stopped.
But only the master state is set to SETUP
However, now the slave streams are stopped, period_elapsed() is not called
for a final time to (I assme) cause them to transition to the SETUP state.
Eventually I get "playback drain error (DMA or IRQ trouble?)\n"
My workaround is to set the state of each substream to SETUP in the
trigger-stop operator, but no other driver needs to do this so I think it is
probably the wrong solution - maybe misses some other cleanup code?
Any suggestions on the proper way to handle this?
More information about the Alsa-devel