summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/4a-internals-hal/4a-internals-hal-mixer-link.c21
1 files changed, 16 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 d5b9be9..985de96 100644
--- a/src/4a-internals-hal/4a-internals-hal-mixer-link.c
+++ b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
@@ -162,7 +162,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
struct HalData *currentHalData;
- json_object *responseJ = NULL;
+ json_object *requestJ, *dependencyJ, *responseJ = NULL;
if(! apiHandle) {
AFB_API_ERROR(apiHandle, "Can't get current internal hal api handle");
@@ -200,10 +200,21 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
return -5;
}
+ dependencyJ = HalUtlGetJsonArrayForAvailableDependencies(apiHandle,
+ &currentHalData->internalHalData->probedDevicesList,
+ DEPENDENCY_COMPACT_JSON);
+ if(! dependencyJ) {
+ AFB_API_ERROR(apiHandle, "Didn't succeed to generate available dependencies compact json array");
+ return -6;
+ }
+
+ requestJ = wrap_json_clone(currentHalData->internalHalData->halMixerJ);
+ json_object_object_add(requestJ, "hal-dependencies", dependencyJ);
+
if(afb_api_call_sync(apiHandle,
apiToCall,
MIXER_ATTACH_VERB,
- json_object_get(currentHalData->internalHalData->halMixerJ),
+ requestJ,
&responseJ,
&returnedError,
&returnedInfo)) {
@@ -213,14 +224,14 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
returnedError ? returnedError : "not returned",
returnedInfo ? returnedInfo : "not returned");
- err = -6;
+ err = -7;
}
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 = -7;
+ err = -8;
}
else {
mixerError = InternalHalHandleMixerAttachResponse(apiHandle, currentHalData->internalHalData, responseJ);
@@ -231,7 +242,7 @@ int InternalHalAttachToMixer(afb_api_t apiHandle)
apiToCall,
mixerError,
json_object_get_string(responseJ));
- err = -8;
+ err = -9;
}
else {
AFB_API_NOTICE(apiHandle,