aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-08-11 08:18:05 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-08-11 08:24:20 +0200
commitc13952824e2cc110b9405e1bc9017801dd938ac0 (patch)
treec85896cd8453a103e30eb0d47b8d8448ea6dab4b
parenteb6a78be524aaee70fca55b86a7b065763591178 (diff)
Update to new Tempate
-rw-r--r--Controler-afb/CMakeLists.txt6
-rw-r--r--Controler-afb/ctl-binding.h7
-rw-r--r--Controler-afb/ctl-dispatch.c71
-rw-r--r--Controler-afb/ctl-lua.c106
-rw-r--r--Controler-afb/ctl-plugin-sample.c40
-rw-r--r--conf.d/CMakeLists.txt26
-rw-r--r--conf.d/alsa-sample/asoundrc.sample (renamed from conf.d/alsa/asoundrc.sample)0
-rw-r--r--conf.d/alsa-sample/ucm.sample/HDA Intel PCH.conf (renamed from conf.d/alsa/ucm.sample/HDA Intel PCH.conf)0
-rw-r--r--conf.d/alsa-sample/ucm.sample/HiFi.conf (renamed from conf.d/alsa/ucm.sample/HiFi.conf)0
-rw-r--r--conf.d/alsa-sample/ucm.sample/README (renamed from conf.d/alsa/ucm.sample/README)0
m---------conf.d/app-templates0
-rw-r--r--conf.d/cmake/config.cmake12
-rw-r--r--conf.d/ctl-rules/CMakeLists.txt (renamed from data/CMakeLists.txt)16
-rw-r--r--conf.d/ctl-rules/helloworld-lua-script.lua (renamed from data/helloworld-lua-script.lua)0
-rw-r--r--conf.d/ctl-rules/onload-control-policy.json (renamed from data/onload-control-policy.json)2
-rw-r--r--conf.d/ctl-rules/onload-control-script.lua (renamed from data/onload-control-script.lua)0
-rw-r--r--htdocs/CMakeLists.txt15
-rw-r--r--nbproject/configurations.xml100
18 files changed, 230 insertions, 171 deletions
diff --git a/Controler-afb/CMakeLists.txt b/Controler-afb/CMakeLists.txt
index 08bc377..64ea5e1 100644
--- a/Controler-afb/CMakeLists.txt
+++ b/Controler-afb/CMakeLists.txt
@@ -33,8 +33,7 @@ endmacro(SET_TARGET_GENSKEL)
PROJECT_TARGET_ADD(control-afb)
# Define project Targets
- ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-events.c ctl-dispatch.c ctl-lua.c
-)
+ ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-events.c ctl-dispatch.c ctl-lua.c)
# Generate API-v2 hat from OpenAPI json definition
SET_TARGET_GENSKEL(${TARGET_NAME} ctl-apidef)
@@ -64,7 +63,8 @@ PROJECT_TARGET_ADD(ctl-plugin-sample)
# Alsa Plugin properties
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- PREFIX "audio-"
+ PREFIX ${CTL_PLUGIN_PRE}
+ SUFFIX ${CTL_PLUGIN_EXT}
OUTPUT_NAME ${TARGET_NAME}
)
diff --git a/Controler-afb/ctl-binding.h b/Controler-afb/ctl-binding.h
index 77d1b6e..abcb2f4 100644
--- a/Controler-afb/ctl-binding.h
+++ b/Controler-afb/ctl-binding.h
@@ -28,6 +28,7 @@
#endif
#define STATIC static
+
// polctl-binding.c
PUBLIC int CtlBindingInit ();
@@ -50,6 +51,10 @@ typedef enum {
CTL_NONE=-1
} DispatchCtlEnumT;
+typedef enum {
+ CTL_SCAN_FLAT=0,
+ CTL_SCAN_RECURSIVE=1,
+} CtlScanDirModeT;
typedef enum {
CTL_MODE_NONE=0,
@@ -74,7 +79,7 @@ PUBLIC void ctlapi_dispatch (DispatchCtlEnumT control, afb_req request);
// ctl-lua.c
PUBLIC int LuaLibInit ();
-PUBLIC json_object* ScanForConfig (char* searchPath, char * pre, char *ext);
+PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, char *pre, char *ext);
PUBLIC void ctlapi_lua_docall (afb_req request);
PUBLIC void ctlapi_lua_dostring (afb_req request);
PUBLIC void ctlapi_lua_doscript (afb_req request);
diff --git a/Controler-afb/ctl-dispatch.c b/Controler-afb/ctl-dispatch.c
index cda3431..4fa1844 100644
--- a/Controler-afb/ctl-dispatch.c
+++ b/Controler-afb/ctl-dispatch.c
@@ -23,12 +23,10 @@
#include <string.h>
#include <dlfcn.h>
-
-#include <json-c/json_object.h>
-
#include "wrap-json.h"
#include "ctl-binding.h"
+typedef void*(*DispatchPluginInstallCbT)(const char* label, const char*version, const char*info);
typedef struct {
const char* label;
@@ -37,11 +35,11 @@ typedef struct {
DispatchActionT *actions;
} DispatchHandleT;
-
typedef struct {
const char* label;
const char *info;
const char *version;
+ void *context;
char *plugin;
void *dlHandle;
DispatchHandleT *onload;
@@ -56,8 +54,7 @@ PUBLIC void ctlapi_dispatch (DispatchCtlEnumT control, afb_req request) {
json_object* argsJ= afb_req_json(request);
int done=json_object_object_get_ex(argsJ, "closing", &tmpJ);
- if (done) return;
-
+ if (done) return;
}
// List Avaliable Configuration Files
@@ -69,15 +66,15 @@ PUBLIC void ctlapi_config (struct afb_req request) {
if (argsJ && json_object_object_get_ex (argsJ, "cfgpath" , &tmpJ)) {
dirList = strdup (json_object_get_string(tmpJ));
} else {
- dirList = strdup (CONTROL_DISPATCH_PATH);
- AFB_NOTICE ("CONFIG-MISSING: use default CONTROL_DISPATCH_PATH=%s", CONTROL_DISPATCH_PATH);
+ dirList = strdup (CONTROL_CONFIG_PATH);
+ AFB_NOTICE ("CONFIG-MISSING: use default CONTROL_CONFIG_PATH=%s", CONTROL_CONFIG_PATH);
}
// get list of config file
- struct json_object *responseJ = ScanForConfig(dirList, "onload", "json");
+ struct json_object *responseJ = ScanForConfig(dirList, CTL_SCAN_RECURSIVE, "onload", "json");
if (json_object_array_length(responseJ) == 0) {
- afb_req_fail(request, "CONFIGPATH:EMPTY", "No Config Found in CONTROL_DISPATCH_PATH");
+ afb_req_fail(request, "CONFIGPATH:EMPTY", "No Config Found in CONTROL_CONFIG_PATH");
} else {
afb_req_success(request, responseJ, NULL);
}
@@ -166,6 +163,7 @@ STATIC DispatchActionT *DispatchLoadActions (json_object *actionsJ) {
}
+
STATIC DispatchConfigT *DispatchLoadConfig (const char* filepath) {
json_object *dispatchConfigJ, *ignoreJ;
int err;
@@ -185,7 +183,7 @@ STATIC DispatchConfigT *DispatchLoadConfig (const char* filepath) {
DispatchConfigT *dispatchConfig = calloc (1, sizeof(DispatchConfigT));
if (metadataJ) {
- err= wrap_json_unpack(metadataJ, "{so,s?s,ss !}", "label", &dispatchConfig->label, "info",&dispatchConfig->info, "version",&dispatchConfig->version);
+ err= wrap_json_unpack(metadataJ, "{ss,s?s,ss !}", "label", &dispatchConfig->label, "info",&dispatchConfig->info, "version",&dispatchConfig->version);
if (err) {
AFB_ERROR ("DISPATCH-LOAD-CONFIG:METADATA Missing something label|version|[label] in %s", json_object_get_string(metadataJ));
goto OnErrorExit;
@@ -205,33 +203,44 @@ STATIC DispatchConfigT *DispatchLoadConfig (const char* filepath) {
if (dispatchConfig->plugin) {
// search for default policy config file
- json_object *pluginPathJ = ScanForConfig(CONTROL_PLUGIN_PATH , dispatchConfig->plugin, NULL);
+ json_object *pluginPathJ = ScanForConfig(CONTROL_PLUGIN_PATH , CTL_SCAN_RECURSIVE, dispatchConfig->plugin, NULL);
if (!pluginPathJ || json_object_array_length(pluginPathJ) == 0) {
AFB_ERROR ("DISPATCH-LOAD-CONFIG:PLUGIN Missing plugin=%s in path=%s", dispatchConfig->plugin, CONTROL_PLUGIN_PATH);
goto OnErrorExit;
}
- char *filename; char*dirpath;
- err= wrap_json_unpack (json_object_array_get_idx(pluginPathJ,1), "{s:s, s:s !}", "dirpath", &dirpath,"filename", &filename);
+ char *filename; char*fullpath;
+ err= wrap_json_unpack (json_object_array_get_idx(pluginPathJ,0), "{s:s, s:s !}", "fullpath", &fullpath,"filename", &filename);
if (err) {
AFB_ERROR ("DISPATCH-LOAD-CONFIG:PLUGIN HOOPs invalid plugin file path = %s", json_object_get_string(pluginPathJ));
goto OnErrorExit;
}
if (json_object_array_length(pluginPathJ) > 1) {
- AFB_WARNING ("DISPATCH-LOAD-CONFIG:PLUGIN plugin multiple instances in searchpath will use %s/%s", dirpath, filepath);
+ AFB_WARNING ("DISPATCH-LOAD-CONFIG:PLUGIN plugin multiple instances in searchpath will use %s/%s", fullpath, filepath);
}
-
- char filepath[255];
- strncpy(filepath, dirpath, sizeof(filepath));
- strncat(filepath, "/", sizeof(filepath));
- strncat(filepath, filename, sizeof(filepath));
- dispatchConfig->dlHandle = dlopen(filepath, RTLD_NOW);
+
+ char pluginpath[CONTROL_MAXPATH_LEN];
+ strncpy(pluginpath, fullpath, sizeof(pluginpath));
+ strncat(pluginpath, "/", sizeof(pluginpath));
+ strncat(pluginpath, filename, sizeof(pluginpath));
+ dispatchConfig->dlHandle = dlopen(pluginpath, RTLD_NOW);
if (!dispatchConfig->dlHandle) {
- AFB_ERROR ("DISPATCH-LOAD-CONFIG:PLIUGIN Fail to load filepath=%s err= %s", filepath, dlerror());
+ AFB_ERROR ("DISPATCH-LOAD-CONFIG:PLIUGIN Fail to load pluginpath=%s err= %s", pluginpath, dlerror());
goto OnErrorExit;
}
- }
+
+ ulong *ctlPluginMagic = (ulong*)dlsym(dispatchConfig->dlHandle, "CtlPluginMagic");
+ if (!ctlPluginMagic || *ctlPluginMagic != CTL_PLUGIN_MAGIC) {
+ AFB_ERROR("DISPATCH-LOAD-CONFIG:PLIUGIN symbol'CtlPluginMagic' missing or != CTL_PLUGIN_MAGIC plugin=%s", pluginpath);
+ goto OnErrorExit;
+ }
+
+ DispatchPluginInstallCbT ctlPluginInstall = dlsym(dispatchConfig->dlHandle, "CtlPluginOnload");
+ if (ctlPluginInstall) {
+ dispatchConfig->context = (*ctlPluginInstall) (dispatchConfig->label, dispatchConfig->version, dispatchConfig->info);
+ }
+ }
dispatchHandle->actions= DispatchLoadActions(actionsJ);
dispatchConfig->onload= dispatchHandle;
@@ -275,21 +284,21 @@ PUBLIC int DispatchInit () {
// search for default dispatch config file
- json_object* responseJ = ScanForConfig(CONTROL_DISPATCH_PATH, "onload", "json");
+ json_object* responseJ = ScanForConfig(CONTROL_CONFIG_PATH, CTL_SCAN_RECURSIVE,"onload", "json");
for (index=0; index < json_object_array_length(responseJ); index++) {
json_object *entryJ=json_object_array_get_idx(responseJ, index);
- char *filename; char*dirpath;
- err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "dirpath", &dirpath,"filename", &filename);
+ char *filename; char*fullpath;
+ err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "fullpath", &fullpath,"filename", &filename);
if (err) {
- AFB_ERROR ("DISPATCH-INIT HOOPs invalid config file path = %s", json_object_get_string(entryJ));
+ AFB_ERROR ("DISPATCH-INIT HOOPs invalid JSON entry= %s", json_object_get_string(entryJ));
goto OnErrorExit;
}
- if (strcasestr(filename, CONTROL_DISPATCH_FILE)) {
- char filepath[255];
- strncpy(filepath, dirpath, sizeof(filepath));
+ if (strcasestr(filename, CONTROL_CONFIG_FILE)) {
+ char filepath[CONTROL_MAXPATH_LEN];
+ strncpy(filepath, fullpath, sizeof(filepath));
strncat(filepath, "/", sizeof(filepath));
strncat(filepath, filename, sizeof(filepath));
ctlHandle = DispatchLoadConfig (filepath);
@@ -303,7 +312,7 @@ PUBLIC int DispatchInit () {
// no dispatch config found remove control API from binder
if (index == 0) {
- AFB_WARNING ("DISPATCH-INIT:WARNING No Control dispatch file [%s]", CONTROL_DISPATCH_FILE);
+ AFB_WARNING ("DISPATCH-INIT:WARNING No Control dispatch file [%s]", CONTROL_CONFIG_FILE);
}
AFB_NOTICE ("DISPATCH-INIT:SUCCES: Audio Control Dispatch Init");
diff --git a/Controler-afb/ctl-lua.c b/Controler-afb/ctl-lua.c
index 8b40e38..38a3d5f 100644
--- a/Controler-afb/ctl-lua.c
+++ b/Controler-afb/ctl-lua.c
@@ -70,66 +70,35 @@ typedef enum {
* https://stackoverflow.com/questions/45596493/lua-using-lua-newuserdata-from-lua-pcall
*/
-STATIC LuaAfbContextT *LuaCtxCheck (lua_State *luaState, int index) {
- LuaAfbContextT *afbContext;
- //luaL_checktype(luaState, index, LUA_TUSERDATA);
- //afbContext = (LuaAfbContextT *)luaL_checkudata(luaState, index, CTX_TOKEN);
- luaL_checktype(luaState, index, LUA_TLIGHTUSERDATA);
- afbContext = (LuaAfbContextT *) lua_touserdata(luaState, index);
- if (afbContext == NULL && afbContext->ctxMagic != CTX_MAGIC) {
- luaL_error(luaState, "Fail to retrieve user data context=%s", CTX_TOKEN);
- AFB_ERROR ("afbContextCheck error retrieving afbContext");
- return NULL;
- }
- return afbContext;
-}
-
-STATIC LuaAfbContextT *LuaCtxPush (lua_State *luaState, afb_req request, const char* info) {
- // LuaAfbContextT *afbContext = (LuaAfbContextT *)lua_newuserdata(luaState, sizeof(LuaAfbContextT));
- // luaL_setmetatable(luaState, CTX_TOKEN);
- LuaAfbContextT *afbContext = (LuaAfbContextT *)calloc(1, sizeof(LuaAfbContextT));
- lua_pushlightuserdata(luaState, afbContext);
- if (!afbContext) {
- AFB_ERROR ("LuaCtxPush fail to allocate user data context");
- return NULL;
- }
- afbContext->ctxMagic=CTX_MAGIC;
- afbContext->info=strdup(info);
- afbContext->request= request;
- return afbContext;
-}
-
-STATIC void LuaCtxFree (LuaAfbContextT *afbContext) {
- free (afbContext->info);
-}
-
// List Avaliable Configuration Files
-PUBLIC json_object* ScanForConfig (char* searchPath, char *pre, char *ext) {
+PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, char *pre, char *ext) {
json_object *responseJ;
- DIR *dirHandle;
char *dirPath;
char* dirList= strdup(searchPath);
size_t extLen=0;
- void ScanDir (char *dirpath) {
+ void ScanDir (char *searchPath) {
+ DIR *dirHandle;
struct dirent *dirEnt;
- dirHandle = opendir (dirPath);
+ dirHandle = opendir (searchPath);
if (!dirHandle) {
- AFB_NOTICE ("CONFIG-SCANNING dir=%s not readable", dirPath);
+ AFB_NOTICE ("CONFIG-SCANNING dir=%s not readable", searchPath);
return;
}
- AFB_NOTICE ("CONFIG-SCANNING:ctl_listconfig scanning: %s", dirPath);
+ //AFB_NOTICE ("CONFIG-SCANNING:ctl_listconfig scanning: %s", searchPath);
while ((dirEnt = readdir(dirHandle)) != NULL) {
// recursively search embedded directories ignoring any directory starting by '.' or '_'
- if (dirEnt->d_type == DT_DIR) {
+ if (dirEnt->d_type == DT_DIR && mode == CTL_SCAN_RECURSIVE) {
char newpath[CONTROL_MAXPATH_LEN];
if (dirEnt->d_name[0]=='.' || dirEnt->d_name[0]=='_') continue;
- strncpy(newpath, dirpath, sizeof(newpath));
+ strncpy(newpath, searchPath, sizeof(newpath));
strncat(newpath, "/", sizeof(newpath));
strncat(newpath, dirEnt->d_name, sizeof(newpath));
+ ScanDir(newpath);
+ continue;
}
// Unknown type is accepted to support dump filesystems
@@ -142,12 +111,12 @@ PUBLIC json_object* ScanForConfig (char* searchPath, char *pre, char *ext) {
if (ext && strcasecmp (ext, &dirEnt->d_name[extIdx])) continue;
struct json_object *pathJ = json_object_new_object();
- json_object_object_add(pathJ, "dirpath", json_object_new_string(dirPath));
+ json_object_object_add(pathJ, "fullpath", json_object_new_string(searchPath));
json_object_object_add(pathJ, "filename", json_object_new_string(dirEnt->d_name));
json_object_array_add(responseJ, pathJ);
}
- closedir(dirHandle);
}
+ closedir(dirHandle);
}
if (ext) extLen=strlen(ext);
@@ -162,6 +131,39 @@ PUBLIC json_object* ScanForConfig (char* searchPath, char *pre, char *ext) {
return (responseJ);
}
+STATIC LuaAfbContextT *LuaCtxCheck (lua_State *luaState, int index) {
+ LuaAfbContextT *afbContext;
+ //luaL_checktype(luaState, index, LUA_TUSERDATA);
+ //afbContext = (LuaAfbContextT *)luaL_checkudata(luaState, index, CTX_TOKEN);
+ luaL_checktype(luaState, index, LUA_TLIGHTUSERDATA);
+ afbContext = (LuaAfbContextT *) lua_touserdata(luaState, index);
+ if (afbContext == NULL && afbContext->ctxMagic != CTX_MAGIC) {
+ luaL_error(luaState, "Fail to retrieve user data context=%s", CTX_TOKEN);
+ AFB_ERROR ("afbContextCheck error retrieving afbContext");
+ return NULL;
+ }
+ return afbContext;
+}
+
+STATIC LuaAfbContextT *LuaCtxPush (lua_State *luaState, afb_req request, const char* info) {
+ // LuaAfbContextT *afbContext = (LuaAfbContextT *)lua_newuserdata(luaState, sizeof(LuaAfbContextT));
+ // luaL_setmetatable(luaState, CTX_TOKEN);
+ LuaAfbContextT *afbContext = (LuaAfbContextT *)calloc(1, sizeof(LuaAfbContextT));
+ lua_pushlightuserdata(luaState, afbContext);
+ if (!afbContext) {
+ AFB_ERROR ("LuaCtxPush fail to allocate user data context");
+ return NULL;
+ }
+ afbContext->ctxMagic=CTX_MAGIC;
+ afbContext->info=strdup(info);
+ afbContext->request= request;
+ return afbContext;
+}
+
+STATIC void LuaCtxFree (LuaAfbContextT *afbContext) {
+ free (afbContext->info);
+}
+
STATIC int LuaPushArgument (json_object *arg) {
switch (json_object_get_type(arg)) {
@@ -511,7 +513,7 @@ PUBLIC void LuaDoAction (LuaDoActionT action, afb_req request) {
// scan luascript search path once
static json_object *luaScriptPathJ =NULL;
- if (!luaScriptPathJ) luaScriptPathJ= ScanForConfig(CONTROL_LUA_PATH , NULL, "lua");
+ if (!luaScriptPathJ) luaScriptPathJ= ScanForConfig(CONTROL_LUA_PATH , CTL_SCAN_FLAT, NULL, "lua");
err= wrap_json_unpack (queryJ, "{s:s, s?o s?o !}", "script", &script,"args", &args, "arg", &args);
if (err) {
@@ -537,10 +539,10 @@ PUBLIC void LuaDoAction (LuaDoActionT action, afb_req request) {
}
for (index=0; index < json_object_array_length(luaScriptPathJ); index++) {
- char *filename; char*dirpath;
+ char *filename; char*fullpath;
json_object *entryJ=json_object_array_get_idx(luaScriptPathJ, index);
- err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "dirpath", &dirpath,"filename", &filename);
+ err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "fullpath", &fullpath,"filename", &filename);
if (err) {
AFB_ERROR ("LUA-DOSCRIPT HOOPs invalid LUA script path = %s", json_object_get_string(entryJ));
goto OnErrorExit;
@@ -548,8 +550,8 @@ PUBLIC void LuaDoAction (LuaDoActionT action, afb_req request) {
if (strcmp(filename, script)) continue;
- char filepath[255];
- strncpy(filepath, dirpath, sizeof(filepath));
+ char filepath[CONTROL_MAXPATH_LEN];
+ strncpy(filepath, fullpath, sizeof(filepath));
strncat(filepath, "/", sizeof(filepath));
strncat(filepath, filename, sizeof(filepath));
err= luaL_loadfile(luaState, filepath);
@@ -616,7 +618,7 @@ PUBLIC int LuaLibInit () {
int err, index;
// search for default policy config file
- json_object *luaScriptPathJ = ScanForConfig(CONTROL_LUA_PATH , "onload", "lua");
+ json_object *luaScriptPathJ = ScanForConfig(CONTROL_LUA_PATH , CTL_SCAN_RECURSIVE, "onload", "lua");
// open a new LUA interpretor
luaState = luaL_newstate();
@@ -636,15 +638,15 @@ PUBLIC int LuaLibInit () {
for (index=0; index < json_object_array_length(luaScriptPathJ); index++) {
json_object *entryJ=json_object_array_get_idx(luaScriptPathJ, index);
- char *filename; char*dirpath;
- err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "dirpath", &dirpath,"filename", &filename);
+ char *filename; char*fullpath;
+ err= wrap_json_unpack (entryJ, "{s:s, s:s !}", "fullpath", &fullpath,"filename", &filename);
if (err) {
AFB_ERROR ("LUA-INIT HOOPs invalid config file path = %s", json_object_get_string(entryJ));
goto OnErrorExit;
}
char filepath[CONTROL_MAXPATH_LEN];
- strncpy(filepath, dirpath, sizeof(filepath));
+ strncpy(filepath, fullpath, sizeof(filepath));
strncat(filepath, "/", sizeof(filepath));
strncat(filepath, filename, sizeof(filepath));
err= luaL_loadfile(luaState, filepath);
diff --git a/Controler-afb/ctl-plugin-sample.c b/Controler-afb/ctl-plugin-sample.c
index f232573..f7665f0 100644
--- a/Controler-afb/ctl-plugin-sample.c
+++ b/Controler-afb/ctl-plugin-sample.c
@@ -31,6 +31,20 @@ typedef struct {
int count;
} MyPluginCtxT;
+// This tag is mandotory and used as sanity check when loading plugin
+PUBLIC ulong CtlPluginMagic=CTL_PLUGIN_MAGIC;
+
+// Call at initialisation time
+PUBLIC void* CtlPluginOnload(char* label, char* version, char* info) {
+ MyPluginCtxT *pluginCtx= (MyPluginCtxT*)calloc (1, sizeof(MyPluginCtxT));
+ pluginCtx->magic = MY_PLUGIN_MAGIC;
+ pluginCtx->count = 0;
+
+ fprintf(stderr, "*** CONTROLER-PLUGIN-SAMPLE:Install label=%s version=%s info=%s", label, info, version);
+ AFB_NOTICE ("CONTROLER-PLUGIN-SAMPLE:Install label=%s version=%s info=%s", label, info, version);
+ return (void*)pluginCtx;
+}
+
STATIC const char* jsonToString (json_object *valueJ) {
const char *value;
if (valueJ)
@@ -41,24 +55,18 @@ STATIC const char* jsonToString (json_object *valueJ) {
return value;
}
-PUBLIC int SamplePolicyInstall (DispatchActionT *action, json_object *response, void *context) {
-
- MyPluginCtxT *pluginCtx= (MyPluginCtxT*)calloc (1, sizeof(MyPluginCtxT));
- pluginCtx->magic = MY_PLUGIN_MAGIC;
- pluginCtx->count = 0;
-
- AFB_INFO ("CONTROLER-PLUGIN-SAMPLE SamplePolicyInstall action=%s args=%s", action->label, jsonToString(action->argsJ));
-
- return 0;
-}
-PUBLIC int SamplePolicyCount (DispatchActionT *action, json_object *response, void *context) {
+PUBLIC void SamplePolicyCount (afb_req request, DispatchActionT *action, void *context) {
MyPluginCtxT *pluginCtx= (MyPluginCtxT*)context;
- //pluginCtx->magic = MY_PLUGIN_MAGIC;
- //pluginCtx->count = 0;
-
- AFB_INFO ("CONTROLER-PLUGIN-SAMPLE SamplePolicyCount action=%s args=%s count=%d", action->label, jsonToString(action->argsJ), pluginCtx->count);
- return 0;
+ if (!context || pluginCtx->magic != MY_PLUGIN_MAGIC) {
+ AFB_ERROR("CONTROLER-PLUGIN-SAMPLE:count (Hoops) Invalid Sample Plugin Context");
+ return;
+
+ };
+
+ pluginCtx->count++;
+
+ AFB_INFO ("CONTROLER-PLUGIN-SAMPLE:Count SamplePolicyCount action=%s args=%s count=%d", action->label, jsonToString(action->argsJ), pluginCtx->count);
}
diff --git a/conf.d/CMakeLists.txt b/conf.d/CMakeLists.txt
new file mode 100644
index 0000000..413fe8e
--- /dev/null
+++ b/conf.d/CMakeLists.txt
@@ -0,0 +1,26 @@
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <fulup@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+
+
+# Define subproject targets
+ADD_SUBDIRECTORY(ctl-rules)
+
+
+
+
diff --git a/conf.d/alsa/asoundrc.sample b/conf.d/alsa-sample/asoundrc.sample
index 1786c46..1786c46 100644
--- a/conf.d/alsa/asoundrc.sample
+++ b/conf.d/alsa-sample/asoundrc.sample
diff --git a/conf.d/alsa/ucm.sample/HDA Intel PCH.conf b/conf.d/alsa-sample/ucm.sample/HDA Intel PCH.conf
index f6608a0..f6608a0 100644
--- a/conf.d/alsa/ucm.sample/HDA Intel PCH.conf
+++ b/conf.d/alsa-sample/ucm.sample/HDA Intel PCH.conf
diff --git a/conf.d/alsa/ucm.sample/HiFi.conf b/conf.d/alsa-sample/ucm.sample/HiFi.conf
index 9a53c8c..9a53c8c 100644
--- a/conf.d/alsa/ucm.sample/HiFi.conf
+++ b/conf.d/alsa-sample/ucm.sample/HiFi.conf
diff --git a/conf.d/alsa/ucm.sample/README b/conf.d/alsa-sample/ucm.sample/README
index e7f08ae..e7f08ae 100644
--- a/conf.d/alsa/ucm.sample/README
+++ b/conf.d/alsa-sample/ucm.sample/README
diff --git a/conf.d/app-templates b/conf.d/app-templates
-Subproject 5b4dfe23ef1141d8f7595a157ca7a8ee5ad8ad0
+Subproject 8967162dd12bce89f9ae27f5c9bce7b78624e3f
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index 5b741d8..63c83b8 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -68,9 +68,15 @@ set (PKG_REQUIRED_LIST
# Define CONTROL_CDEV_NAME should match MOST driver values
# ---------------------------------------------------------
add_compile_options(-DCONTROL_MAXPATH_LEN=255)
- add_compile_options(-DCONTROL_DISPATCH_FILE="onload-control-policy.json")
- add_compile_options(-DCONTROL_DISPATCH_PATH="${CMAKE_CURRENT_BINARY_DIR}/Controler-afb:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/controler")
- add_compile_options(-DCONTROL_LUA_PATH="/etc/default/audio-agent/policy:$ENV{HOME}/.config/audio-agent:${CMAKE_INSTALL_PREFIX}/audio-agent/policy:${CMAKE_SOURCE_DIR}/data")
+ add_compile_options(-DCONTROL_CONFIG_FILE="onload-control-policy.json")
+ add_compile_options(-DCONTROL_CONFIG_PATH="${CMAKE_SOURCE_DIR}/conf.d:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/config")
+
+ add_compile_options(-DCONTROL_LUA_PATH="${CMAKE_SOURCE_DIR}/data:/etc/default/${PROJECT_NAME}/lua:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lua")
+
+
+ set (CTL_PLUGIN_PRE "audio-")
+ set (CTL_PLUGIN_EXT ".ctlso")
+ add_compile_options(-DCTL_PLUGIN_MAGIC=2468013579)
add_compile_options(-DCONTROL_PLUGIN_PATH="${BINDINGS_INSTALL_DIR}/controler:/usr/lib/${PROJECT_NAME}")
# Print a helper message when every thing is finished
diff --git a/data/CMakeLists.txt b/conf.d/ctl-rules/CMakeLists.txt
index 55ee664..51a3a46 100644
--- a/data/CMakeLists.txt
+++ b/conf.d/ctl-rules/CMakeLists.txt
@@ -17,27 +17,25 @@
###########################################################################
-
##################################################
# Control Policy Config file
##################################################
-PROJECT_TARGET_ADD(Control_config)
+PROJECT_TARGET_ADD(control-rules)
- file(GLOB XML_FILES "*.json")
+ file(GLOB XML_FILES "*.json" "*.lua")
add_custom_target(${TARGET_NAME}
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
+ DEPENDS ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
)
# check XML schema before pushing config
add_custom_command(
DEPENDS ${XML_FILES}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
# COMMAND xmllint -schema ${XML_SCHEMA} ${XML_FILES} --noout (Fulup we miss this for JSON)
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- COMMAND cp -r ${XML_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
+ COMMAND mkdir -p ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
+ COMMAND touch ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
+ COMMAND cp -r ${XML_FILES} ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
)
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
diff --git a/data/helloworld-lua-script.lua b/conf.d/ctl-rules/helloworld-lua-script.lua
index 7dd0459..7dd0459 100644
--- a/data/helloworld-lua-script.lua
+++ b/conf.d/ctl-rules/helloworld-lua-script.lua
diff --git a/data/onload-control-policy.json b/conf.d/ctl-rules/onload-control-policy.json
index 736e188..5c0c232 100644
--- a/data/onload-control-policy.json
+++ b/conf.d/ctl-rules/onload-control-policy.json
@@ -8,7 +8,7 @@
"onload": {
"label": "onload-config",
"info": "onload initialisation config",
- "plugin": "audio-ctl-plugin-sample.so",
+ "plugin": "audio-ctl-plugin-sample.ctlso",
"actions": [
{
"label": "onload-sample-cb",
diff --git a/data/onload-control-script.lua b/conf.d/ctl-rules/onload-control-script.lua
index f50bf7a..f50bf7a 100644
--- a/data/onload-control-script.lua
+++ b/conf.d/ctl-rules/onload-control-script.lua
diff --git a/htdocs/CMakeLists.txt b/htdocs/CMakeLists.txt
index 60f6cf8..e85ca3c 100644
--- a/htdocs/CMakeLists.txt
+++ b/htdocs/CMakeLists.txt
@@ -21,20 +21,20 @@
##################################################
# HTML Testing Files
##################################################
-PROJECT_TARGET_ADD(www_test)
+PROJECT_TARGET_ADD(htdocs)
file(GLOB SOURCE_FILES "*.html" "*.js" "*.jpg" "*.css")
add_custom_target(${TARGET_NAME}
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
+ DEPENDS ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
)
add_custom_command(
DEPENDS ${SOURCE_FILES}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
- COMMAND cp -r ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
+ OUTPUT ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
+ COMMAND mkdir -p ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
+ COMMAND touch ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
+ COMMAND cp -r ${SOURCE_FILES} ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
)
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
@@ -42,6 +42,3 @@ PROJECT_TARGET_ADD(www_test)
OUTPUT_NAME ${TARGET_NAME}
)
- # use only under native Linux when using "make install"
- install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} DESTINATION .)
-
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index a8b33db..225cd8f 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -116,8 +116,8 @@
<rebuildPropChanged>false</rebuildPropChanged>
</toolsSet>
<flagsDictionary>
- <element flagsID="0" commonFlags="-g -fPIC -fPIC -g"/>
- <element flagsID="1" commonFlags="-g -ggdb -fPIC -fPIC"/>
+ <element flagsID="0" commonFlags="-g -fPIC -fPIC"/>
+ <element flagsID="1" commonFlags="-g -fPIC -fPIC -g"/>
<element flagsID="2" commonFlags="-mtune=generic -march=x86-64 -g -fPIC"/>
<element flagsID="3" commonFlags="-mtune=generic -march=x86-64 -g -g -fPIC"/>
<element flagsID="4"
@@ -145,43 +145,43 @@
ex="false"
tool="0"
flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Alsa-afb/Alsa-AddCtl.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Alsa-afb/Alsa-ApiHat.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Alsa-afb/Alsa-RegEvt.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Alsa-afb/Alsa-SetGet.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Alsa-afb/Alsa-Ucm.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Audio-Common/audio-common.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Audio-Common/wrap-json.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="Common/AudioCommonLib.c" ex="false" tool="0" flavor2="2">
- <cTool flags="0">
+ <cTool flags="1">
</cTool>
</item>
<item path="Controler-afb/ctl-binding.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
<incDir>
<pElem>Audio-Common</pElem>
<pElem>build/Controler-afb</pElem>
@@ -192,7 +192,7 @@
</cTool>
</item>
<item path="Controler-afb/ctl-dispatch.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
<incDir>
<pElem>Audio-Common</pElem>
<pElem>build/Controler-afb</pElem>
@@ -203,7 +203,7 @@
</cTool>
</item>
<item path="Controler-afb/ctl-events.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
<incDir>
<pElem>Audio-Common</pElem>
<pElem>build/Controler-afb</pElem>
@@ -214,7 +214,7 @@
</cTool>
</item>
<item path="Controler-afb/ctl-lua.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
<incDir>
<pElem>Audio-Common</pElem>
<pElem>build/Controler-afb</pElem>
@@ -225,7 +225,7 @@
</cTool>
</item>
<item path="Controler-afb/ctl-plugin-sample.c" ex="false" tool="0" flavor2="2">
- <cTool flags="1">
+ <cTool flags="0">
<incDir>
<pElem>build/Controler-afb</pElem>
</incDir>
@@ -238,18 +238,18 @@
ex="false"
tool="0"
flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/HAL-interface/hal-volramp.c"
ex="false"
tool="0"
flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/HAL-interface/hal-volume.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/HAL-plugin/HalPlugPcm.c" ex="false" tool="0" flavor2="3">
@@ -257,21 +257,21 @@
</cTool>
</item>
<item path="HAL-afb/HDA-intel/IntelHdaHAL.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/Jabra-Solemate/JabraUsbHAL.c"
ex="false"
tool="0"
flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/Scarlett-Focusrite/ScarlettUsbHAL.c"
ex="false"
tool="0"
flavor2="3">
- <cTool flags="1">
+ <cTool flags="0">
</cTool>
</item>
<item path="HAL-afb/Unicens-USB/UnicensHAL.c" ex="false" tool="0" flavor2="3">
@@ -356,11 +356,12 @@
<pElem>build/Alsa-Plugin/Alsa-Policy-Hook</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>MAX_SND_CARD=16</Elem>
<Elem>PIC</Elem>
@@ -381,11 +382,12 @@
<pElem>build/Alsa-afb</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>MAX_SND_CARD=16</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
@@ -405,11 +407,12 @@
<pElem>build/Audio-Common</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>MAX_SND_CARD=16</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
@@ -442,11 +445,12 @@
<pElem>/usr/include/lua5.3</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>MAX_SND_CARD=16</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
@@ -477,11 +481,12 @@
<pElem>build/HAL-afb/HAL-interface</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
</preprocessorList>
@@ -512,11 +517,12 @@
<pElem>build/HAL-afb/HDA-intel</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
<Elem>hal_intel_hda_EXPORTS</Elem>
@@ -536,11 +542,12 @@
<pElem>build/HAL-afb/Jabra-Solemate</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
<Elem>hal_jabra_usb_EXPORTS</Elem>
@@ -560,11 +567,12 @@
<pElem>build/HAL-afb/Scarlett-Focusrite</pElem>
</incDir>
<preprocessorList>
- <Elem>CONTROL_DISPATCH_FILE="onload-control-policy.json"</Elem>
- <Elem>CONTROL_DISPATCH_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Controler-afb:/usr/local/audio-bindings/controler"</Elem>
- <Elem>CONTROL_LUA_PATH="/etc/default/audio-agent/policy:/home/fulup/.config/audio-agent:/usr/local/audio-agent/policy:/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data"</Elem>
+ <Elem>CONTROL_CONFIG_FILE="onload-control-policy.json"</Elem>
+ <Elem>CONTROL_CONFIG_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/conf.d:/usr/local/audio-bindings/config"</Elem>
+ <Elem>CONTROL_LUA_PATH="/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/data:/etc/default/audio-bindings/lua:/usr/local/audio-bindings/lua"</Elem>
<Elem>CONTROL_MAXPATH_LEN=255</Elem>
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/opt/audio-bindings/controler:/usr/lib/audio-bindings"</Elem>
+ <Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
<Elem>MAX_LINEAR_DB_SCALE=24</Elem>
<Elem>TLV_BYTE_SIZE=256</Elem>
<Elem>hal_scalett_usb_EXPORTS</Elem>