From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37443C433E0 for ; Wed, 1 Jul 2020 14:21:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B1B4C2067D for ; Wed, 1 Jul 2020 14:21:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="QREpxlX8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="bsUHdhvM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1B4C2067D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 36588165E; Wed, 1 Jul 2020 16:20:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 36588165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593613296; bh=g9AWL633zVOXPzt0Ij4/arr4xI+ip7Rr9sOT6rBQ7mM=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QREpxlX816hVPg2Z7i+XhLWEs6bCVY04YixeaFRehnuVYrc6ZEo+iiLPVhv9swRmP wi+AZlrPH6P6Z9HbmBCvhNYqzxJmyvJwqmo63UEdI1Fc6zfMeFEfN4Ya8vyNNPlMK2 nOeBeJRENtZr6t5wf39FGKZ0DeGec/cuvLAz75MM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BBC03F8020C; Wed, 1 Jul 2020 16:20:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8A412F80217; Wed, 1 Jul 2020 16:20:44 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 6158BF801D8 for ; Wed, 1 Jul 2020 16:20:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6158BF801D8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="bsUHdhvM" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 061E2bxk004316; Wed, 1 Jul 2020 09:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=ExsFQtVb807+9WQJDiwIUxBaxcTUv6N0amDyw9On6qI=; b=bsUHdhvMKojMfdPsrPNpWy3ZZLZ772P0L2qb2J0N1lFa42hoJvk3kQ5wVU2U8JcT9DmZ 3z1bl/xfrD7c1u0bXA4DSDVDv7PiIxD8gx/R6oCdW0KqLUYl9UbU1DPBIyjDPoK0NYpW SH4Oi0gYmolyi3WZMA7CDEdEQVHXEBuf6GPnGMqDyhEWvuq1ytgnZ/aHrnMkVHp/k/DV mEbIrWLFDM8Ip9L4pWWDF4iIBiPui47zAqCJ4d1Lu95UKe+GmF+NAI7BZjD3geXv+nM+ 0NQFbWU/G7WzvyCptiXAFptN9t7xvnwVh/0IXfHlwluKOKtQzQy/0+/ekZD+PFuiMm6W 0g== Authentication-Results: ppops.net; spf=fail smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 31x2hpwwba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 01 Jul 2020 09:20:34 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 1 Jul 2020 15:20:32 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 1 Jul 2020 15:20:32 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 64FE32AB; Wed, 1 Jul 2020 14:20:32 +0000 (UTC) Date: Wed, 1 Jul 2020 14:20:32 +0000 From: Charles Keepax To: Vinod Koul Subject: Re: [PATCH v5 3/3] ALSA: compress: fix partial_drain completion state Message-ID: <20200701142032.GG71940@ediswmail.ad.cirrus.com> References: <20200629134737.105993-1-vkoul@kernel.org> <20200629134737.105993-4-vkoul@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200629134737.105993-4-vkoul@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-SPF-Result: fail X-Proofpoint-SPF-Record: v=spf1 include:spf-001ae601.pphosted.com include:spf.protection.outlook.com ip4:5.172.152.52 -all X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=975 bulkscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 phishscore=0 cotscore=-2147483648 suspectscore=0 priorityscore=1501 spamscore=0 clxscore=1011 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007010102 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Takashi Iwai , Srinivas Kandagatla , Amadeusz =?utf-8?B?U8WCYXdpxYRza2k=?= 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" On Mon, Jun 29, 2020 at 07:17:37PM +0530, Vinod Koul wrote: > On partial_drain completion we should be in SNDRV_PCM_STATE_RUNNING > state, so set that for partially draining streams in > snd_compr_drain_notify() and use a flag for partially draining streams > > While at it, add locks for stream state change in > snd_compr_drain_notify() as well. > > Fixes: f44f2a5417b2 ("ALSA: compress: fix drain calls blocking other compress functions (v6)") > Reviewed-by: Srinivas Kandagatla > Tested-by: Srinivas Kandagatla > Signed-off-by: Vinod Koul > --- Worth noting I haven't actually tested the gapless, but keeps all the compressed capture stuff happy. Tested-by: Charles Keepax Reviewed-by: Charles Keepax Thanks, Charles