summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal/4a-hal-controllers')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c2
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c4
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c15
3 files changed, 10 insertions, 11 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
index 4a1ca8f..a6f6895 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
@@ -175,7 +175,7 @@ int HalCtlsCreateApi(afb_api_t apiHandle, char *path, struct HalMgrData *HalMgrG
}
// Allocation of current hal controller data
- currentCtlHalData = HalUtlAddHalApiToHalList(&HalMgrGlobalData->first);
+ currentCtlHalData = HalUtlAddHalApiToHalList(&HalMgrGlobalData->halDataList);
if(! currentCtlHalData)
return -4;
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
index 98d8d53..c38b057 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
@@ -402,7 +402,7 @@ int HalCtlsHalMapConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *
* HAL controllers verbs functions *
******************************************************************************/
-json_object *HalCtlsGetJsonArrayForMixerDataTable(afb_api_t apiHandle, struct CtlHalMixerData **firstMixerData, enum MixerDataType dataType)
+json_object *HalCtlsGetJsonArrayForMixerDataTable(afb_api_t apiHandle, struct CtlHalMixerData **mixerDataList, enum MixerDataType dataType)
{
json_object *mixerDataArrayJ, *currentMixerDataJ;
@@ -419,7 +419,7 @@ json_object *HalCtlsGetJsonArrayForMixerDataTable(afb_api_t apiHandle, struct Ct
return NULL;
}
- currentMixerData = *firstMixerData;
+ currentMixerData = *mixerDataList;
while(currentMixerData) {
switch(dataType) {
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c
index a9908de..1839261 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c
@@ -38,7 +38,7 @@
* HAL controllers handle mixer calls functions *
******************************************************************************/
-int HalCtlsHandleMixerData(afb_api_t apiHandle, struct CtlHalMixerData **firstMixerData, json_object *currentDataJ, enum MixerDataType dataType)
+int HalCtlsHandleMixerData(afb_api_t apiHandle, struct CtlHalMixerData **mixerDataList, json_object *currentDataJ, enum MixerDataType dataType)
{
int idx, mixerDataNb, verbStart, size;
int err = (int) MIXER_NO_ERROR;
@@ -106,14 +106,14 @@ int HalCtlsHandleMixerData(afb_api_t apiHandle, struct CtlHalMixerData **firstMi
case MIXER_DATA_PLAYBACKS:
case MIXER_DATA_CAPTURES:
- currentMixerData = HalUtlAddMixerDataToMixerDataList(firstMixerData);
+ currentMixerData = HalUtlAddMixerDataToMixerDataList(mixerDataList);
currentMixerData->verb = strdup((dataType == MIXER_DATA_PLAYBACKS) ? HAL_PLAYBACK_ID : HAL_CAPTURE_ID);
currentMixerData->verbToCall = strdup(currentDataVerbName);
if((! currentMixerData->verb) ||
(! currentMixerData->verbToCall)) {
- HalUtlRemoveSelectedMixerData(firstMixerData, currentMixerData);
+ HalUtlRemoveSelectedMixerData(mixerDataList, currentMixerData);
err += (int) MIXER_ERROR_STREAM_ALLOCATION_FAILED;
}
break;
@@ -129,7 +129,7 @@ int HalCtlsHandleMixerData(afb_api_t apiHandle, struct CtlHalMixerData **firstMi
HAL_PLAYBACK_ID,
"Playback action transferred to mixer",
HalUtlActionOnPlayback,
- (void *) *firstMixerData,
+ (void *) *mixerDataList,
NULL,
0,
0)) {
@@ -143,7 +143,7 @@ int HalCtlsHandleMixerData(afb_api_t apiHandle, struct CtlHalMixerData **firstMi
HAL_CAPTURE_ID,
"Capture action transferred to mixer",
HalUtlActionOnCapture,
- (void *) *firstMixerData,
+ (void *) *mixerDataList,
NULL,
0,
0)) {
@@ -207,7 +207,6 @@ int HalCtlsAttachToMixer(afb_api_t apiHandle)
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData, *concurentHalData = NULL;
- struct SpecificHalData **firstHalData;
json_object *responseJ = NULL;
@@ -239,8 +238,8 @@ int HalCtlsAttachToMixer(afb_api_t apiHandle)
break;
}
- firstHalData = HalMngGetFirstHalData();
- if((concurentHalData = HalUtlSearchReadyHalDataByCardId(firstHalData, currentCtlHalData->sndCardId))) {
+ concurentHalData = HalUtlSearchReadyHalDataByCardId(HalMngGetHalDataList(), currentCtlHalData->sndCardId);
+ if(concurentHalData) {
AFB_API_ERROR(apiHandle,
"Trying to attach mixer for hal '%s' but the alsa device %i is already in use with mixer by hal '%s'",
currentCtlHalData->apiName,