From 1ffc6ec2e5377e53bd0a29628feab6e9da9902b4 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Tue, 15 Oct 2019 19:24:28 +0200 Subject: Prevent stop listening for control event on error Prevent stop listening for ALSA control events when control info and value was not possible to get. This error happen when a custom ALSA control is removed. BUG-AGL: SPEC-2897 Change-Id: Ie206247537715468f704e3c746d6e8744be23cf4 Signed-off-by: Jonathan Aillet --- alsa-binding/Alsa-RegEvt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/alsa-binding/Alsa-RegEvt.c b/alsa-binding/Alsa-RegEvt.c index b105288..faacb01 100644 --- a/alsa-binding/Alsa-RegEvt.c +++ b/alsa-binding/Alsa-RegEvt.c @@ -583,9 +583,8 @@ STATIC int sndCtlEventCB(sd_event_source* src, int fd, uint32_t revents, void* u err = alsaGetSingleCtl(sndHandle->evtHandle->ctlDev, elemId, &ctlRequest, QUERY_FULL); if(err) { - AFB_ERROR("Did not succeed to get control info and values"); - freeCardAlsaControlHandle(&sndHandle->evtHandle); - return -3; + AFB_WARNING("Did not succeed to get control info and values, a custom control may have been removed"); + return 0; } // If CTL as a value use it as container for response -- cgit 1.2.3-korg