aboutsummaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities/4a-hal-utilities-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-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-data.h')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.h b/lib/4a-hal-utilities/4a-hal-utilities-data.h
index 1571485..1ecfe00 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.h
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.h
@@ -38,7 +38,8 @@
enum LinkedListType {
LINKED_LIST_FOR_DEPENDENCIES_DATA = 0,
LINKED_LIST_FOR_MIXER_DATA = 1,
- LINKED_LIST_FOR_HAL_DATA = 2
+ LINKED_LIST_FOR_HALMAP_DATA = 2,
+ LINKED_LIST_FOR_HAL_DATA = 3
};
// Enum for hal status
@@ -116,7 +117,7 @@ struct InternalHalData {
struct cds_list_head streamsDataListHead;
afb_event_t streamUpdates;
- struct InternalHalAlsaMapT *alsaMapT;
+ struct cds_list_head halMapListHead;
afb_api_t apiHandle;
CtlConfigT *ctrlConfig;
@@ -191,6 +192,16 @@ struct InternalHalMixerData *HalUtlSearchMixerDataByProperties(struct cds_list_h
json_object *HalUtlGetJsonArrayForSpecificMixerData(afb_api_t apiHandle, struct InternalHalMixerData *mixerData);
json_object *HalUtlGetJsonArrayForAllMixersData(afb_api_t apiHandle, struct cds_list_head *mixerDataListHead);
+// Internal Hal - Alsa Map data handling functions
+struct InternalHalAlsaMap *HalUtlAddHalMapDataToHalMapDataList(struct cds_list_head *halMapListHead);
+int HalUtlRemoveSelectedHalMapData(struct cds_list_head *halMapListHead,
+ struct InternalHalAlsaMap *halMapDataToRemove);
+int HalUtlRemoveAllHalMapData(struct cds_list_head *halMapListHead);
+int HalUtlGetNumberOfHalMapDataInList(struct cds_list_head *halMapListHead);
+json_object *HalUtGetJsonArrayForSpecificHalMapControl(afb_api_t apiHandle,
+ struct InternalHalAlsaMap *currentHalMapData);
+json_object *HalUtGetJsonArrayForAllHalMapControls(afb_api_t apiHandle, struct cds_list_head *halMapListHead);
+
// Hal data handling functions
struct HalData *HalUtlAddHalToHalList(struct cds_list_head *halDataListHead);
int HalUtlRemoveSelectedHalFromList(struct cds_list_head *halDataListHead, struct HalData *halToRemove);