diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-02-12 12:11:26 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-02-12 12:12:38 +1100 |
commit | d5ac69750d6d16c88ee009e0106bfd6eeffaa695 (patch) | |
tree | 56026a1dc912f49d76ebc24fa3c27b2c9a7e82dd /conf.d | |
parent | d5cc09d1ef5c58bb8d34e3a47c391a10d8b48181 (diff) |
Add support for AVIRT
Leverage the new AVIRT driver for a more secure, more dynamically
configurable loopback sound driver.
To use, replace the file smixer-4a-default.json with
smixer-4a-avirt.json, at /usr/libexec/agl/smixer/etc.
The snd-avirt drivers are installed in AGL by default as of 6.99.2.
The existing snd-aloop configuration is not broken by this change.
Change-Id: I827636656c109a7393ad77997e05069a2462ea46
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'conf.d')
-rw-r--r-- | conf.d/cmake/config.cmake | 2 | ||||
-rw-r--r-- | conf.d/project/etc/smixer-4a-avirt.json | 44 |
2 files changed, 45 insertions, 1 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index 8093548..f5509f2 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -88,7 +88,7 @@ set (PKG_REQUIRED_LIST # Customize link option # ----------------------------- #list(APPEND link_libraries -an-option) -list(APPEND link_libraries afb-helpers) +list(APPEND link_libraries afb-helpers avirt) # Compilation options definition # Use CMake generator expressions to specify only for a specific language diff --git a/conf.d/project/etc/smixer-4a-avirt.json b/conf.d/project/etc/smixer-4a-avirt.json new file mode 100644 index 0000000..18d6193 --- /dev/null +++ b/conf.d/project/etc/smixer-4a-avirt.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", + "metadata": { + "uid": "Soft Mixer", + "version": "1.0", + "api": "smixer", + "info": "Soft Mixer emulating hardware mixer" + }, + "resources": [ + { + "uid": "softmixer-avirt", + "info": "Map avirt-loop to 4A HAL streams", + "spath": "./package/lib/plugins:./package/var:./lib/plugins:./var:/usr/libexec/agl/smixer", + "libs": ["alsa-softmixer.ctlso"] + } + ], + "onload": [ + { + "uid": "mixer-create-api", + "info": "Create Audio Router", + "action": "plugin://softmixer-avirt#MixerCreate", + "args": { + "uid":"Alsa-Mixer", + "max_loop": 1, + "max_sink": 16, + "max_source": 16, + "max_zone": 16, + "max_stream": 16, + "max_ramp": 6 + } + }, + { + "uid": "mixer-attach-loop", + "info": "Create Audio Router", + "action": "plugin://softmixer-avirt#MixerAttach", + "args": { + "loops" : { + "uid":"AVIRT-Loopback", + "path": "/dev/snd/by-path/platform-snd_avirt.0" + } + } + } + ] +} |