From fe8135a9a769f9df7e7e0d0eeacdd8497661a8c4 Mon Sep 17 00:00:00 2001 From: fulup Date: Sun, 10 Jun 2018 00:49:02 +0200 Subject: Cleanup and added return of previous volume when setting new value --- conf.d/project/etc/smixer-test-config.json | 43 +++++++++++++++--- conf.d/project/htdocs/index.html | 25 ++++++----- conf.d/project/lua.d/smixer-test-usb_ch8.lua | 65 +++++++--------------------- 3 files changed, 66 insertions(+), 67 deletions(-) (limited to 'conf.d') diff --git a/conf.d/project/etc/smixer-test-config.json b/conf.d/project/etc/smixer-test-config.json index 3916d76..42f9e65 100644 --- a/conf.d/project/etc/smixer-test-config.json +++ b/conf.d/project/etc/smixer-test-config.json @@ -11,20 +11,49 @@ "uid": "softmixer", "info": "Map alsa-loop subdevices to 4A HAL streams", "spath": "./package/lib/plugins:./package/var:./lib/plugins:./var", - "libs": ["alsa-softmixer.ctlso", "smixer-test-radio_8ch.lua"], + "libs": ["alsa-softmixer.ctlso", "smixer-test-usb_ch8.lua"], } ], - "onload": [ { - "uid": "create-soft-mixer", + "uid": "mixer-create-api", "info": "Create Audio Router", - "action": "plugin://softmixer#CreateMixer", - "args": {"uid":"Simple_Test_Mixer"} + "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": 4, + } }, { - "uid": "attach-soft-mixer", - "info": "Attach Stream to Audio Router", + "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} + ] + } + } + }, + { + "uid": "lua-test-attach", + "info": "For testing purpose attach stream & zone directly from LUA script to simulate HAL", "action": "lua://softmixer#_mixer_simple_test_" } ] diff --git a/conf.d/project/htdocs/index.html b/conf.d/project/htdocs/index.html index c667dde..53c7054 100644 --- a/conf.d/project/htdocs/index.html +++ b/conf.d/project/htdocs/index.html @@ -13,26 +13,29 @@

Simple Mixer Test

- +

V3 API CALL

    -
  1. -
  2. +
  3. +
  4. +

  5. -
  6. -
  7. +
  8. +

  9. -
  10. -
  11. +
  12. +

  13. -
  14. -
  15. +
  16. +

  17. -
  18. -
  19. +
  20. +
  21. +
    +