summaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-06-18 18:00:13 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-06-25 11:17:11 +0200
commitf29775f7da003bbadb44dd82d8b3974aa1e59274 (patch)
tree8da03e19eddce80fa065c1f16cbf428542f7da63 /lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
parentbdec00ada0634d039b91ec6d5b9793be2b68823c (diff)
Use of linked list for 'halmap' data
Use of linked list for 'halmap' data instead of a fixed array. It uses the same mechanism already implemented for other linked list. BUG-AGL: SPEC-2329 Change-Id: I2ff9c9a797a5547cd74f0240c5b7573a02c90781 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h b/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
index 3a4c885..88b3e44 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
+++ b/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
@@ -20,6 +20,8 @@
#include <stdio.h>
+#include <urcu/list.h>
+
#include <json-c/json.h>
#include <alsa/asoundlib.h>
@@ -50,27 +52,24 @@ struct InternalHalAlsaCtl {
char *name;
int numid;
int value;
+
struct InternalHalAlsaCtlProperties alsaCtlProperties;
struct InternalHalAlsaCtlProperties *alsaCtlCreation;
};
struct InternalHalAlsaMap {
- const char *uid;
+ char *uid;
char *info;
+
afb_event_t alsaControlEvent;
+
struct InternalHalAlsaCtl ctl;
+
json_object *actionJ;
+
CtlActionT *action;
-};
-struct InternalHalAlsaMapT {
- struct InternalHalAlsaMap *ctls;
- unsigned int ctlsCount;
+ struct cds_list_head node;
};
-// Internal Hal - ALSA controls data handling functions
-json_object *HalUtGetJsonArrayForSpecificControl(afb_api_t apiHandle, struct InternalHalAlsaMap *currentAlsaMapData);
-json_object *HalUtGetJsonArrayForAllControls(afb_api_t apiHandle, struct InternalHalAlsaMapT *currentAlsaMapDataT);
-int HalUtlFreeAlsaCtlsMap(struct InternalHalAlsaMapT *alsaCtlsMap);
-
#endif /* _HAL_UTILITIES_ALSA_DATA_INCLUDE_ */ \ No newline at end of file