aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/designs/compress-offload.rst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Documentation/sound/designs/compress-offload.rst83
1 files changed, 83 insertions, 0 deletions
diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst
index ad4bfbdacc83..935f325dbc77 100644
--- a/Documentation/sound/designs/compress-offload.rst
+++ b/Documentation/sound/designs/compress-offload.rst
@@ -151,6 +151,57 @@ 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_free() +----------+
+ +------------------------------------| |
+ | | SETUP |
+ | +-------------------------| |<-------------------------+
+ | | compr_write() +----------+ |
+ | | ^ |
+ | | | compr_drain_notify() |
+ | | | or |
+ | | | compr_stop() |
+ | | | |
+ | | +----------+ |
+ | | | | |
+ | | | DRAIN | |
+ | | | | |
+ | | +----------+ |
+ | | ^ |
+ | | | |
+ | | | compr_drain() |
+ | | | |
+ | v | |
+ | +----------+ +----------+ |
+ | | | compr_start() | | compr_stop() |
+ | | PREPARE |------------------->| RUNNING |--------------------------+
+ | | | | | |
+ | +----------+ +----------+ |
+ | | | ^ |
+ | |compr_free() | | |
+ | | compr_pause() | | compr_resume() |
+ | | | | |
+ | v v | |
+ | +----------+ +----------+ |
+ | | | | | compr_stop() |
+ +--->| FREE | | PAUSE |---------------------------+
+ | | | |
+ +----------+ +----------+
+
Gapless Playback
================
@@ -199,6 +250,38 @@ Sequence flow for gapless would be:
(note: order for partial_drain and write for next track can be reversed as well)
+Gapless Playback SM
+===================
+
+For Gapless, we move from running state to partial drain and back, along
+with setting of meta_data and signalling for next track ::
+
+
+ +----------+
+ compr_drain_notify() | |
+ +------------------------>| RUNNING |
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_next_track()
+ | |
+ | V
+ | +----------+
+ | | |
+ | |NEXT_TRACK|
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_partial_drain()
+ | |
+ | V
+ | +----------+
+ | | |
+ +------------------------ | PARTIAL_ |
+ | DRAIN |
+ +----------+
Not supported
=============