Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2524928ybt; Mon, 22 Jun 2020 00:00:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWgXZQ2+0gs3T/IiEfVBoLE9Mep664Y+QXlGNjd6BW8xPsh+3lG0ZqqDh4gzUNWyYcM+BB X-Received: by 2002:a17:906:a28b:: with SMTP id i11mr5231782ejz.524.1592809245387; Mon, 22 Jun 2020 00:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592809245; cv=none; d=google.com; s=arc-20160816; b=ZepGvFvr0n5sWqNWVNgGtdvDhKbKIr4bB96rdfQIV/gkrNUAHOvusP9j72XzfeMsG/ 9XcXkvP+x+5HWtrLEYB0u2y04U16JMIgHAJBGh1sLPfztLkvzFOeBue7W+KFSTgDJlqp yiMMwUZ7FDeEWEvRH3N2lHHsbsfVGR3lcOhK/2z/CFAVPine7g4vVnKxsO7MO+bLUjtE g1OZdbBeKe/ZV4wdq66cMVpVkpdPnorT5h4REw3DqXZB1KNUoWD8NU1VLADzwd1o61kQ NKEzXNmpx5tu1/choE9oRud1UD4QlLdw1JS56Zwljo6cmRLy2DtM2IIYwFrCLVGbrfWf MPrA== 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=MhIW1z7orspN/Jy3bVREQzaMuH8jJEOILq858Vlx6KuiFW/ha2Dao3X2TXx26PRfkD g4/T3R8YN4s55aJd2Fzt3u9zF7ps1hB6T/KDFYzF9slwP2jxEf57a1hzBrTQKET+N3jn qWc3OTN+rxHIwo7uqLMuOL/+IJHa7hyxDELYJCMvpyzbC+v8wgQLR7J2+Mo1Fb7UpVMF G+tIl5DlYMG/oUGu2XMMFbL9MO039gmzZeO70tDsdCAaya3x7IA1PXjZaDIMI8OM1Y8r /yq+/3bSvTSFKa5eZEnEb6HDnofsq579kbGwRAYuOSDprKthOHrdNAgUuNKmVJmbxKwf Yv5Q== 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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 p3si8715520edr.104.2020.06.22.00.00.23; Mon, 22 Jun 2020 00:00:45 -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=@kernel.org header.s=default header.b=d8QdwWm0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731295AbgFVG6c (ORCPT + 99 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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 ================ -- 2.26.2