[alsa-devel] start_threshold and stream controls for PCM streams
tiwai at suse.de
Mon Dec 12 15:59:57 CET 2011
At Fri, 9 Dec 2011 11:05:19 +0530,
Nallasellan, Singaravelan wrote:
> Would like to know how start_threshold is expected to be used in
> single_threaded audio player?
> I assume that in blocking implementation, the write call will block
> till the ring buffer becomes empty. Is it right?
Not really. It's not necessarily to be empty. The condition is that
the empty space becomes avail_min or more.
But, this has nothing to do with start_threshold. The start_threshold
is the value to start the stream automatically. When it's 1, the
stream is started immediately when something is written. When it's
buffer_size, the stream is started when all data is filled in the
And, the write-block behavior is irrelevant with start_threshold.
More information about the Alsa-devel