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.c14
1 files changed, 9 insertions, 5 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 f69be5a..56dc840 100644
--- a/src/4a-internals-hal/4a-internals-hal-mixer-link.c
+++ b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
@@ -172,9 +172,13 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
}
switch(currentHalData->status) {
+ case HAL_STATUS_INIT_FAILED:
+ AFB_API_ERROR(apiHandle, "Seems that the hal initialization failed, will not be able to attach this hal");
+ return -4;
+
case HAL_STATUS_UNAVAILABLE:
AFB_API_ERROR(apiHandle, "Seems that the hal corresponding card was not found by alsacore at startup");
- return -4;
+ return -5;
case HAL_STATUS_READY:
AFB_API_NOTICE(apiHandle, "Seems that the hal mixer is already initialized");
@@ -187,7 +191,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall = currentHalData->internalHalData->mixerApiName;
if(! apiToCall) {
AFB_API_ERROR(apiHandle, "Can't get mixer api");
- return -5;
+ return -6;
}
dependencyJ = HalUtlGetJsonArrayForAllDependencies(apiHandle,
@@ -195,7 +199,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
DEPENDENCY_COMPACT_JSON);
if(! dependencyJ) {
AFB_API_ERROR(apiHandle, "Didn't succeed to generate available dependencies compact json array");
- return -6;
+ return -7;
}
requestJ = wrap_json_clone(currentHalData->internalHalData->halMixerJ);
@@ -214,7 +218,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
returnedError ? returnedError : "not returned",
returnedInfo ? returnedInfo : "not returned");
- err = -7;
+ err = -8;
}
else if(! responseJ) {
AFB_API_WARNING(apiHandle,
@@ -231,7 +235,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
mixerError,
json_object_get_string(responseJ));
- err = -8;
+ err = -9;
}
else if(mixerError > 0) {
AFB_API_WARNING(apiHandle,