Commit ea2ddd25 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Takashi Iwai

ALSA: hda: document state machine for hdac_streams

The code in this library is far from self-explanatory, hopefully this
state diagram reverse-engineered from the code will help others
understand the expected transitions.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220919121041.43463-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2ea13c83
......@@ -13,6 +13,39 @@
#include <sound/hda_register.h>
#include "trace.h"
/*
* the hdac_stream library is intended to be used with the following
* transitions. The states are not formally defined in the code but loosely
* inspired by boolean variables. Note that the 'prepared' field is not used
* in this library but by the callers during the hw_params/prepare transitions
*
* |
* stream_init() |
* v
* +--+-------+
* | unused |
* +--+----+--+
* | ^
* stream_assign() | | stream_release()
* v |
* +--+----+--+
* | opened |
* +--+----+--+
* | ^
* stream_reset() | |
* stream_setup() | | stream_cleanup()
* v |
* +--+----+--+
* | prepared |
* +--+----+--+
* | ^
* stream_start() | | stream_stop()
* v |
* +--+----+--+
* | running |
* +----------+
*/
/**
* snd_hdac_get_stream_stripe_ctl - get stripe control value
* @bus: HD-audio core bus
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment