aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-12-18 23:50:33 +0100
committerRonan Le Martret <ronan.lemartret@iot.bzh>2017-12-19 07:31:35 +0100
commit99aeadc1e2f48f3d38e3fea2a668832bb0e02204 (patch)
treebc89e10714b5cd04ca7bcb321107d09f0aa67ed8
parent82ac8179336010ffc753b18b885a47a6344dfa9f (diff)
Provide JSON request when ctl-set FAIL SPEC-1183
Change-Id: I27aa13d7113614b9ef69d09dccc21551cfe2445d Signed-off-by: Fulup Ar Foll <fulup@iot.bzh>
-rw-r--r--ahl-policy/ahl-policy.c4
-rw-r--r--conf.d/cmake/config.cmake2
-rw-r--r--conf.d/project/ahl-audio4a-config.json2
-rw-r--r--nbproject/configurations.xml85
-rw-r--r--nbproject/project.xml26
5 files changed, 115 insertions, 4 deletions
diff --git a/ahl-policy/ahl-policy.c b/ahl-policy/ahl-policy.c
index 90fe9f6..ade9117 100644
--- a/ahl-policy/ahl-policy.c
+++ b/ahl-policy/ahl-policy.c
@@ -228,7 +228,7 @@ static int PolicySetVolume(int iEndpointID, int iEndpointType, char *pHalApiName
err = afb_service_call_sync(pHalApiName, "ctlset", j_query, &j_response);
if (err)
{
- AFB_ERROR("Could not ctlset on HAL: %s with errorcode: %i",pHalApiName, err);
+ AFB_ERROR("Could not ctlset=%s on HAL: %s with errorcode: %i",json_object_to_json_string(j_query), pHalApiName, err);
return POLICY_FAIL;
}
AFB_DEBUG("HAL ctlset response=%s", json_object_to_json_string(j_response));
@@ -290,7 +290,7 @@ static int PolicyGetVolume(int iEndpointID, int iEndpointType, char *pHalApiName
err = afb_service_call_sync(pHalApiName, "ctlget", j_query, &j_response);
if (err)
{
- AFB_WARNING("Could not ctlset on HAL: %s, errorcode: %i",pHalApiName, err);
+ AFB_WARNING("Could not ctlget=%s on HAL: %s, errorcode: %i",json_object_to_json_string(j_query),pHalApiName, err);
return POLICY_FAIL;
}
AFB_DEBUG("HAL ctlget response=%s", json_object_to_json_string(j_response));
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index cb88135..b89c5ed 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -103,7 +103,7 @@ if(IS_DIRECTORY $ENV{HOME}/opt/afb-monitoring)
set(MONITORING_ALIAS "--alias=/monitoring:$ENV{HOME}/opt/afb-monitoring")
endif()
-set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audio4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../alsa-4a/build/package/lib:../../hal-sample-4a/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ")
+set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audio4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../4a-alsa-core/build/package/lib:../../4a-hal-reference/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ")
# Optional location for config.xml.in
diff --git a/conf.d/project/ahl-audio4a-config.json b/conf.d/project/ahl-audio4a-config.json
index 64c8141..4946e2c 100644
--- a/conf.d/project/ahl-audio4a-config.json
+++ b/conf.d/project/ahl-audio4a-config.json
@@ -3,7 +3,7 @@
"policy_module": "AudioPolicy_v1",
"description": "High-level binding configuration file",
"note": "Devices and routings are always listed in order of priority (for device selection rules)",
- "hal_list": ["ensoniq","usb-audio"],
+ "hal_list": ["usb-audio"],
"audio_roles": [
{
"name": "Warning",
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
new file mode 100644
index 0000000..5bd3283
--- /dev/null
+++ b/nbproject/configurations.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="ahl-binding">
+ <in>ahl-binding.c</in>
+ <in>ahl-config.c</in>
+ <in>ahl-deviceenum.c</in>
+ <in>ahl-json.c</in>
+ </df>
+ <df name="ahl-policy">
+ <in>ahl-policy.c</in>
+ </df>
+ <df name="ahl-utilities">
+ <in>ahl-policy-utils.c</in>
+ </df>
+ </df>
+ <logicalFolder name="ExternalFiles"
+ displayName="Important Files"
+ projectFiles="false"
+ kind="IMPORTANT_FILES_FOLDER">
+ <itemPath>build/Makefile</itemPath>
+ <itemPath>nbproject/private/launcher.properties</itemPath>
+ </logicalFolder>
+ </logicalFolder>
+ <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
+ <sourceRootList>
+ <Elem>.</Elem>
+ </sourceRootList>
+ <projectmakefile>build/Makefile</projectmakefile>
+ <confs>
+ <conf name="Default" type="0">
+ <toolsSet>
+ <compilerSet>default</compilerSet>
+ <dependencyChecking>false</dependencyChecking>
+ <rebuildPropChanged>false</rebuildPropChanged>
+ </toolsSet>
+ <codeAssistance>
+ <buildAnalyzer>false</buildAnalyzer>
+ </codeAssistance>
+ <makefileType>
+ <makeTool>
+ <buildCommandWorkingDir>build</buildCommandWorkingDir>
+ <buildCommand>${MAKE} -f Makefile</buildCommand>
+ <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
+ <executablePath></executablePath>
+ <cTool>
+ <incDir>
+ <pElem>.</pElem>
+ </incDir>
+ </cTool>
+ <ccTool>
+ <incDir>
+ <pElem>.</pElem>
+ </incDir>
+ </ccTool>
+ </makeTool>
+ <preBuild>
+ <preBuildCommandWorkingDir>build</preBuildCommandWorkingDir>
+ <preBuildCommand>cmake ..</preBuildCommand>
+ </preBuild>
+ </makefileType>
+ <item path="afb-utilities/filescan-utils.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="afb-utilities/wrap-json.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-binding/ahl-binding.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-binding/ahl-config.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-binding/ahl-deviceenum.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-binding/ahl-json.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-policy/ahl-policy.c" ex="false" tool="0" flavor2="0">
+ </item>
+ <item path="ahl-utilities/ahl-policy-utils.c" ex="false" tool="0" flavor2="0">
+ </item>
+ </conf>
+ </confs>
+</configurationDescriptor>
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644
index 0000000..91d2ad4
--- /dev/null
+++ b/nbproject/project.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.cnd.makeproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/make-project/1">
+ <name>agl-service-audio-4a</name>
+ <c-extensions>c</c-extensions>
+ <cpp-extensions/>
+ <header-extensions>h,hpp</header-extensions>
+ <sourceEncoding>UTF-8</sourceEncoding>
+ <make-dep-projects/>
+ <sourceRootList>
+ <sourceRootElem>.</sourceRootElem>
+ </sourceRootList>
+ <confList>
+ <confElem>
+ <name>Default</name>
+ <type>0</type>
+ </confElem>
+ </confList>
+ <formatting>
+ <project-formatting-style>false</project-formatting-style>
+ </formatting>
+ </data>
+ </configuration>
+</project>