Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9183028pxu; Mon, 28 Dec 2020 08:39:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRZ63rQZFRVIh5l8h3/uK0xxGt4RqBDV7SVuQ9cKZilMSLYvmLAfLDVoSC2qns8aWW7hmr X-Received: by 2002:a50:b944:: with SMTP id m62mr42495542ede.182.1609173552243; Mon, 28 Dec 2020 08:39:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173552; cv=none; d=google.com; s=arc-20160816; b=DcH85T+8WuWCFeJwIO8eRuAAYvttAVhhYiBypIbQ8wDzX+JGNYQXgWLgZmlgVnaovg jLKaB30GvSJKiYTMwYo/RGkpBd/A5qqnEG4kqbBVXEF/A4yfPIJmEFvw8D+nrMmY8H4W 8cxVhnjZfFRkSgOSMwNaW1u1wrFf3i8A1VUvE/ekB3SrThKZ21bjd2ECfSVPlFOePft2 n6dYK9c0y4uAlg4xIrefpwiwKtRr2tl2ubtggmIlVncEPrVbR+BKgpqTnxO8eo6yvZVZ egn5UM7SXa95CFQIB5uv8M7R50ufSe3vy7y4f8RhJMb9XnbNhNUsOkss1iImofmQu8JI 3zRA== 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=aE72OiuMpBrbTbx6izrD57Cjm/rr9AYo0dzSQL+upeI=; b=cy3EcyizYAHQJdmQmm8LxVSZEkAA0IDQHAnplJpV/+e7HAqzgLzyepgUXOqloaKBrt LAsdOKQUu2k9gHSzZZmKHYAmOm3poesdbHK2bYzFOrQOXBDx7ceG5ztTwX0tP10Ifo8E 7TkXWMokbVqK/nBZGUiC2OPNilJdGLsX8LaKs+Vr24X3mX/+6s2hiPScEstSVjSWco2H K2vslBRkWI2JpA2D1Pa7V/Dieswq31WCHA+/4j4HLqoCCs+aK0yi5Sei+2x9y06gdFne cqFHS15iYFWVwfpxo1aW7ExgGS1ZYcu21oIoJaWptApJsfNnmJ3ciLfVRWZFlXqa9neF /1FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xg3EALsW; 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 g2si21054319edn.508.2020.12.28.08.38.49; Mon, 28 Dec 2020 08:39:12 -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=xg3EALsW; 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 S2634171AbgL1Qem (ORCPT + 99 others); Mon, 28 Dec 2020 11:34:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:58450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730035AbgL1NCU (ORCPT ); Mon, 28 Dec 2020 08:02:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 621F1207C9; Mon, 28 Dec 2020 13:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160500; bh=HAMVm6AoUYyhIlRA9Npk1YxxQR2f9cCjvvkuOW5sLts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xg3EALsWCFN2NpWLERlAVmU6ie60EUVIG7XOd5yCAzFOvXC7aysgb/AdVlxPyGyID 2mI+Dtk9hT/IDbLNy0DQWRcXn9o84N7H5Cy3JbWhJTWLQRssuayvP0J/uSkco3Yt9e IQtfoI6eZcX6Js03NvqENkyXRIRfZcuR73ItRYwY= 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.9 055/175] ASoC: pcm: DRAIN support reactivation Date: Mon, 28 Dec 2020 13:48:28 +0100 Message-Id: <20201228124855.923822443@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 b67d105b76e46..6c31a909845cd 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2186,6 +2186,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: @@ -2203,6 +2204,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