ASoC: SOF: PM: add state machine to comments

Add Audio DSP state machine with comments. Note that the
'D0<-->runtime D0I3' part is not implemented yet.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191111223343.19986-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Keyon Jie 2019-11-11 16:33:40 -06:00 committed by Mark Brown
parent 0af237d51a
commit 74b4dd04b1
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 32 additions and 0 deletions

View File

@ -428,6 +428,38 @@ int snd_sof_set_d0_substate(struct snd_sof_dev *sdev,
}
EXPORT_SYMBOL(snd_sof_set_d0_substate);
/*
* Audio DSP states may transform as below:-
*
* D0I3 compatible stream
* Runtime +---------------------+ opened only, timeout
* suspend | +--------------------+
* +------------+ D0(active) | |
* | | <---------------+ |
* | +--------> | | |
* | |Runtime +--^--+---------^--+--+ The last | |
* | |resume | | | | opened D0I3 | |
* | | | | | | compatible | |
* | | resume| | | | stream closed | |
* | | from | | D3 | | | |
* | | D3 | |suspend | | d0i3 | |
* | | | | | |suspend | |
* | | | | | | | |
* | | | | | | | |
* +-v---+-----------+--v-------+ | | +------+----v----+
* | | | +-----------> |
* | D3 (suspended) | | | D0I3 +-----+
* | | +--------------+ | |
* | | resume from | | |
* +-------------------^--------+ d0i3 suspend +----------------+ |
* | |
* | D3 suspend |
* +------------------------------------------------+
*
* d0i3_suspend = s0_suspend && D0I3 stream opened,
* D3 suspend = !d0i3_suspend,
*/
int snd_sof_resume(struct device *dev)
{
struct snd_sof_dev *sdev = dev_get_drvdata(dev);