summaryrefslogtreecommitdiffstats
path: root/src/4a-internals-hal/4a-internals-hal-mixer-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/4a-internals-hal/4a-internals-hal-mixer-link.c')
-rw-r--r--src/4a-internals-hal/4a-internals-hal-mixer-link.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/4a-internals-hal/4a-internals-hal-mixer-link.c b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
index 3183081..553d58e 100644
--- a/src/4a-internals-hal/4a-internals-hal-mixer-link.c
+++ b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
@@ -28,8 +28,6 @@
#include "4a-hal-utilities-hal-streams-handler.h"
-#include "../4a-hal-manager/4a-hal-manager.h"
-
#include "4a-internals-hal-mixer-link.h"
#include "4a-internals-hal-cb.h"
@@ -222,7 +220,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
CtlConfigT *ctrlConfig;
- struct HalData *currentHalData, *concurentHalData = NULL;
+ struct HalData *currentHalData;
json_object *responseJ = NULL;
@@ -256,20 +254,10 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
break;
}
- concurentHalData = HalUtlSearchReadyHalDataByCardId(HalMngGetHalDataList(), currentHalData->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'",
- currentHalData->apiName,
- currentHalData->sndCardId,
- concurentHalData->apiName);
- return -5;
- }
-
apiToCall = currentHalData->internalHalData->mixerApiName;
if(! apiToCall) {
AFB_API_ERROR(apiHandle, "Can't get mixer api");
- return -6;
+ return -5;
}
if(afb_api_call_sync(apiHandle,
@@ -285,14 +273,14 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
returnedError ? returnedError : "not returned",
returnedInfo ? returnedInfo : "not returned");
- err = -7;
+ err = -6;
}
else if(! responseJ) {
AFB_API_ERROR(apiHandle,
"Seems that %s call to api %s succeed but no response was returned",
MIXER_ATTACH_VERB,
apiToCall);
- err = -8;
+ err = -7;
}
else {
mixerError = InternalHalHandleMixerAttachResponse(apiHandle, currentHalData->internalHalData, responseJ);
@@ -303,7 +291,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
mixerError,
json_object_get_string(responseJ));
- err = -9;
+ err = -8;
}
else {
AFB_API_NOTICE(apiHandle,