From patchwork Fri Jun 19 04:54:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11613189 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CAF0192A for ; Fri, 19 Jun 2020 04:56:55 +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 6096A20890 for ; Fri, 19 Jun 2020 04:56:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fepyH5QJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zulubkkT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6096A20890 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 E65FD167F; Fri, 19 Jun 2020 06:56:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E65FD167F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592542614; bh=aaWRkkykSSnCYuAvPKup4agERzD5kDIAX5iNHAHydtA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fepyH5QJlE1NisryyXk7WNy31b9S78/A0q6ZEbBWHYiBsEqfoxQVxwoowkakTh+Et vrxg1WxdyJRdaB5Wws9heHEalR8Wscdmx7zH1Lu3xDSWSx2qJF2bgoNcmlJwLKZbkr P1Lz7UPe978ga1CnJcRrBiN/OWd4wF/62TjsND4s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 74DCEF80232; Fri, 19 Jun 2020 06:55:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55ED3F8025F; Fri, 19 Jun 2020 06:55:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 52BB9F800B5 for ; Fri, 19 Jun 2020 06:55:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52BB9F800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zulubkkT" Received: from localhost.localdomain (unknown [171.61.66.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E9B720DD4; Fri, 19 Jun 2020 04:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592542505; bh=aaWRkkykSSnCYuAvPKup4agERzD5kDIAX5iNHAHydtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zulubkkTMOWfLNC6gumYk9dHzgNwNj6/lG03GT93JzxbEux14idZVIMS7Ylwenm/1 SpQstxJtCf5JGNud6GNwSoDf2PS3KtF5Jv2F6pn3haKeZXOApSQA/lWiGq8w7IeP6h flduAyEktEGBW1lCH6EzhlTht/hz6Kue0O9ABzA0= From: Vinod Koul To: Takashi Iwai , Jaroslav Kysela Subject: [PATCH 1/3] ALSA: compress: document the compress audio state machine Date: Fri, 19 Jun 2020 10:24:46 +0530 Message-Id: <20200619045449.3966868-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200619045449.3966868-1-vkoul@kernel.org> References: <20200619045449.3966868-1-vkoul@kernel.org> MIME-Version: 1.0 Cc: Vinod Koul , Charles Keepax , Pierre-Louis Bossart , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" So we had some discussions of the stream states, so I thought it is a good idea to document the state transitions, so add it documentation Signed-off-by: Vinod Koul Reviewed-by: Srinivas Kandagatla --- .../sound/designs/compress-offload.rst | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst index ad4bfbdacc83..7292717c43bf 100644 --- a/Documentation/sound/designs/compress-offload.rst +++ b/Documentation/sound/designs/compress-offload.rst @@ -151,6 +151,58 @@ Modifications include: - Addition of encoding options when required (derived from OpenMAX IL) - Addition of rateControlSupported (missing in OpenMAX AL) +State Machine +============= + +The compressed audio stream state machine is described below :: + + +----------+ + | | + | OPEN | + | | + +----------+ + | + | + | compr_set_params() + | + V + +----------+ + compr_drain_notify() | | + +------------------------>| SETUP | + | | | + | +----------+ + | | + | | + | | compr_write() + | | + | V + | +----------+ + | | | + | | PREPARE | + | | | + | +----------+ + | | + | | + | | compr_start() + | | + | V + +----------+ +----------+ compr_pause() +----------+ + | | | |----------------------->| | + | DRAIN |<-------------------| RUNNING | | PAUSE | + | | | |<-----------------------| | + +----------+ +----------+ compr_resume() +----------+ + | | + | | + | | compr_free() + | | + | V + | +----------+ + | compr_free() | | + +------------------------>| | + | STOP | + | | + +----------+ + Gapless Playback ================ From patchwork Fri Jun 19 04:54:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11613191 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2B3792A for ; Fri, 19 Jun 2020 04:57:46 +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 5975E20890 for ; Fri, 19 Jun 2020 04:57:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="T4wkmfIx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XWaR+4Dl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5975E20890 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 E13E81691; Fri, 19 Jun 2020 06:56:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E13E81691 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592542665; bh=xsXYmu5KJaRlZUfPJ9GfJ5BsD+GGZhZMq6RqGkubP44=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=T4wkmfIxFRaazUjA2xNTakTaMLF5SNdw40R12UDvXIVSuK4481YM45xA910Mu9E5B 2dPqOaH/oXALm0PdiAhtzbFXqkQwjGmpreJEFPIAHSr1cJ11zEZFPBQ7w6DNLnr+9H 5NG0DvpC3n/Zu8eqBucbb9eQTbF3ML60tmp1AOu0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4A59EF802BD; Fri, 19 Jun 2020 06:55:20 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA1A7F80255; Fri, 19 Jun 2020 06:55:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C1AE0F80245 for ; Fri, 19 Jun 2020 06:55:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C1AE0F80245 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XWaR+4Dl" Received: from localhost.localdomain (unknown [171.61.66.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8AE2420CC7; Fri, 19 Jun 2020 04:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592542509; bh=xsXYmu5KJaRlZUfPJ9GfJ5BsD+GGZhZMq6RqGkubP44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XWaR+4Dl9B4lEGH3LA86yfWN3WtZHxRrvSzeZL19EwYgVM8KWonOpvVr7U4RbDGHg x2NjlW9LOLlYlti68KducJiUZSrzJWRlJWO13hzCvjPHz7iSgabN74FHaPkpNrLatS O3ESbCIrPQl1Bft1FVqoABlkVpCHY73tERAnoA/w= From: Vinod Koul To: Takashi Iwai , Jaroslav Kysela Subject: [PATCH 2/3] ALSA: compress: document the compress gapless audio state machine Date: Fri, 19 Jun 2020 10:24:47 +0530 Message-Id: <20200619045449.3966868-3-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200619045449.3966868-1-vkoul@kernel.org> References: <20200619045449.3966868-1-vkoul@kernel.org> MIME-Version: 1.0 Cc: Vinod Koul , Charles Keepax , Pierre-Louis Bossart , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" Also documented the galpess transitions. Please note that these are not really stream states, but show how the stream steps in gapless mode Signed-off-by: Vinod Koul --- .../sound/designs/compress-offload.rst | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst index 7292717c43bf..3e241530e173 100644 --- a/Documentation/sound/designs/compress-offload.rst +++ b/Documentation/sound/designs/compress-offload.rst @@ -251,6 +251,38 @@ Sequence flow for gapless would be: (note: order for partial_drain and write for next track can be reversed as well) +Gapless Playback SM +=================== + +For Gapless, we move from running state to partial drain and back, along +with setting of meta_data and signalling for next track :: + + + +----------+ + compr_drain_notify() | | + +------------------------>| RUNNING | + | | | + | +----------+ + | | + | | + | | compr_next_track() + | | + | V + | +----------+ + | | | + | |NEXT_TRACK| + | | | + | +----------+ + | | + | | + | | compr_partial_drain() + | | + | V + | +----------+ + | | | + +------------------------ | PARTIAL_ | + | DRAIN | + +----------+ Not supported ============= From patchwork Fri Jun 19 04:54:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11613193 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8B4A92A for ; Fri, 19 Jun 2020 04:58:32 +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 703A220CC7 for ; Fri, 19 Jun 2020 04:58:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="aQzTRWTm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="fEVC6TV4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 703A220CC7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 DDB951689; Fri, 19 Jun 2020 06:57:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DDB951689 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592542710; bh=dFySWiW+V3w18ShvwVA+ym0QQvWEuHOaM8UF5XXckvE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aQzTRWTmcb/U0CWlOA5ekMEsSBsHRicXMi8olLymHWmShHD08z9rMnZZkxzoBxvRU bDmJuje2CA3tLSBVmdZvF8bWbJgP+oyb/2/3gg34rE0FkPitIqMafLAgWNGQaDctF+ 2hG2aKqWmBX/jaSImuqzpJ21dEWsoZBLXttZ7OB4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 462B9F802C4; Fri, 19 Jun 2020 06:55:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5034FF802C4; Fri, 19 Jun 2020 06:55:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 51403F80245 for ; Fri, 19 Jun 2020 06:55:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 51403F80245 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="fEVC6TV4" Received: from localhost.localdomain (unknown [171.61.66.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DCC5720FC3; Fri, 19 Jun 2020 04:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592542513; bh=dFySWiW+V3w18ShvwVA+ym0QQvWEuHOaM8UF5XXckvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fEVC6TV4T7BDWfy7okeil9bxWPLXS5IHhkOHEBxqNqlTKLHa5tUGPeP3v+OUFG6pm DyMW1K58r6bv82ZIPSR4DgtEAvy/w2Y6fIy9+PEftVRvB8oU2G+3xU7zuPEdOxgSp8 pbyFTkgom+8SBCPMq06zS6HpH7CUgUsEKbW5dUUo= From: Vinod Koul To: Takashi Iwai , Jaroslav Kysela Subject: [PATCH 3/3] ALSA: compress: fix partial_drain completion state Date: Fri, 19 Jun 2020 10:24:48 +0530 Message-Id: <20200619045449.3966868-4-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200619045449.3966868-1-vkoul@kernel.org> References: <20200619045449.3966868-1-vkoul@kernel.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Charles Keepax , Pierre-Louis Bossart , linux-kernel@vger.kernel.org, Vinod Koul , Srinivas Kandagatla 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 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)") Reported-by: Srinivas Kandagatla Signed-off-by: Vinod Koul Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla --- include/sound/compress_driver.h | 12 +++++++++++- sound/core/compress_offload.c | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index 3df8d8c90191..93a5897201ea 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -66,6 +66,7 @@ struct snd_compr_runtime { * @direction: stream direction, playback/recording * @metadata_set: metadata set flag, true when set * @next_track: has userspace signal next track transition, true when set + * @partial_drain: undergoing partial_drain for stream, true when set * @private_data: pointer to DSP private data * @dma_buffer: allocated buffer if any */ @@ -78,6 +79,7 @@ struct snd_compr_stream { enum snd_compr_direction direction; bool metadata_set; bool next_track; + bool partial_drain; void *private_data; struct snd_dma_buffer dma_buffer; }; @@ -187,7 +189,15 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream) if (snd_BUG_ON(!stream)) return; - stream->runtime->state = SNDRV_PCM_STATE_SETUP; + mutex_lock(&stream->device->lock); + /* for partial_drain case we are back to running state on success */ + if (stream->partial_drain) { + stream->runtime->state = SNDRV_PCM_STATE_RUNNING; + stream->partial_drain = false; /* clear this flag as well */ + } else { + stream->runtime->state = SNDRV_PCM_STATE_SETUP; + } + mutex_unlock(&stream->device->lock); wake_up(&stream->runtime->sleep); } diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index e618580feac4..1c4b2cf450a0 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -803,6 +803,9 @@ static int snd_compr_stop(struct snd_compr_stream *stream) retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP); if (!retval) { + /* clear flags and stop any drain wait */ + stream->partial_drain = false; + stream->metadata_set = false; snd_compr_drain_notify(stream); stream->runtime->total_bytes_available = 0; stream->runtime->total_bytes_transferred = 0; @@ -960,6 +963,7 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream) if (stream->next_track == false) return -EPERM; + stream->partial_drain = true; retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_PARTIAL_DRAIN); if (retval) { pr_debug("Partial drain returned failure\n");