From patchwork Mon Jun 22 06:58:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 191301 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp783868ile; Sun, 21 Jun 2020 23:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNaB7cOsyP3yqab/uyJ5WF6p14iLRLbZS2CQ4++PoiUpSsA0HhPBTe3L1bnxH0mBH+KyC4 X-Received: by 2002:aa7:d8c2:: with SMTP id k2mr5464037eds.346.1592809113083; Sun, 21 Jun 2020 23:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592809113; cv=none; d=google.com; s=arc-20160816; b=z46QaGEOOU5EiwtqSGUy0asi8sY9Lvn03LW/Ex6tA96+h5/7+e6wUJ5dK1AKkmnxzr ev6nTkGWAx18c6kApgujqTSuaLrqyIpBMxcRRNkWUcJBkxe+SNZ93hp84kctkcUcDCTM a+5G0360VEC+3WYEAbmwBIGUL52uW+GaCmMut3CYZmgEZbaFLXfrC8BmQS8jJrSPwXI6 yNLm+6DkuY7vpFJM0y4fP1FR6gGMR8POr5/L9p23VOnMZ2dX2HpGPajybm6asK0XRR4X s5qRYDkf39ZSCUmkxr4QFzYU5GtjfMy99q6pbLnn/gaJ5KODai0GlbXgbvNiqknNbNcH W9pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oe2eW1rVnrJKOqIaQMyCiXAYIFN2mCDLW2OuPBXtYYM=; b=apcBBeLe5+vBoyi6DytweHiBNlk2YxQ7sJr9VzNhLTlOU0F0gcMTQO1WtvLhNd2W6g bOzEL40N8m95PiBi5l5dxaOCRJoTmExYWyoPGEjnxb2o8MDh/VLDs+jaRZsUfBTvXmcw HqBcViNTCVWo913tZAj5eaa6eZKjdQ+rFeFrZlZV8sdPy9mSf7pJJihyvuBbOoN+mL54 6GEMAcb2PMaZoy76CKzQIlCloNGluT+btANiqZR26Jj802lUWL6m+lz7QAqbfLyCDChH SRBrCDQhEF8vHTe7SBpXrz2T8/0AiC4d36/8PC2/6xEUHAozI/tVPgkIrvgYgU5fVL7g d4pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d8QdwWm0; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss12si8480947ejb.188.2020.06.21.23.58.32; Sun, 21 Jun 2020 23:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@kernel.org header.s=default header.b=d8QdwWm0; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731282AbgFVG6c (ORCPT + 16 others); Mon, 22 Jun 2020 02:58:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:43734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgFVG6b (ORCPT ); Mon, 22 Jun 2020 02:58:31 -0400 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 3ADF325439; Mon, 22 Jun 2020 06:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592809110; bh=cJaK9Ij0LnW3uaf90F+DxG2K4hVeM1atFzhGIhfMpbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8QdwWm0SMOkokdDVPicskvy40K7ynMncLQaHXxFnQTMFTimJ01a1vQMX/PSZ/nO8 jGkKLCigR4/9ZePJBXqxvd0G4tHPH4Mbkxak3bGmivigI2FCilVmdOIfQdAjKHo9UL vj+ZjHlaPIvWK8xVXL1q22/fztbcgByVRAs0Gxyg= From: Vinod Koul To: Takashi Iwai , Jaroslav Kysela Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , Srinivas Kandagatla , Pierre-Louis Bossart , Charles Keepax , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] ALSA: compress: document the compress audio state machine Date: Mon, 22 Jun 2020 12:28:09 +0530 Message-Id: <20200622065811.221485-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622065811.221485-1-vkoul@kernel.org> References: <20200622065811.221485-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- .../sound/designs/compress-offload.rst | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) -- 2.26.2 diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst index ad4bfbdacc83..6f86db82298b 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_free() +----------+ + +-------------------------------------| | + | | SETUP | + | +------------------------>| |<---------------------------------+ + | | compr_drain_notify() +----------+ | + | | | | + | | | | + | | | compr_write() | + | | | | + | | v | + | | +----------+ | + | | | | | + | | | PREPARE | | + | | | | | + | | +----------+ | + | | | | + | | | | + | | | compr_start() | + | | | | + | | v | + | +----------+ +----------+ compr_pause() +----------+ | + | | | compr_drain() | |---------------->| | | + | | DRAIN |<-------------------| RUNNING | | PAUSE | | + | | | | |<----------------| | | + | +----------+ +----------+ compr_resume() +----------+ | + | | | | | + | | | | | + | | | | | + | | | | compr_stop() | + | | | +------------------------------------+ + | | +----------+ | + | | | | | + +-----------+------>| |<-------+ + compr_free() | FREE | compr_free() + | | + +----------+ + Gapless Playback ================