[alsa-devel] [PATCH - ucm 1/1] ucm: set active_verb when set_verb was successful

nrubinstein at aldebaran-robotics.com nrubinstein at aldebaran-robotics.com
Wed Jun 4 18:52:25 CEST 2014


From: Noé Rubinstein <nrubinstein at aldebaran-robotics.com>

This seems to be a bug: execute_sequence returns zero on success,
therefore the current code changes the active_verb iff execute_sequence
failed.

Signed-off-by: Noé Rubinstein <nrubinstein at aldebaran-robotics.com>

diff --git a/src/ucm/main.c b/src/ucm/main.c
index 0494728..3c0d7e4 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -623,7 +623,7 @@ static int set_verb(snd_use_case_mgr_t *uc_mgr,
 			       &verb->value_list,
 			       &uc_mgr->value_list,
 			       NULL);
-	if (enable && err >= 0)
+	if (enable && err == 0)
 		uc_mgr->active_verb = verb;
 	return err;
 }
-- 
1.9.2



More information about the Alsa-devel mailing list