From 9ea8f82f17fa57a0648eb9b16d24957bba22f9f2 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Thu, 10 Jan 2019 12:08:56 +0100 Subject: Add event to indicate hal stream changes This event can be used to be notified when a stream has been added/removed from hal. Change-Id: I0511b948accf4d3dc25e5603cbaaf5f1da741b49 Signed-off-by: Jonathan Aillet --- 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 4 ++++ 1 file changed, 4 insertions(+) (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 0f63be7..0691cb5 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 @@ -106,6 +106,10 @@ static int HalCtlsInitOneApi(AFB_ApiT apiHandle) currentCtlHalData->sndCardId = HalCtlsGetCardIdByCardPath(apiHandle, currentCtlHalData->sndCardPath); + currentCtlHalData->ctlHalSpecificData->streamUpdates = AFB_EventMake(apiHandle, HAL_STREAM_UPDATES_EVENT_NAME); + if(! AFB_EventIsValid(currentCtlHalData->ctlHalSpecificData->streamUpdates)) + return -4; + if(currentCtlHalData->sndCardId < 0) currentCtlHalData->status = HAL_STATUS_UNAVAILABLE; else -- cgit 1.2.3-korg