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: 192393 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=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 5B43FC433DF for ; Fri, 19 Jun 2020 04:57:48 +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 D8FF720890 for ; Fri, 19 Jun 2020 04:57:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="GslshTnG"; 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 D8FF720890 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 7297D168F; Fri, 19 Jun 2020 06:56:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7297D168F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592542666; 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=GslshTnGKWqs/G/n/UHC/wpBzyktIZB5X2u341l28oud59ZhuKRMxR9rb53zd9SNn gqjEK4vbRLa6tI6EMwerELTB+2Vao/k4805x7GyhaFH3iOlM+fNX/pBQJF9PFWn1d1 M0jkStBMipE6jZe+SzkTtf5ANry5vIyRA49B2X0w= 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) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA1A7F80255; Fri, 19 Jun 2020 06:55:14 +0200 (CEST) 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 =============