[alsa-devel] Playback Devices in PREPARED State Throw Off POLLOUT Events?

Clemens Ladisch cladisch at fastmail.net
Fri Apr 13 08:41:48 CEST 2007


Jeff Rush wrote:
> Takashi Iwai wrote:
> > When the playback PCM is in the PREPARED state, it's actually ready
> > for getting data and trigger.  Thus poll() returns POLLOUT.  Its logic
> > is clear.
> 
> Is this the purpose of the "tick" value that can be manipulated by the ALSA 
> API - in that every "tick" the poll() function will return with POLLOUT to 
> check for more data to be sent?

An output device is ready whenever there is some free space in the
device's ring buffer.  poll() checks the amount of free space when it's
called and when interrupts occur, i.e., at period boundaries.

If by "tick" you meant "period", the answer is yes.


HTH
Clemens


More information about the Alsa-devel mailing list