summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-23 22:51:28 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-23 22:51:28 +0200
commit612b785b0fb4af835727aa8ebe38afc6c5ec0e1e (patch)
tree1e06a70ba9418ff734ce2c95a55d2c93d673370e
parent3cf0bf466296cc244738c14e96c398bc9310ffc9 (diff)
Fix Regretion on AlsaCore Ctl-get
-rw-r--r--Alsa-afb/Alsa-SetGet.c4
-rw-r--r--htdocs/alsa-core.html2
-rw-r--r--nbproject/configurations.xml29
3 files changed, 32 insertions, 3 deletions
diff --git a/Alsa-afb/Alsa-SetGet.c b/Alsa-afb/Alsa-SetGet.c
index 7450944..71206e6 100644
--- a/Alsa-afb/Alsa-SetGet.c
+++ b/Alsa-afb/Alsa-SetGet.c
@@ -759,8 +759,8 @@ STATIC void alsaSetGetCtls(ActionSetGetT action, afb_req request) {
else {
// Do not embed response in an array when only one ctl was requested
if (action == ACTION_GET) {
- if (queryValues.count > 1) json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
- else sndctls = ctlRequest[jdx].valuesJ;
+ if (queryValues.count == 1) sndctls = ctlRequest[jdx].valuesJ;
+ else json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
}
}
}
diff --git a/htdocs/alsa-core.html b/htdocs/alsa-core.html
index 39a4990..ff17fd1 100644
--- a/htdocs/alsa-core.html
+++ b/htdocs/alsa-core.html
@@ -33,7 +33,7 @@
<br>
<ol>
<li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode})">Get all Alsa Ctls</button></li>
- <li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode, ctl:[numid]})">Get Alsa Ctls [numid]</button></li>
+ <li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode, ctl:numid})">Get Alsa Ctls [numid]</button></li>
<li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode, ctl:[numid,numid+1]})">Get Alsa Ctls [numid,numid+1]</button></li>
<br>
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 424cd2f..0b0cdfb 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -2,6 +2,10 @@
<configurationDescriptor version="100">
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
<df root="." name="0">
+ <df name="afb-utilities">
+ <in>filescan-utils.c</in>
+ <in>wrap-json.c</in>
+ </df>
<df name="Alsa-afb">
<in>Alsa-AddCtl.c</in>
<in>Alsa-ApiHat.c</in>
@@ -340,6 +344,7 @@
<cTool flags="3">
<incDir>
<pElem>Audio-Common</pElem>
+ <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL-interface</pElem>
</incDir>
</cTool>
@@ -374,8 +379,11 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>/usr/include/json-c</pElem>
<pElem>Audio-Common</pElem>
<pElem>HAL-afb/HAL-interface</pElem>
+ <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -431,6 +439,7 @@
<cTool flags="3">
<incDir>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
+ <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -443,6 +452,7 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
+ <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -537,6 +547,25 @@
</item>
<item path="MostVolume/libmostvolume.cpp" ex="false" tool="1" flavor2="4">
</item>
+ <item path="afb-utilities/filescan-utils.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="3">
+ <incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>afb-utilities</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>build/afb-utilities</pElem>
+ </incDir>
+ </cTool>
+ </item>
+ <item path="afb-utilities/wrap-json.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="3">
+ <incDir>
+ <pElem>afb-utilities</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>build/afb-utilities</pElem>
+ </incDir>
+ </cTool>
+ </item>
<folder path="0/Alsa-Plugin">
<cTool>
<incDir>