From patchwork Mon May 12 12:12:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 4158761 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 138B0BFF02 for ; Mon, 12 May 2014 12:10:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 539E2202B4 for ; Mon, 12 May 2014 12:10:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DB879201E7 for ; Mon, 12 May 2014 12:10:42 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4C85C26501D; Mon, 12 May 2014 14:10:41 +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.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0E92626501D; Mon, 12 May 2014 14:10:30 +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 73F9B26504A; Mon, 12 May 2014 14:10:28 +0200 (CEST) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0057.outbound.protection.outlook.com [157.56.110.57]) by alsa0.perex.cz (Postfix) with ESMTP id 00A1B265019 for ; Mon, 12 May 2014 14:10:19 +0200 (CEST) Received: from BLUPR03CA034.namprd03.prod.outlook.com (10.141.30.27) by BLUPR03MB019.namprd03.prod.outlook.com (10.255.208.41) with Microsoft SMTP Server (TLS) id 15.0.944.11; Mon, 12 May 2014 12:10:17 +0000 Received: from BN1BFFO11FD052.protection.gbl (2a01:111:f400:7c10::1:181) by BLUPR03CA034.outlook.office365.com (2a01:111:e400:879::27) with Microsoft SMTP Server (TLS) id 15.0.934.12 via Frontend Transport; Mon, 12 May 2014 12:10:17 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD052.mail.protection.outlook.com (10.58.145.7) with Microsoft SMTP Server (TLS) id 15.0.939.9 via Frontend Transport; Mon, 12 May 2014 12:10:17 +0000 Received: from rio.ap.freescale.net (rio.ap.freescale.net [10.192.242.9]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s4CCABff012989; Mon, 12 May 2014 05:10:11 -0700 From: Nicolin Chen To: , Date: Mon, 12 May 2014 20:12:05 +0800 Message-ID: <1399896725-28083-1-git-send-email-Guangyu.Chen@freescale.com> X-Mailer: git-send-email 1.8.4 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(189002)(199002)(50986999)(92566001)(50226001)(77982001)(36756003)(83072002)(92726001)(85852003)(77156001)(46102001)(21056001)(77096999)(76482001)(62966002)(4396001)(6806004)(31966008)(84676001)(99396002)(47776003)(20776003)(81542001)(68736004)(19580405001)(87286001)(93916002)(81342001)(80022001)(86362001)(64706001)(74502001)(87936001)(48376002)(19580395003)(83322001)(81156002)(44976005)(2009001)(74662001)(69596002)(88136002)(97736001)(50466002)(89996001)(79102001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB019; H:az84smr01.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0209425D0A Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=guangyu.chen@freescale.com; X-OriginatorOrg: freescale.com Cc: tiwai@suse.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPEND 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 The regular state before we execute SNDRV_PCM_TRIGGER_SUSPEND should be SNDRV_PCM_TRIGGER_START, not SNDRV_PCM_TRIGGER_STOP. Thus fix it. Signed-off-by: Nicolin Chen --- sound/soc/soc-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 88230ea..49930bd 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1666,7 +1666,7 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; break; case SNDRV_PCM_TRIGGER_SUSPEND: - if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) + if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) continue; if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream))