summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c15
1 files changed, 7 insertions, 8 deletions
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,