summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
diff options
context:
space:
mode:
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.c8
1 files changed, 5 insertions, 3 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 e634521..e11f989 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
@@ -105,10 +105,12 @@ static int HalCtlsInitOneApi(AFB_ApiT apiHandle)
currentCtlHalData->ctlHalSpecificData->ctlHalStreamsData.count = 0;
- if(HalCtlsGetCardIdByCardPath(apiHandle, currentCtlHalData))
- currentCtlHalData->status = HAL_STATUS_AVAILABLE;
- else
+ currentCtlHalData->sndCardId = HalCtlsGetCardIdByCardPath(apiHandle, currentCtlHalData->sndCard);
+
+ if(currentCtlHalData->sndCardId < 0)
currentCtlHalData->status = HAL_STATUS_UNAVAILABLE;
+ else
+ currentCtlHalData->status = HAL_STATUS_AVAILABLE;
// TBD JAI: handle refresh of hal status for dynamic card (/dev/by-id)