From b45add1e046f562ff3d6260356774efe0296d879 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Mon, 17 Sep 2018 15:19:19 +0200 Subject: Move mixer attach into its controller section As the mixer section is obtained during a call of a controller section callback (during api pre-initilization), 'attach' call to 'mixer' has been moved in the same callback (called a second time during api initialization). Change-Id: I17f54aab1b9616649bfcb183297ba8128621a7c2 Signed-off-by: Jonathan Aillet --- 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c') 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 a5d9c7a..92eed86 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 @@ -72,8 +72,6 @@ static AFB_ApiVerbs CtlHalDynApiStaticVerbs[] = static int HalCtlsInitOneApi(AFB_ApiT apiHandle) { - int err; - CtlConfigT *ctrlConfig; struct SpecificHalData *currentCtlHalData; @@ -109,16 +107,10 @@ static int HalCtlsInitOneApi(AFB_ApiT apiHandle) currentCtlHalData->sndCardId = HalCtlsGetCardIdByCardPath(apiHandle, currentCtlHalData->sndCardPath); - if(currentCtlHalData->sndCardId < 0) { + if(currentCtlHalData->sndCardId < 0) currentCtlHalData->status = HAL_STATUS_UNAVAILABLE; - } - else { + else currentCtlHalData->status = HAL_STATUS_AVAILABLE; - if((err = HalCtlsAttachToMixer(apiHandle))) { - AFB_ApiError(apiHandle, "Error %i while attaching to mixer", err); - return -4; - } - } // TBD JAI: handle refresh of hal status for dynamic card (/dev/by-id) -- cgit 1.2.3-korg