[alsa-devel] Question on wait_for_avail function

gsantosh at codeaurora.org gsantosh at codeaurora.org
Wed Jun 5 10:28:14 CEST 2013


Hi Liam,

Consider an use case
1) Write is blocked as there is no space to write the data,
after the return from snd_pcm_playback_avail()function in wait_for_avail
2) HAL issues pause in parallel to the write
I see that the following function snd_pcm_post_pause unblock the write
		wake_up(&runtime->sleep);
		wake_up(&runtime->tsleep);
But i do not see any case handling for the pause state in the
wait_for_avail function, it is not coming out of the for loop as there
will not be any change in the buffer states.

Please explain what is the intention behind the wake in pause callback.

Want to understand why there is no handling of pause in wait_for_avail
function.

and also is there any restriction from ALSA framework that we should not
issue pause while write is blocked or going on.

Regards,
Santosh M G.



More information about the Alsa-devel mailing list