From patchwork Wed Jun 4 16:52:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: nrubinstein@aldebaran-robotics.com X-Patchwork-Id: 4303701 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7716C9F326 for ; Thu, 5 Jun 2014 06:49:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE9DF202F2 for ; Thu, 5 Jun 2014 06:49:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 890DC20274 for ; Thu, 5 Jun 2014 06:49:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BD3E2265527; Thu, 5 Jun 2014 08:49:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 63C202617A4; Thu, 5 Jun 2014 08:48:39 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8A0C826514A; Wed, 4 Jun 2014 18:53:05 +0200 (CEST) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by alsa0.perex.cz (Postfix) with ESMTP id 6857A2650AF for ; Wed, 4 Jun 2014 18:52:44 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id q59so8618475wes.21 for ; Wed, 04 Jun 2014 09:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aldebaran-robotics.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=cmn74bGw4L7Te+bHCrY86VfXkBnmFi05KV3K4Sj41D0=; b=VQP772eFVxq28jNftqrHIgrX+CPqOOC78MrgUiS8OzPDwUTj7aDdBvU2vn4mRXHYFX FC+TDXYSu4p5veqbftncX4f7M8RqyhkoSP3Q3X1cLCehFw9pr3dz8GrbQjaWKzshzywN jNmzjtMp+mirqil/C2bP74++vLXgosRw98nOQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=cmn74bGw4L7Te+bHCrY86VfXkBnmFi05KV3K4Sj41D0=; b=C5AtTuNXUIHp9pUQHUv7WQ7lTmtO0MKRnjOg4GWnlkKNgLRHcixVoRViN0sZjCLJKY rMfMOnebvPIrlsjM9BUZGfsfdruryoOicc583wF8L7G9ZdtZJUCWh4dppyTQdwl/+0m4 2W4WscA0BZRT7HDRdUEaDQAhagKkXvUwsEZCcccYTjvbo1/+GWhSNExU6Udp7hO4wm6c b9YDePTsIHE3BDj7huIyWPtTURg7bBq9B7qmYF++6Sc/Sv5GNahq44/AYZ/TG8tcjFyI QiY2U9dhB/87QbF24aa/4PAFGXy6t4i//yHwMM3Ld/IJJ0SC9z6mNqHpkYVEEpCHMCQo Z1+A== X-Gm-Message-State: ALoCoQnn/tMHWljbBRBzsfKJkdVDNvr6kRl9Lw6tx+tVJT2yNYbOHqHKxVnY0ITLk/u12nzZZj6R X-Received: by 10.181.8.67 with SMTP id di3mr7105433wid.8.1401900762874; Wed, 04 Jun 2014 09:52:42 -0700 (PDT) Received: from nrubinstein-de.aldebaran.lan ([46.218.232.202]) by mx.google.com with ESMTPSA id s9sm49217592wix.13.2014.06.04.09.52.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jun 2014 09:52:42 -0700 (PDT) From: nrubinstein@aldebaran-robotics.com To: patch@alsa-project.org Date: Wed, 4 Jun 2014 18:52:25 +0200 Message-Id: <1401900745-22796-1-git-send-email-nrubinstein@aldebaran-robotics.com> X-Mailer: git-send-email 2.0.0.rc2 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 05 Jun 2014 08:48:37 +0200 Cc: =?UTF-8?q?No=C3=A9=20Rubinstein?= , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH - ucm 1/1] ucm: set active_verb when set_verb was successful X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Noé Rubinstein 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 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; }