Florian Winter wrote:
> I can't derive from the documentation when exactly my poll() call will
> wake up.

It can wake up whenever the device generates an interrupt, i.e., at
period boundaries.

> Is there a way to tell ALSA something like: "I want to write at
> least N frames to the device without blocking. Please don't wake up my
> poll() call until I can do this" (assuming that N is a meaningful value,
> i.e. less than the total buffer size)?

You can use snd_pcm_sw_params_set_avail_min(), but it won't have any
effect if N is lower then the period size.

> Will the ALSA device always become writeable when N bytes can be
> written, or is the ALSA implementation (driver implementation) free to
> decide when and when not to block?

All drivers behave the same in this regard because waking up is handled
by the ALSA framework.

Please note that you can be waken up when an error occurs before N
frames have become available.


HTH
Clemens

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to