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: 11617011 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0D9213A0 for ; Mon, 22 Jun 2020 06:58:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B7C82543D for ; Mon, 22 Jun 2020 06:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592809107; bh=M+IMJCWsfaGwRdIZxma3LL04/JdsXZ7jXdbDu2zWSs8=; h=From:To:Cc:Subject:Date:List-ID:From; b=tnGbk+8ESvuhiBUvPYwz2PxTo30nVf+uo+a+pLOx/PNVtR/m7HZCnVuk9kHHB2aKj ePEdXBlRSHuxJOxgTWiPlESwBCSWdCK3E0fcDlmE56m3zYcDPt7CP57azlhNT1iXLf OcCno7DqTJgQJSF+tPwFqF7/SsCiZpN3PU7rWzyE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726715AbgFVG61 (ORCPT ); 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(-)