summaryrefslogtreecommitdiffstats
path: root/plugin/most_unicens.c
diff options
context:
space:
mode:
authorTobias Jahnke <tobias.jahnke@microchip.com>2018-11-05 16:47:45 +0100
committerTobias Jahnke <tobias.jahnke@microchip.com>2018-12-18 13:01:13 +0100
commitc2d8afaf9979b1f18d546aca7ddaab5192a4629a (patch)
tree646a4c019ff1c4d7ff1c556c8ad5dd66467abc3b /plugin/most_unicens.c
parent0bf3dc602d454aeac8cd34499b037ad456402183 (diff)
4a-hal-unicens: updated json and removed conc acc.
- updated also app templates - removed concurrent access for debugging - removed interfacing for agl-service unicens for debugging Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com>
Diffstat (limited to 'plugin/most_unicens.c')
-rw-r--r--plugin/most_unicens.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/plugin/most_unicens.c b/plugin/most_unicens.c
index a99ce9e..2a36954 100644
--- a/plugin/most_unicens.c
+++ b/plugin/most_unicens.c
@@ -41,11 +41,10 @@ static uint8_t initialized = 0;
// Call at initialisation time
CTLP_ONLOAD(plugin, callbacks)
-{
- AFB_ApiNotice(plugin->api, "4A-HAL-UNICENS: Plugin Register: uid='%s' 'info='%s'", plugin->uid, plugin->info);
-
- unicensHalApiHandle = plugin->api;
-
+{
+ unicensHalApiHandle = plugin->api;
+ AFB_ApiNotice(unicensHalApiHandle, "4A-HAL-UNICENS: Plugin Register: uid='%s' 'info='%s'", plugin->uid, plugin->info);
+
return 0;
}
@@ -56,6 +55,9 @@ CTLP_CAPI(MasterVol, source, argsJ, queryJ)
json_object *valueJ;
AFB_ApiNotice(source->api, "4A-HAL-UNICENS: MasterVolume=%s", json_object_to_json_string(queryJ));
+
+ //debug
+ return 0;
if(! initialized) {
AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set master volume, value=%s", __func__, json_object_get_string(queryJ));
@@ -85,6 +87,9 @@ CTLP_CAPI(MasterSwitch, source, argsJ, queryJ)
json_object *valueJ;
AFB_ApiNotice(source->api, "4A-HAL-UNICENS: MasterSwitch=%s", json_object_to_json_string(queryJ));
+
+ //debug
+ return 0;
if(! initialized) {
AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set master switch, value=%s", __func__, json_object_get_string(queryJ));
@@ -126,6 +131,9 @@ CTLP_CAPI(PCMVol, source, argsJ, queryJ)
json_object *valueJ;
AFB_ApiNotice(source->api, "4A-HAL-UNICENS: PCMVolume=%s", json_object_to_json_string(queryJ));
+
+ //debug
+ return 0;
if(! initialized) {
AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set PCM volume, value=%s", __func__, json_object_get_string(queryJ));
@@ -164,6 +172,9 @@ CTLP_CAPI(Init, source, argsJ, queryJ)
AFB_ApiNotice(source->api, "4A-HAL-UNICENS: Initializing 4a plugin");
+ // debug
+ return 0;
+#if 1
if((err = wrap_volume_init())) {
AFB_ApiError(source->api, "Failed to initialize wrapper for volume library");
return err;
@@ -178,9 +189,8 @@ CTLP_CAPI(Init, source, argsJ, queryJ)
// avoid muted volume to be persistent after boot.
//wrap_volume_master(source->api, 80);
//wrap_volume_pcm(source->api, pcm_volume, PCM_MAX_CHANNELS);
-
+#endif
AFB_ApiNotice(source->api, "4A-HAL-UNICENS: Initializing plugin done..");
-
initialized = 1;
return 0;
@@ -194,6 +204,9 @@ CTLP_CAPI(Events, source, argsJ, queryJ)
int error = false;
json_object *j_tmp = NULL;
+ //debug
+ return 0;
+
if (initialized == 0) {
AFB_ApiError(source->api, "4A-HAL-UNICENS: Not initialized while receiving event query=%s", json_object_to_json_string(queryJ));
return 0;