summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nbproject/configurations.xml294
-rw-r--r--plugins/alsa/alsa-api-mixer.c14
-rw-r--r--plugins/alsa/alsa-api-streams.c58
-rw-r--r--plugins/alsa/alsa-softmixer.h4
4 files changed, 60 insertions, 310 deletions
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 9ad6e97..a97ae0c 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -174,6 +174,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -186,6 +188,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -198,6 +202,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -210,6 +216,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -222,6 +230,7 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
</incDir>
</cTool>
@@ -232,6 +241,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -244,6 +255,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -256,6 +269,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -268,6 +283,8 @@
flavor2="3">
<cTool flags="1">
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>app-controller-submodule/ctl-lib</pElem>
<pElem>app-afb-helpers-submodule</pElem>
<pElem>../../../opt/include</pElem>
<pElem>build/app-controller-submodule/ctl-lib</pElem>
@@ -322,9 +339,9 @@
</incDir>
<preprocessorList>
<Elem>AFB_BINDING_VERSION=dyn</Elem>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/opt/4a-softmixer/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-softmixer/data"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/4a-softmixer/lib/plugins:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
+ <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>CTL_PLUGIN_MAGIC=987456123</Elem>
<Elem>USE_API_DYN=1</Elem>
</preprocessorList>
@@ -337,46 +354,19 @@
<item path="plugins/alsa/alsa-api-loop.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-api-mixer.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -384,21 +374,9 @@
<item path="plugins/alsa/alsa-api-pcm.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>/usr/include/json-c</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -406,90 +384,39 @@
<item path="plugins/alsa/alsa-api-ramp.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-api-sink.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-api-source.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-api-streams.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -497,43 +424,19 @@
<item path="plugins/alsa/alsa-api-zones.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-capture.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
- <incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
- </incDir>
<preprocessorList>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/opt/4a-softmixer/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc"</Elem>
<Elem>CONTROL_LUA_PATH="/home/fulup/opt/4a-softmixer/data:/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d"</Elem>
+ <Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/4a-softmixer/lib/plugins:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins"</Elem>
<Elem>NATIVE_LINUX</Elem>
<Elem>alsa_router_EXPORTS</Elem>
</preprocessorList>
@@ -542,46 +445,19 @@
<item path="plugins/alsa/alsa-core-ctl.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-core-pcm.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -589,24 +465,9 @@
<item path="plugins/alsa/alsa-effect-ramp.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -614,90 +475,39 @@
<item path="plugins/alsa/alsa-plug-dmix.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-plug-rate.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-plug-route.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-plug-vol.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/etc:/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/etc:/home/fulup/opt/4a-smixer/etc"</Elem>
- <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/conf.d/project/lua.d:/home/fulup/opt/4a-smixer/var"</Elem>
- <Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/Audio-4a/4a-softmixer/build/package/lib/plugins:/home/fulup/opt/4a-smixer/lib/plugins"</Elem>
<Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -705,66 +515,30 @@
<item path="plugins/alsa/alsa-softmixer.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-utils-bypath.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
<item path="plugins/alsa/alsa-utils-dump.c" ex="false" tool="0" flavor2="2">
<cTool flags="0">
<incDir>
- <pElem>app-controller-submodule/ctl-lib</pElem>
- <pElem>build/app-controller-submodule/ctl-lib</pElem>
- <pElem>/usr/include</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/alsa</pElem>
- <pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>/usr/include/uuid</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>mixer-binding</pElem>
- <pElem>app-afb-helpers-submodule</pElem>
- <pElem>build/plugins/alsa</pElem>
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>alsa_router_EXPORTS</Elem>
+ <Elem>alsa_softmixer_EXPORTS</Elem>
</preprocessorList>
</cTool>
</item>
diff --git a/plugins/alsa/alsa-api-mixer.c b/plugins/alsa/alsa-api-mixer.c
index 26de510..a05e1cf 100644
--- a/plugins/alsa/alsa-api-mixer.c
+++ b/plugins/alsa/alsa-api-mixer.c
@@ -70,10 +70,9 @@ OnErrorExit:
AFB_ReqFail(request, "internal-error", "fail to delete mixer");
}
-STATIC void MixerInfoVerb(AFB_ReqT request) {
+STATIC void MixerInfoAction(AFB_ReqT request, json_object *argsJ) {
SoftMixerT *mixer = (SoftMixerT*) afb_request_get_vcbdata(request);
- json_object *argsJ = afb_request_json(request);
int error, streams = 0, quiet = 0, ramps = 0, zones = 0, captures = 0, playbacks = 0;
if (json_object_get_type(argsJ) == json_type_null) {
@@ -206,7 +205,11 @@ STATIC void MixerInfoVerb(AFB_ReqT request) {
OnErrorExit:
AFB_ReqFail(request, "internal-error", "fail to get mixer info");
+}
+STATIC void MixerInfoVerb(AFB_ReqT request) {
+ json_object *argsJ = afb_request_json(request);
+ MixerInfoAction (request, argsJ);
}
STATIC void MixerAttachVerb(AFB_ReqT request) {
@@ -214,7 +217,6 @@ STATIC void MixerAttachVerb(AFB_ReqT request) {
const char *uid = NULL;
json_object *playbackJ = NULL, *captureJ = NULL, *zonesJ = NULL, *streamsJ = NULL, *rampsJ = NULL, *loopsJ = NULL;
json_object *argsJ = afb_request_json(request);
- json_object *responseJ;
int error;
error = wrap_json_unpack(argsJ, "{ss,s?o,s?o,s?o,s?o,s?o,s?o !}"
@@ -258,12 +260,12 @@ STATIC void MixerAttachVerb(AFB_ReqT request) {
}
if (streamsJ) {
- error = ApiStreamAttach(mixer, request, uid, streamsJ, &responseJ);
+ error = ApiStreamAttach(mixer, request, uid, streamsJ);
if (error) goto OnErrorExit;
}
- AFB_ReqSucess(request, responseJ, mixer->uid);
- return;
+ // return mixer info data after attach
+ return (MixerInfoAction(request,NULL));
OnErrorExit:
return;
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index 6911dc2..e2f3252 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -153,7 +153,7 @@ OnErrorExit:
return;
}
-PUBLIC json_object *CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream) {
+PUBLIC int CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream) {
int error;
long value;
AlsaSndLoopT *loop = NULL;
@@ -271,37 +271,11 @@ PUBLIC json_object *CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream)
}
}
- // prepare response for application
- json_object *paramsJ, *streamJ, *numidsJ;
- char *appCardId = NULL;
-
// return alsa URI only when loopback is used
if (loop) {
- (void) asprintf(&appCardId, "hw:%d,%d,%d", captureDev->cardidx, loop->playback, capturePcm->cid.subdev);
+ (void) asprintf((char**)&stream->source, "hw:%d,%d,%d", captureDev->cardidx, loop->playback, capturePcm->cid.subdev);
} else {
- appCardId = "";
- }
-
-
- error += wrap_json_pack(&paramsJ, "{si si si si}"
- , "rate", stream->params->rate
- , "channels", stream->params->channels
- , "format", stream->params->format
- , "access", stream->params->access
- );
- error += wrap_json_pack(&numidsJ, "{si si}"
- , "volume", volNumid
- , "pause", pauseNumid
- );
- error += wrap_json_pack(&streamJ, "{ss ss so so}"
- , "uid", stream->uid
- , "alsa", appCardId
- , "numid", numidsJ
- , "params", paramsJ
- );
- if (error) {
- AFB_ApiError(mixer->api, "CreateOneStream: mixer=%s stream=%s fail to prepare response", mixer->uid, stream->uid);
- goto OnErrorExit;
+ stream->source=NULL;
}
// create a dedicated verb for this stream
@@ -311,10 +285,10 @@ PUBLIC json_object *CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream)
apiHandle->stream = stream;
apiHandle->sndcard = captureCard;
apiHandle->pcm = capturePcm->handle;
-
+
// replace stream volume/mute values with corresponding ctl control
- stream->volume=volNumid;
- stream->mute=pauseNumid;
+ stream->volume = volNumid;
+ stream->mute = pauseNumid;
error = afb_dynapi_add_verb(mixer->api, stream->uid, stream->info, StreamApiVerbCB, apiHandle, NULL, 0);
if (error) {
@@ -326,15 +300,15 @@ PUBLIC json_object *CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream)
//AlsaDumpElemConfig (source, "\n\nAlsa_Config\n------------\n", "pcm");
//AlsaDumpPcmInfo(source, "\n\nPcm_config\n-----------\n", streamPcm->handle);
- AFB_ApiNotice(mixer->api, "CreateOneStream: mixer=%s stream=%s OK reponse=%s\n", mixer->uid, stream->uid, json_object_get_string(streamJ));
+ AFB_ApiNotice(mixer->api, "CreateOneStream: mixer=%s stream=%s done", mixer->uid, stream->uid);
- return streamJ;
+ return 0;
OnErrorExit:
- return NULL;
+ return -1;
}
-STATIC AlsaStreamAudioT * AttachOneStream(SoftMixerT *mixer, const char *uid, json_object *streamJ, json_object **responseJ) {
+STATIC AlsaStreamAudioT * AttachOneStream(SoftMixerT *mixer, const char *uid, json_object *streamJ) {
AlsaStreamAudioT *stream = calloc(1, sizeof (AlsaStreamAudioT));
int error;
json_object *paramsJ = NULL;
@@ -372,15 +346,17 @@ STATIC AlsaStreamAudioT * AttachOneStream(SoftMixerT *mixer, const char *uid, js
if (stream->source)stream->source = strdup(stream->source);
// implement stream PCM with corresponding thread and controls
- *responseJ = CreateOneStream(mixer, stream);
+ error = CreateOneStream(mixer, stream);
+ if (error) goto OnErrorExit;
return stream;
OnErrorExit:
+ free(stream);
return NULL;
}
-PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ, json_object **responseJ) {
+PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ) {
if (!mixer->loops) {
AFB_ApiError(mixer->api, "StreamsAttach: mixer=%s No Loop found [should Registry snd_loop first]", mixer->uid);
@@ -401,7 +377,7 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
long count;
case json_type_object:
- mixer->streams[index] = AttachOneStream(mixer, uid, argsJ, responseJ);
+ mixer->streams[index] = AttachOneStream(mixer, uid, argsJ);
if (!mixer->streams[index]) {
AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid stream= %s", mixer->uid, json_object_get_string(argsJ));
goto OnErrorExit;
@@ -409,7 +385,6 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
break;
case json_type_array:
- *responseJ = json_object_new_array();
count = json_object_array_length(argsJ);
if (count > (mixer->max.streams - count)) {
@@ -419,12 +394,11 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
for (int idx = 0; idx < count; idx++) {
json_object *streamJ = json_object_array_get_idx(argsJ, idx);
- mixer->streams[index + idx] = AttachOneStream(mixer, uid, streamJ, &streamJ);
+ mixer->streams[index + idx] = AttachOneStream(mixer, uid, streamJ);
if (!mixer->streams[index + idx]) {
AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid stream= %s", mixer->uid, json_object_get_string(streamJ));
goto OnErrorExit;
}
- (void) json_object_array_add(*responseJ, streamJ);
}
break;
default:
diff --git a/plugins/alsa/alsa-softmixer.h b/plugins/alsa/alsa-softmixer.h
index f8d94e4..8572996 100644
--- a/plugins/alsa/alsa-softmixer.h
+++ b/plugins/alsa/alsa-softmixer.h
@@ -274,8 +274,8 @@ PUBLIC AlsaPcmHwInfoT *ApiSinkGetParamsByZone(SoftMixerT *mixer, const char *tar
PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ);
PUBLIC AlsaSndCtlT *ApiSourceFindSubdev(SoftMixerT *mixer, const char *target);
PUBLIC int ApiSourceAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ);
-PUBLIC json_object *CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream);
-PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ, json_object **responseJ);
+PUBLIC int CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream);
+PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ);
PUBLIC AlsaSndZoneT *ApiZoneGetByUid(SoftMixerT *mixer, const char *target);
PUBLIC int ApiZoneAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object * argsJ);