summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-09-17 15:19:19 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:57:27 +0200
commitb45add1e046f562ff3d6260356774efe0296d879 (patch)
tree23c05978409262b4ba5e067fa3240caf848871bb /4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
parentdaff7a6ee4900e54dee42f5528a32ef50bd5bcab (diff)
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 <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c12
1 files changed, 2 insertions, 10 deletions
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)