[alsa-devel] snd_pcm_drain causes repeated playback of last buffer contents

Sanjeev Chugh sanjuchugh at gmail.com
Wed Mar 12 13:20:34 CET 2014


Hello,



I'm not an alsa expert at all but trying to learn alsa.



I'm experiencing an issue where on snd_pcm_drain() the slave PCM driven via
plugin DSHARE is not filled with silence.

Result is endless playback of buffer content until pcm is closed.



I'm trying to analyze what could be the reason for this. In my
understanding in Alsa, audio data is played as a unit of period. Once
playing one period is finished, then next period will be played. If period
has lesser frames than the period size, audio data previously played will
be re-played until pcm is closed out. Could it be a reason for this
continuous playback when snd_pcm_drain is called ?



I'm not even sure if it is desired behavior that silence be padded after
driver drains the pcm :( I guess it is too big as a bug to be ignored.



Thanks

Pthread


More information about the Alsa-devel mailing list