blob: 25b3ea8cb680fb27345c192db395503ab7cb57c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
Introduction
===================
## Problem
The existing solution contains the following drawbacks:
1. Non-generic interface for configurable hardware cases
- Unable to configure streams mapped to outputs
2. Not fully optimized for certain use cases (ie. Routing Audio to DSP vs. aloop)
- Routing audio to hardware to reduce overhead
3. Inability to secure on all audio streams
- Substreams cannot have SMACK labels applied, inherently leaving different audio streams insecure, or a single label applied to all.
## AVIRTs Solution
The ALSA Virtual Sound Driver (AVIRT) aims to provide a Linux kernel solution to the issue of audio routing in kernel-space, as well as security per-stream, and dynamic configuration of streams at the kernel level.
A top-level abstract dynamic audio driver is presented to the user-space via an ALSA middle-layer card. From there, respective low-level "real" audio drivers can subscribe to it as an "Audio Path".
The top-level driver is configured (currently) using by utilising configfs.
AVIRT attempts to address the aforementioned problems by:
1. Providing a standard interface through configfs to configure a variable number of 'streams' which can be mapped to audio paths.
2. Optimize the audio routing by connecting directly with the desired audio path. This can include routing audio through directly to hardware, or to an implemented loopback interface.
3. Each 'stream' is separated to its own device, therefore security can be applied to each 'stream'. This means that each of the audio roles can be separately secured from each other.
A sample dummy Audio Path is provided as an example to show how a low-level audio driver would subscribe to AVIRT, and accept audio routing for playback.
Currently, the Fiberdyne DSP hardmixer is supported on the Renesas R-Car M3 AGL reference platform, and a default loopback softmixer is in development.
|