From patchwork Mon Jun 22 06:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 191300 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp783822ile; Sun, 21 Jun 2020 23:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybvDD6NQdi3yGsqTG3+ehW0q+dpYBPZ/6UIS6lfint3hF6JigBMATYTzBMeyCqSmIr79dx X-Received: by 2002:a17:906:2893:: with SMTP id o19mr13487368ejd.231.1592809107987; Sun, 21 Jun 2020 23:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592809107; cv=none; d=google.com; s=arc-20160816; b=QBBbQmY/CqOCuc6XRfZO+8W5F6shwXd05MdArTHSOQGJDh8MiDWQSmevS5PEogcq3F bVl/q6cmZ5WQZjgL7kUs5mEfx9RMJlesS67Xjtu5bjxIH7qlMN8LnfjPcsNoJeRrZB7y 5mAsNJJgQ7GWnOTQaDTnMJ0AhRO+B4L5o5PsPdlvP9sdOpsZeCuRi/szC7Hn1lPXXSRe CtjWzRCj/AcwqVWiDhV8mmdcIon/CrT9a8lqh/pIlJ1uMhI3/M2D6K1dBztYDD7TJ8Ju aONdJbIqmkBxW7u+yXnUZo7pQ175Nc4l94N5TYbEZQG5JQq7X8hVsbxWjm5y0LzXlJHv kGsA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=570GhDEpRO02XWCwvGTUiodTkzjDjbosJnEfW56T+AA=; b=gLQ6ImWPqUohdw+eeq4CY0sA8byinPdWQZyLLJLOVJt1vI/RpfSWxXhuRsp0qjyb4F m0Px0wSpc0znzQh9l3mLW85FP3jF56B+VlzPIiJNONi+p4/tF6jbfx3SS5K1lslH1f38 YtSatLhO/AboVYJ4BzUrHbxwMB/zY7/Ic9wLaiSKGzhtQL8f4blsSRnIShxu0FFpTDqA nm2EPDz/N4cPcVYdk5UHHHCatSrvkx/XmdH6C5y/wxyq3hMT5svf6pVjeAW4v4k53TRv svgzLWgZGfoslm963Vjzt2mU8W0SJReVrIcKbv6ytKIQsgtILF3pCJEz1nhiMW1MfmRZ vKhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l04caq2+; 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.27; Sun, 21 Jun 2020 23:58:27 -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=l04caq2+; 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 S1726715AbgFVG61 (ORCPT + 16 others); Mon, 22 Jun 2020 02:58:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:43668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgFVG61 (ORCPT ); Mon, 22 Jun 2020 02:58:27 -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 E5C7625360; Mon, 22 Jun 2020 06:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592809106; bh=M+IMJCWsfaGwRdIZxma3LL04/JdsXZ7jXdbDu2zWSs8=; h=From:To:Cc:Subject:Date:From; b=l04caq2+VwFrt5m0dYJc5LRs8iiTn1o+HMA8ghi+N8f3XqMi+7KwU1sNFKobHP9MM iUyz9jgrPTtoEqEAIRHtG9NQSac3bCTS3tyoTFytA1zfZAW3hiWG8WUKB/UB0iysDd XH8dFCbQ0y629dk9gI/qSqH0DEj36sUjeJjsC4YM= 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 0/3] ALSA: compress: Document stream states and fix gapless SM Date: Mon, 22 Jun 2020 12:28:08 +0530 Message-Id: <20200622065811.221485-1-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 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 Srini found issue with gapless implementation which prompted to look deeper into SM for compressed stream. So documenting SM was first step, so first two patches add that. Last patch fixes the issue by keeping track on partial_drain and then moving state to 'running' in snd_compr_drain_notify() for partial_drain case on success. While at it, noticed snd_compr_drain_notify() is lockless state change, so fixed that as well. I have tested this on Dragon board RB3, compressed audio works out of the box on that platform and Srini will send driver and fcplay patches for gapless soon. Changes in v2: - Added tested tag by Srini - Update compress SM with Free state and compr_stop() transitions Vinod Koul (3): ALSA: compress: document the compress audio state machine ALSA: compress: document the compress gapless audio state machine ALSA: compress: fix partial_drain completion state .../sound/designs/compress-offload.rst | 84 +++++++++++++++++++ include/sound/compress_driver.h | 12 ++- sound/core/compress_offload.c | 4 + 3 files changed, 99 insertions(+), 1 deletion(-) -- 2.26.2