Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17D7BC433F5 for ; Wed, 6 Apr 2022 19:03:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 428EA16F8; Wed, 6 Apr 2022 21:02:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 428EA16F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1649271782; bh=z46n1V+SALPEkIujB4sbb2f2fZc5Ybo+VbDmf7JWd1g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j0mTFJcsoy6ZEf20pZpJa652gPQLrHHNuj6wEgRG6CfvGDbWTEdAg0J4Ch+YaU9Sf yLwDpnBG5huifHTrQJFn9W2hYWb+K7tR4Oq48H5Hx1Kq4mS9PAIMAmDbcCtSN3emTm BVbLWAUxUL6x0uq1TVRwXuwWImKAg9x6ABidlNBM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 60793F80516; Wed, 6 Apr 2022 21:01:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81A49F80518; Wed, 6 Apr 2022 21:01:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D696DF800D1 for ; Wed, 6 Apr 2022 21:01:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D696DF800D1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CKhyRq2P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649271681; x=1680807681; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z46n1V+SALPEkIujB4sbb2f2fZc5Ybo+VbDmf7JWd1g=; b=CKhyRq2Pb1p1jd1J9TiAfwfYAjed+VY0XdozSww6AGy79ueN6BsAvqPm 78iWNP8XMAtM/MRJIHwmyjZF2CpqkdArnBBnUn4Bd0Nrmf6zWVd6H3e6W W5ARqjElzIl+mPjcs9oP4IiuhT5QQ/wS/aJRht96G69Ocd+47Ge8l1WMS NqiCby73fS76rcA0JXhGLH+yFd2C2OVxj4llGC4gzPeYU0X8zo+ByTYjQ l3MTeVjSwk7XcJ6KnjTxNAuFnSC9S1W5MhYSJYYezX+TLP6HU9vDgRdYf +vn1ZlTcJzPGjrcCCO2XUxQQk0qZhG1MYk/I0gmKp/sEgx6EO0X0H9HIf A==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248655786" X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="248655786" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 12:01:13 -0700 X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="570700470" Received: from cbok-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.252.137.86]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 12:01:12 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/2] ASoC: soc-pcm: improve BE transition for TRIGGER_START Date: Wed, 6 Apr 2022 14:00:56 -0500 Message-Id: <20220406190056.233481-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220406190056.233481-1-pierre-louis.bossart@linux.intel.com> References: <20220406190056.233481-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: tiwai@suse.de, Bard Liao , Ranjani Sridharan , Pierre-Louis Bossart , broonie@kernel.org, Rander Wang , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" When the BE was in PAUSED state, the correct trigger is PAUSE_RELEASE. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao --- sound/soc/soc-pcm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index e8700dd1839f..6f43db35a5c8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2122,6 +2122,13 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, if (be->dpcm[stream].be_start != 1) goto next; + if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) + ret = soc_pcm_trigger(be_substream, + SNDRV_PCM_TRIGGER_PAUSE_RELEASE); + else + ret = soc_pcm_trigger(be_substream, + SNDRV_PCM_TRIGGER_START); + ret = soc_pcm_trigger(be_substream, cmd); if (ret) { be->dpcm[stream].be_start--; -- 2.30.2