Skip to content

Commit

Permalink
component: draw the state machine flow chart
Browse files Browse the repository at this point in the history
this flow chart diagram only cover the right flow.
if there is no event between two states, that means
you will hit the error flow during state transfer.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
  • Loading branch information
Wu Zhigang committed Jul 20, 2018
1 parent 1f1c9ed commit d0aa5bf
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions src/include/sof/audio/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,31 @@
*
* States may transform as below:-
*
* 1) i.e. Initialisation to playback and pause/release
* init --> setup --> prepare --> active <-> paused --+
* ^ |
* +-----------------------------+
*
* 2) i.e. Suspend
* -------------
* pause | | stop/xrun
* +-------------| ACTIVITY |---------------+
* | | | | prepare
* | ------------- | +-----------+
* | ^ ^ | | |
* | | | | | |
* v | | v | |
* ------------- | | ------------- |
* | | release | | start | | |
* | PAUSED |-----------+ +-------------| PREPARE |<-------+
* | | | |
* ------------- -------------
* | ^ ^
* | stop/xrun | |
* +--------------------------------------+ |
* | prepare
* ------------- |
* | | |
* ----------->| READY |------------------+
* reset | |
* -------------
*
*
* setup --> suspend --> setup OR
* prepare --> suspend -> prepare OR
* paused --> suspend --> paused
*/

#define COMP_STATE_INIT 0 /* component being initialised */
Expand Down

0 comments on commit d0aa5bf

Please sign in to comment.