summaryrefslogtreecommitdiffstats
path: root/conf.d/project/etc/smixer-default-4a.json
diff options
context:
space:
mode:
authorPierre MARZIN <pierre.marzin@iot.bzh>2019-04-01 10:35:57 +0200
committerPierre Marzin <pierre.marzin@iot.bzh>2019-04-02 08:16:29 +0000
commit36721c55b616bdce8b8f79ff3c7042ef54d18478 (patch)
tree652c6cd69ef9ce9727965d752c4d0c741d264afc /conf.d/project/etc/smixer-default-4a.json
parent074e6871959279c4aed3e162f21f677e08338b3a (diff)
pre-init: Add a config detection
Scan the loaded modules during pre-init to know which config file to load. If Avirt core module is loaded then load the avirt config file. Otherwise, load the default config file. Change the config file name in order to use the prefix to select them. Change-Id: I8f9d5ed568fa20b06ac3bef443a2392de26c8235 Signed-off-by: Pierre MARZIN <pierre.marzin@iot.bzh>
Diffstat (limited to 'conf.d/project/etc/smixer-default-4a.json')
-rw-r--r--conf.d/project/etc/smixer-default-4a.json55
1 files changed, 55 insertions, 0 deletions
diff --git a/conf.d/project/etc/smixer-default-4a.json b/conf.d/project/etc/smixer-default-4a.json
new file mode 100644
index 0000000..d03a7a9
--- /dev/null
+++ b/conf.d/project/etc/smixer-default-4a.json
@@ -0,0 +1,55 @@
+{
+ "$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",
+ "info": "Map alsa-loop subdevices 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#MixerCreate",
+ "args": {
+ "uid":"Alsa-Mixer",
+ "max_loop": 1,
+ "max_sink": 8,
+ "max_source": 8,
+ "max_zone": 8,
+ "max_stream": 8,
+ "max_ramp": 6
+ }
+ },
+ {
+ "uid": "mixer-attach-loop",
+ "info": "Create Audio Router",
+ "action": "plugin://softmixer#MixerAttach",
+ "args": {
+ "loops" : {
+ "uid":"Alsa-Loopback",
+ "path": "/dev/snd/by-path/platform-snd_aloop.0",
+ "devices" : {"playback":0, "capture":1},
+ "subdevs" : [
+ {"subdev": 0, "numid": 51, "uid": "loop-legacy"},
+ {"subdev": 1, "numid": 57, "uid": "loop-multimedia"},
+ {"subdev": 2, "numid": 63},
+ {"subdev": 3, "numid": 69},
+ {"subdev": 4, "numid": 75},
+ {"subdev": 5, "numid": 81},
+ {"subdev": 6, "numid": 87},
+ {"subdev": 7, "numid": 93}
+ ]
+ }
+ }
+ }
+ ]
+}