From 283bf0a4ab7dbd6f4393f6a1b4ef5a201ee92f62 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Wed, 11 Jul 2018 17:50:44 +0200 Subject: stops the read/write loop when the stream is muted when the stream is muted (due to the configuration, or due to a HAL request), the read/write loop is stopped. The benefit is that muting will work with capture devices that do not implement the mute in their driver. The inconvenient of stopping the read loop is that it has made appear an unexpected side-effect: the poll on capture does not trig for further incoming frames. The workaround is to completely close, then reopen and configure the capture PCM. Signed-off-by: Thierry Bultel --- mixer-binding/mixer-binding.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mixer-binding') diff --git a/mixer-binding/mixer-binding.c b/mixer-binding/mixer-binding.c index f79ccdb..3af9c9b 100644 --- a/mixer-binding/mixer-binding.c +++ b/mixer-binding/mixer-binding.c @@ -56,7 +56,12 @@ STATIC int CtrlLoadStaticVerbs (afb_dynapi *apiHandle, AFB_ApiVerbs *verbs) { int errcount=0; for (int idx=0; verbs[idx].verb; idx++) { - errcount+= afb_dynapi_add_verb(apiHandle, CtrlApiVerbs[idx].verb, CtrlApiVerbs[idx].info, CtrlApiVerbs[idx].callback, (void*)&CtrlApiVerbs[idx], CtrlApiVerbs[idx].auth, 0); + errcount+= afb_dynapi_add_verb(apiHandle, + CtrlApiVerbs[idx].verb, + CtrlApiVerbs[idx].info, + CtrlApiVerbs[idx].callback, + (void*)&CtrlApiVerbs[idx], + CtrlApiVerbs[idx].auth, 0); } return errcount; @@ -96,7 +101,8 @@ OnErrorExit: PUBLIC int afbBindingEntry(afb_dynapi *apiHandle) { AFB_default = apiHandle; - AFB_ApiNotice (apiHandle, "Controller in afbBindingVdyn"); + + AFB_ApiNotice (apiHandle, "Controller in afbBindingEntry"); const char *dirList= getenv("CONTROL_CONFIG_PATH"); if (!dirList) dirList=CONTROL_CONFIG_PATH; @@ -121,6 +127,7 @@ PUBLIC int afbBindingEntry(afb_dynapi *apiHandle) { AFB_ApiNotice (apiHandle, "Controller API='%s' info='%s'", ctrlConfig->api, ctrlConfig->info); // create one API per config file (Pre-V3 return code ToBeChanged) + int status = afb_dynapi_new_api(apiHandle, ctrlConfig->api, ctrlConfig->info, 1, CtrlLoadOneApi, ctrlConfig); // config exec should be done after api init in order to enable onload to use newly defined ctl API. -- cgit 1.2.3-korg