aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2019-04-04 09:55:36 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2019-04-11 14:33:52 +0200
commita3d48d6871e4f508b03de540b277361d2cdb7d96 (patch)
tree377d4af178ce1874ce0e9671c56d4020eae07d13 /docs
parentc8f15995b650bda9362b70d9c3e8131c73a29267 (diff)
README.md: added a paragraph about the softmixer
Change-Id: I5781a6af4eceb990ba87d540c3ea4a71936fdbb4 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'docs')
-rw-r--r--docs/4a-framework/README.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/4a-framework/README.md b/docs/4a-framework/README.md
index c9a7d8f..77eccde 100644
--- a/docs/4a-framework/README.md
+++ b/docs/4a-framework/README.md
@@ -44,3 +44,51 @@ The high level API uses the hal-manager to list enabled HALs then it uses
directly those HALs.
HALs rely directly on drivers and/or softmixer.
+
+### Softmixer
+
+The 4a softmixer is a sound server. It is a more secured, more CPU-friendly
+server than PulseAudio.
+
+It is mandatory to have a sound server to share a sound card between
+several applications, that may write to the sound card at different
+sound rates and formats.
+
+It is the responsibility of the 4a-softmixer to instantiate the dmix
+alsa plugin, based on the 4A config files.
+
+#### snd-aloop
+
+snd-aloop, which has recently been replaced by a more flexible implementation
+(called avirt), proxifies the access from playback application to sound cards.
+
+The 4a-softmixer reads from snd-aloop (or avirt) captures, and will perform
+the rate conversion, soft volume control for hardware that does not implement
+it, routing to configured audio channels, and mixing at the end.
+
+A security label (SMACK) can be put on the snd-aloop PCM playback devices,
+and since each these devices matches an audio role, that applications have to
+claim to the 4A high level API, this makes a gatekeeper for audio apps.
+
+snd-aloop introduces one more buffer copy; but the measured performances and
+CPU load on the tested boards do not have revealed any unacceptable levels, up
+to now.
+
+The CPU load (which could be even better with some unimplemented optimizations
+today) is typically less than 5% on the Renesas RCAR board, and similar
+numbers have been seen on Intel Atom boards.
+
+#### avirt
+
+Introduced recently on the master branch of AGL, it provides to 4A high level
+a common interface for both softmixing, and DSP-accelerated mixing. I also
+sets user-readable names to the dynamically-configured playback devices, that
+match the 4A audio roles (aka streams).
+
+The avirt-loop backend is a loop implementation that provides the same
+functionality as snd-aloop, with enhanced security (each playback has a
+dedicated PCM device, on which a SMACK label can be put), and with the
+flexibility offered by the top avirt layer.
+
+It is not limited to 8 channels like snd-aloop.
+