Skip to content

Commit 74b4dd0

Browse files
keyonjiebroonie
authored andcommitted
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>
1 parent 0af237d commit 74b4dd0

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎sound/soc/sof/pm.c‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,38 @@ int snd_sof_set_d0_substate(struct snd_sof_dev *sdev,
428428
}
429429
EXPORT_SYMBOL(snd_sof_set_d0_substate);
430430

431+
/*
432+
* Audio DSP states may transform as below:-
433+
*
434+
* D0I3 compatible stream
435+
* Runtime +---------------------+ opened only, timeout
436+
* suspend | +--------------------+
437+
* +------------+ D0(active) | |
438+
* | | <---------------+ |
439+
* | +--------> | | |
440+
* | |Runtime +--^--+---------^--+--+ The last | |
441+
* | |resume | | | | opened D0I3 | |
442+
* | | | | | | compatible | |
443+
* | | resume| | | | stream closed | |
444+
* | | from | | D3 | | | |
445+
* | | D3 | |suspend | | d0i3 | |
446+
* | | | | | |suspend | |
447+
* | | | | | | | |
448+
* | | | | | | | |
449+
* +-v---+-----------+--v-------+ | | +------+----v----+
450+
* | | | +-----------> |
451+
* | D3 (suspended) | | | D0I3 +-----+
452+
* | | +--------------+ | |
453+
* | | resume from | | |
454+
* +-------------------^--------+ d0i3 suspend +----------------+ |
455+
* | |
456+
* | D3 suspend |
457+
* +------------------------------------------------+
458+
*
459+
* d0i3_suspend = s0_suspend && D0I3 stream opened,
460+
* D3 suspend = !d0i3_suspend,
461+
*/
462+
431463
int snd_sof_resume(struct device *dev)
432464
{
433465
struct snd_sof_dev *sdev = dev_get_drvdata(dev);

0 commit comments

Comments
 (0)