From 253df14bd84f535a54f4d12c95399899e1343c20 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Thu, 17 May 2018 21:43:24 +0200 Subject: Initial version with dynamic APIs --- conf.d/project/etc/4a-softmixer-config.json | 42 ---------------- conf.d/project/etc/4a-softmixer-test.json | 75 +++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 42 deletions(-) delete mode 100644 conf.d/project/etc/4a-softmixer-config.json create mode 100644 conf.d/project/etc/4a-softmixer-test.json (limited to 'conf.d/project/etc') diff --git a/conf.d/project/etc/4a-softmixer-config.json b/conf.d/project/etc/4a-softmixer-config.json deleted file mode 100644 index e67709f..0000000 --- a/conf.d/project/etc/4a-softmixer-config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", - "metadata": { - "uid": "Soft Mixer", - "version": "1.0", - "api": "softmixer", - "info": "Soft Mixer emulating hardware mixer" - }, - "resources": [ - { - "uid": "alsa-softmixer", - "info": "Map alsa-loop subdevices to 4A HAL streams", - "spath":"./plugins/alsa:../conf.d/project/lua.d", - "libs": ["alsa-router.ctlso", "softmixer-simple.lua"], - "lua": {"prefix":"smix","functions": ["snd_cards", "snd_zones", "snd_loops", "snd_streams"]} - } - ], - - "onload": [ - { - "uid": "init-soft-mixer", - "info": "Initialise Audio Router", - "action": "lua://alsa-softmixer#_init_softmixer_" - } - ], - - "controls": [ - { - "uid": "mixer-config", - "action": "lua://alsa-softmixer#_mixer_config_" - }, - { - "uid": "snd-cards", - "action": "plugin://alsa-softmixer#snd_cards" - }, - { - "uid": "snd-zone", - "action": "plugin://alsa-softmixer#snd_zones" - } - ] - -} diff --git a/conf.d/project/etc/4a-softmixer-test.json b/conf.d/project/etc/4a-softmixer-test.json new file mode 100644 index 0000000..f363a55 --- /dev/null +++ b/conf.d/project/etc/4a-softmixer-test.json @@ -0,0 +1,75 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", + "metadata": { + "uid": "Soft Mixer", + "version": "1.0", + "api": "softmixer", + "info": "Soft Mixer emulating hardware mixer" + }, + "resources": [ + { + "uid": "softmixer", + "info": "Map alsa-loop subdevices to 4A HAL streams", + "spath": "./plugins/alsa:../conf.d/project/lua.d", + "libs": ["alsa-softmixer.ctlso", "softmixer-simple-test.lua"], + "lua": { + "prefix": "smix", + "functions": ["_mixer_new_"] + } + } + ], + + "onload": [ + { + "uid": "init-soft-mixer", + "info": "Initialise Audio Router", + "action": "lua://softmixer#_mixer_simple_test_" + } + ], + "controls": [ + { + "uid": "new", + "action": "plugin://softmixer#_mixer_new_", + "args": { + "devices": { + "playback": 0, + "capture": 1 + }, + "subdevs": [ + { + "subdev": 0, + "numid": 51 + }, + { + "subdev": 1, + "numid": 57 + }, + { + "subdev": 2, + "numid": 63 + }, + { + "subdev": 3, + "numid": 69 + }, + { + "subdev": 4, + "numid": 75 + }, + { + "subdev": 5, + "numid": 81 + }, + { + "subdev": 6, + "numid": 87 + }, + { + "subdev": 7, + "numid": 93 + } + ] + } + } + ] +} -- cgit 1.2.3-korg