OSDN Git Service

soundwire: stream: update state machine and add state checks
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 14 Jan 2020 23:52:23 +0000 (17:52 -0600)
committerVinod Koul <vkoul@kernel.org>
Thu, 13 Feb 2020 10:27:37 +0000 (15:57 +0530)
commit59528807715f81f123631f57446b08219efa7526
treed08345c6de7e2dfc47233f617a7a47690ecd7367
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9
soundwire: stream: update state machine and add state checks

The state machine and notes don't accurately explain or allow
transitions from STREAM_DEPREPARED and STREAM_DISABLED.

Add more explanations and allow for more transitions as a result of a
trigger_stop(), trigger_suspend() and prepare(), depending on the
ALSA/ASoC layer behavior defined by the INFO_RESUME and INFO_PAUSE
flags.

Also add basic checks to help debug inconsistent states and illegal
state machine transitions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200114235227.14502-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Documentation/driver-api/soundwire/stream.rst
drivers/soundwire/stream.c