Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1668932ybt; Thu, 25 Jun 2020 11:13:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo+RIkhnQwkwy86fYSb2p1v4+iSHKmxGrVgrvJRs5bm4E5NdazUYEigqtRAdfaqHxQySXt X-Received: by 2002:a05:6402:30ae:: with SMTP id df14mr32428349edb.310.1593108828563; Thu, 25 Jun 2020 11:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593108828; cv=none; d=google.com; s=arc-20160816; b=xKN2JvLCib6xeG6FO6wBXEHWIFb6RYNz5kIpnAYjMivy4711aGntMVT/tq9ERcE3Ne PbMeObLbJPfd+/GuFzBL7EK3B7zlYfkuyKLdiFdHu9anRyVtWzEf56wWHANufU6mH+Yb svYMXtwbBxQteLjilm++FsJInZuRRav6uLkkZRlLbPtJACq0as/E0yHmV6ZdYWY6dWMe O66U823VKRm3Hxl17QoodM8XpqdWmAxr8spGinGbfBytgTJjBH0lxSEWj1FtNf6pC7g+ nO01ICLwfA1bg9FjhZjNPhlgcyAYBHoxd1U98lgjFA/gV5GoyIdHhqLXs0NevRznJn/o NWMw== 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=3BJBiBbnNDJ3YMulwc1oMHK+rHVQd9sRBWujrp4LHqc=; b=Hf99YUkQko5moxBdU1rwnFaid1SO+TjgP6mWZDK5aV9I8/O9eKtf3guUhsFkc9Q8cd hrZ/FDwDnz/p7K0YvSNxN23jKFfnsURszggW8tI1mQZEWFzF4aTlXqiMFFAHx1odB4Q3 UsBp1LgKFSo77cnWYCa4DVQ/cKOMSrRfw6K48upxtrXnMzmjqAMmc1aB0eqGuVe5V9aN v7gKvtSDCZPNNjDEUg0MVSwLynaA6aG2PSqXQ9tspiB2VQV+4vDd0nJEirHIqYpKgsRG kCZt+DUvradJWCE6scPJ0A7y0mfxF8UoKBjUtVDCfyHiSEhGDH8K9DzRZZzFfVVm9idi VLAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vBvmjOSi; 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 o23si15114405edr.538.2020.06.25.11.13.25; Thu, 25 Jun 2020 11:13:48 -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=vBvmjOSi; 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 S2390636AbgFYPrK (ORCPT + 99 others); Thu, 25 Jun 2020 11:47:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:44440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389551AbgFYPrI (ORCPT ); Thu, 25 Jun 2020 11:47:08 -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 D198A2081A; Thu, 25 Jun 2020 15:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593100028; bh=L9ED3CmPmrCq6aX9512m6F+JVxfMbMf1Yg5lgmCu1Dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBvmjOSiGpHUKSnl9WcOnpYbcnN0Jt2U3/xWMuaG9IbOSiOusHErTQPD0+0SCy10f gMO56qo/BsGaIQ0P3597NMz4p9qC+KPD0RAMXEiGWhLcGn+3ZzGDpDXkpNJa0IcGBy YuQ+23VJM6VXNy+cY6WR118g8yiYygJcCu6k7ygU= From: Vinod Koul To: Takashi Iwai , Jaroslav Kysela Cc: Vinod Koul , Srinivas Kandagatla , Pierre-Louis Bossart , Charles Keepax , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] ALSA: compress: document the compress audio state machine Date: Thu, 25 Jun 2020 21:16:49 +0530 Message-Id: <20200625154651.99758-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625154651.99758-1-vkoul@kernel.org> References: <20200625154651.99758-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 | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Documentation/sound/designs/compress-offload.rst b/Documentation/sound/designs/compress-offload.rst index ad4bfbdacc83..b6e9025ae105 100644 --- a/Documentation/sound/designs/compress-offload.rst +++ b/Documentation/sound/designs/compress-offload.rst @@ -151,6 +151,57 @@ 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() +----------+ | + | | or | | + | | compr_stop() | | + | | | compr_write() | + | | | | + | | v | + | | +----------+ | + | | | | compr_free() | + | | | PREPARE |---------------> A | + | | | | | + | | +----------+ | + | | | | + | | | | + | | | compr_start() | + | | | | + | | v | + | +----------+ +----------+ | + | | | compr_drain() | | compr_stop() | + | | DRAIN |<-------------------| RUNNING |--------------------------+ + | | | | | | + | +----------+ +----------+ | + | | ^ | + | A | | | + | | compr_pause() | | compr_resume() | + | | | | | + | v v | | + | +----------+ +----------+ | + | | | | | compr_stop() | + +--->| FREE | | PAUSE |---------------------------+ + | | | | + +----------+ +----------+ + Gapless Playback ================ -- 2.26.2