Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp668203ybt; Wed, 1 Jul 2020 07:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuvIyMnqO/vtTLyxFeEZzN22tsdiPCUrHgCc5w/HiGTnzxduiZ5JEedffVT5IwTdxIS3bQ X-Received: by 2002:a17:906:cc0e:: with SMTP id ml14mr22632926ejb.432.1593613376468; Wed, 01 Jul 2020 07:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593613376; cv=none; d=google.com; s=arc-20160816; b=cQBFR7IT4PvywMzAOOip/KdHyePgNey3cK3jSHuD4j/4nhOMEbjc46+DD3cr1n4Zo/ ND941cp5zYVIaChclUnSH018ht6+HhztVHTTVQGlGj584RGc1H5pErQvbMErmnhPgYJG Lumxz9pkO6P1I47dtctgFSET77FT2lclH6b8jtb3ooI3uLvENP2cVjUpyLBjYcxoxX0f gJPqFWUpY6b3I93etzIK9SjWto9L399kbNVx6bqVItmVcQMURBn2wjVESikmrOxO/NKH fcuRmIRkN3ky2GMOJ6qd3PbHEUmf6dNKoKvYIlK2qn4WrMUQwJcHQl7pre5AaF2B3UNY Z/mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ExsFQtVb807+9WQJDiwIUxBaxcTUv6N0amDyw9On6qI=; b=X23lA9IgI2YDhJm37BQSM2HEfpD92fa5xSy/lPG6IncP8Jo1eo5kOq+vPpErsg+RGy uD/p6JIviCI+eYE3OVuG3FeCD1xY0dcM1EEHZa4P5uv4RrkWGeEbzQOI/yN/lX7f38JE bSHDprdUM2A3mHJMpTG7YxbatPihe2bEVbwYekhtO4X1UFznET4h74rwE0P0DHWOWuad M+UDUXw2FyNjxXaA6zJP2njHNVtU4j1csis0cDHc2eytYYXR00YMIGmDbhHTVwbkUYne g1Ds3DY6R1gkp8BvsfqwfXn8RaMsBMOHvxua+vl6bHWtGtytLPQzdJtMnIYK13UF/AF5 K65g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=bsUHdhvM; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs1si3463416ejb.64.2020.07.01.07.22.33; Wed, 01 Jul 2020 07:22:56 -0700 (PDT) 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=@cirrus.com header.s=PODMain02222019 header.b=bsUHdhvM; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731392AbgGAOWX (ORCPT + 99 others); Wed, 1 Jul 2020 10:22:23 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:39108 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731202AbgGAOWW (ORCPT ); Wed, 1 Jul 2020 10:22:22 -0400 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 CC: Takashi Iwai , Jaroslav Kysela , Amadeusz =?utf-8?B?U8WCYXdpxYRza2k=?= , Srinivas Kandagatla , Pierre-Louis Bossart , , 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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