Re: [linux-audio-dev] ALSA Picture

From: Clemens Ladisch <clemens@email-addr-hidden>
Date: Fri Mar 24 2006 - 15:10:11 EET

Richard Spindler wrote:
> on my quest to understand the ALSA API, I created a little Image to
> get an overview about the various states and how they relate to each
> other.
>
> http://propirate.net/oracle/bilder/ALSA.png

Cool, the first complete page of The ALSA Programming Manual!

Now we only need somebody to write the remaining 999 pages ... ;-)

> Hopefully I got everyting right, can you have a look at this image and
> tell me whether this is correct?

snd_pcm_hw_params() goes into the SETUP state and then calls
snd_pcm_prepare(); I don't know how to display this in a picture. :)

You probably want an arrow from snd_pcm_writei() to RUNNING.

The SUSPENDED and XRUN states can happen asynchronously, i.e., the
device can go into them at any time (from some other states), and the
next call to snd_pcm_writei() only reports them. In this regard, they
are similar to the DISCONNECTED state.

XRUN happens not only when an over/underrun occurs but also when some
other error causes the device to stop (this error may be recoverable or
not).

Regards,
Clemens
Received on Fri Mar 24 16:15:04 2006

This archive was generated by hypermail 2.1.8 : Fri Mar 24 2006 - 16:15:04 EET