Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9132297pxu; Mon, 28 Dec 2020 07:25:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZ29f5y3yXFNqyLghpjjRpBRzytRV+nJzhaRyfN1uN5Psu3gpFBYgZnVg4k4z6ZmnmOJsv X-Received: by 2002:a05:6402:366:: with SMTP id s6mr42217488edw.44.1609169111476; Mon, 28 Dec 2020 07:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609169111; cv=none; d=google.com; s=arc-20160816; b=JAewdmzlEc1kW09eIlMgVpQ73oZ+4ayWQsRBppbO1LVoN9o3gL3FkFRJoN82HdViAR pvlfn+rIB0zxw41fimHPSKW56nuBPM8VSChk2EciU5nCqk223dipwio+vZ6OMN5z3Jm8 iFp3BE/se6BO2suy+IIgZdzTYOlxiz9ITkIIrQaEBkYn6tWO4CrBHhbMs0z1LD03AE9P BtEYlrE4SfrkIIO6jXlbGhw1eM6rMExYyadobuny82hSDi/VrQA05AJyCY2WCylLpjhN J5PYYoaypcV9w3gQYtvNTJSxGyl7rJC0yXbpm8wv2WDu7kakUo3uKn+VLHsX/3YdJzFi UVpg== 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=O9MH2c07piQi5HZ//30Ysn/luxF9XWGBcMh+3+dTUUI=; b=FmemMFeHPuA0qhWXLEDocGHSSIQfc7WFcZiSkCRi4gSyjQaQTWghAu+Y0m24YOM/m7 7C8SW3fyJG803O0zICOVF3pUi4jN1X0Uch6C0svlJvwBAKKe07qFHqcQv6ORrqd9u1kY Ma+Nh+CVznh2BL2UlXjAvE+8cmJv3rD9Nu65SuWG+LsT28hynjK0+tZI6eLExXtw/9fV Tru+uDLXiJH03Q8RKROU3CpYgblEYXnBGRR7eG3pK1doXEzdLxCvogyhtP+cDaeKwrbi pvpmhDj7/8yhYkhmLgADCaRAj08b/fRx8PBg+y+pCn/NCY1OyTrGbtx3KZpAkMLKLfwK a/Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T33j83Nn; 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 u22si20037327edx.500.2020.12.28.07.24.47; Mon, 28 Dec 2020 07:25:11 -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=T33j83Nn; 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 S2438907AbgL1PWU (ORCPT + 99 others); Mon, 28 Dec 2020 10:22:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:35834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436719AbgL1OCA (ORCPT ); Mon, 28 Dec 2020 09:02:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A788B206D4; Mon, 28 Dec 2020 14:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164079; bh=fb9nKyEQfwIJeHByx+fvtBl2hSPtih5BI6+vq69gpZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T33j83NnO3xvuXhvkdyh0yUx3VKPWRKhqDPSjwJ7LPTGiaAfziaWaRkxqtpPJV4TU 2vdvR55F40ObOIIxUSEgBBjxsG6lhhzrBNXnsFgQAjHVnp2xyFJ9LrrHwbzMmmt91X cWOnXsUuOnSm2KKgRsLuOqp5Y5WpGZ8IJuXNrvRg= 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 5.10 053/717] ASoC: pcm: DRAIN support reactivation Date: Mon, 28 Dec 2020 13:40:51 +0100 Message-Id: <20201228125023.534445058@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 dcab9527ba3d7..91bf339581590 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2231,6 +2231,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: @@ -2248,6 +2249,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