Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9043300pxu; Mon, 28 Dec 2020 05:14:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuX+xw3wL+oTWVPvVGwAjoa6i3qtuDlxLKc6NogGNRaNTlegkPT3ELLYUId/6f/VSMIeZG X-Received: by 2002:a17:907:20f1:: with SMTP id rh17mr41673302ejb.147.1609161297469; Mon, 28 Dec 2020 05:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161297; cv=none; d=google.com; s=arc-20160816; b=UySZW+47vmwuxopfaaSdMkA282FUTzCkXAdhfs1fX3GIS+v14QiXBxeNGQQvGBzlyq E6TuIhMK0lYBxCAucuOvDiCu6DDxcRsfpggKvG+SOET5xjNu1YIG/xuKrW7UQc0A8F+h J+EVCtBZ3Fotr2xfUd/Fq+wLtQ2jNN5Gib4dzgiRRm8T/dvbz3Khgf6w9XYYtLz8Wewq EwV/wFoMn4ZT9BMPpR10LDnxz4WH0+jI9+kATpU+gqPYP13yWbSmnGNMjQOtB4SqYima i7QMMyRauw+xTpVFEGt988lxQN/oBFeB7RMswSz9a06SV+aGz7cImqIEAr1NkbTydi15 vTtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lr9CWsFt5t8X3FTxKRi04um+4CGYJS6uyFDi7qVOXzA=; b=Q9yifwEae/hXxzi0rcqBrMNExsCgCkZpwplr/daa55f4rZyLsV6lQWxJ4+5llGQlB6 wb7gnEGPTyYT3FM11FZmX+kYxOFGmNaa+xrGVCf/jTzhLiZV+4UzScaEMRx08BTFnTbf Ok1IUV6efFCe5VMoeDl0md+elyQZ0BhoOrGn22vcTddPcltGZuYZZDe5+Dk4q6+Xrjsz nBpMbE0/tupfNHUPkkkrKJLGPkiXUM8aCqDSUXGWGPNk1ZJAhb3YBvIaTLavIEz/udTO semrXRdmp2wX+fMiQqk+tAmW8n9pVAO/5s/vbz9ZqDsVddfEc1fO+/pb+hB45wQhTOek qH8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ElcEqNXi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si18713859ejd.293.2020.12.28.05.14.34; Mon, 28 Dec 2020 05:14:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ElcEqNXi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732081AbgL1NMb (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:39606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731979AbgL1NMN (ORCPT ); Mon, 28 Dec 2020 08:12:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 25A9720728; Mon, 28 Dec 2020 13:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161117; bh=c4B3fO1OtDoA3nScQPDsP5CUgnB+CtrDeTI9K8bCwjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ElcEqNXiHUVHM/KCv8e5oKOynpDo9m7kOvk4pHmnyIPB8VqUetYbhKGde6mAafRqm yZ8+QtTvhEzpEx1JsTnJ+rBvTyGI4ApuWKmQuMbLCWUX5f5zh72lvatVhQIuscFG7k tv0g18X5rg8TKMPC76RTGRAzCHcF3Y+UJ/nQyOOM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cezary Rojewski , Ranjani Sridharan , Mark Brown , Sasha Levin Subject: [PATCH 4.14 077/242] ASoC: pcm: DRAIN support reactivation Date: Mon, 28 Dec 2020 13:48:02 +0100 Message-Id: <20201228124908.478135413@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Cezary Rojewski [ Upstream commit 4c22b80f61540ea99d9b4af0127315338755f05b ] soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel v5.4 where explicit switch(cmd) has been introduced which takes into account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update switch statement to reactive support for it. As DRAIN is somewhat unique by lacking negative/stop counterpart, bring behaviour of dpcm_fe_dai_do_trigger() for said command back to its pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group. Fixes: acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on the command") Signed-off-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201026100129.8216-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-pcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index fd4b71729eedd..e995e96ab9030 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2172,6 +2172,7 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_DRAIN: ret = dpcm_dai_trigger_fe_be(substream, cmd, true); break; case SNDRV_PCM_TRIGGER_STOP: @@ -2189,6 +2190,7 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_DRAIN: ret = dpcm_dai_trigger_fe_be(substream, cmd, false); break; case SNDRV_PCM_TRIGGER_STOP: -- 2.27.0