aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-06-18 19:29:11 +0530
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2020-06-29 17:15:42 +0100
commitb8aaf6a744774003f884bee6fe8675e45a34ddd1 (patch)
treebe1e55a057c8feb0cfa2c4daf8dc6c42e1933892
parentbbbe83f872fe8095014d9dc1aaf7e1b3d5ed4275 (diff)
ALSA: compress: document the compress audio state machine
So we had some discussions of the stream states, so I thought it is a good idea to document the state transitions, so add it documentation Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--Documentation/sound/designs/compress-offload.rst52
1 files changed, 52 insertions, 0 deletions
diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst
index ad4bfbdacc83..7292717c43bf 100644
--- a/Documentation/sound/designs/compress-offload.rst
+++ b/Documentation/sound/designs/compress-offload.rst
@@ -151,6 +151,58 @@ Modifications include:
- Addition of encoding options when required (derived from OpenMAX IL)
- Addition of rateControlSupported (missing in OpenMAX AL)
+State Machine
+=============
+
+The compressed audio stream state machine is described below ::
+
+ +----------+
+ | |
+ | OPEN |
+ | |
+ +----------+
+ |
+ |
+ | compr_set_params()
+ |
+ V
+ +----------+
+ compr_drain_notify() | |
+ +------------------------>| SETUP |
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_write()
+ | |
+ | V
+ | +----------+
+ | | |
+ | | PREPARE |
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_start()
+ | |
+ | V
+ +----------+ +----------+ compr_pause() +----------+
+ | | | |----------------------->| |
+ | DRAIN |<-------------------| RUNNING | | PAUSE |
+ | | | |<-----------------------| |
+ +----------+ +----------+ compr_resume() +----------+
+ | |
+ | |
+ | | compr_free()
+ | |
+ | V
+ | +----------+
+ | compr_free() | |
+ +------------------------>| |
+ | STOP |
+ | |
+ +----------+
+
Gapless Playback
================