summaryrefslogtreecommitdiffstats
path: root/mixer-binding/mixer-binding.c
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-07-11 17:50:44 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-07-11 17:50:44 +0200
commit283bf0a4ab7dbd6f4393f6a1b4ef5a201ee92f62 (patch)
treed0ece00821901244465ef5fb3694389430db3085 /mixer-binding/mixer-binding.c
parentafd9f87786fe0cc3070ec976b89399603112c845 (diff)
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 <thierry.bultel@iot.bzh>
Diffstat (limited to 'mixer-binding/mixer-binding.c')
-rw-r--r--mixer-binding/mixer-binding.c11
1 files changed, 9 insertions, 2 deletions
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.