Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2524746ybt; Mon, 22 Jun 2020 00:00:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaOKpxBE67fERm42fVWAFd0S/NtksMhHgoQ5SVLrjNUyg24bNuiK0abBXNULp25Aw+zL03 X-Received: by 2002:aa7:cd41:: with SMTP id v1mr15388632edw.378.1592809228383; Mon, 22 Jun 2020 00:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592809228; cv=none; d=google.com; s=arc-20160816; b=Qmya/P1FUGeLAci6PqH8NFE8asQAlNK6nwglxXlMOE4kAQbXSQN/33d5+vttPR2mZ+ 8u5OFh1H9Tjoc0fLWdX0epwg+o7z7qGV7Kfzjp2wY+/Gbw3W1uAvQwSwoGvi2aYH2MNk l+YMua1OfiTUzcRac/zwhz9ofYVn7hTYV+xJd19sxs2eRepSvfFLTGmojSkb+x/Uxlvo I6h2tIn2sgx85IfkSq4ZzZU7NIoAn/D/RTjEOtto1P4A+0csBSB7U1nI9ZKZ9RBSErw3 JkARyZziZnThjw5r4pB+7N9GzZ8MK66jmB4HgJmi4tIztP3oDy5cuViV5OkyRt8GWAEG f0qg== 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=FAp+ELj1FUl0xhMnhyJx4zMPv9pAmbSAw2MN9Lc/rvLx205SCIeEJg1XphhywCkIVF tONOjEQ32muyEV232OdPRKNraBB+iw5d/3bnKalRElX5I7lkB31GFm4Uh8uqTflXr3Y2 AOCh2jOqjN8PIQZO9TDvIFSfF3LxPnIEpx1Thx2+t0U/xxcuUYefIorHqh6hQudavDLe GZtW7seQWd/wFA0mPGk8RZ7Pz2zrSIHHqIQPffg4bTYTAGUgYihR+pZzYu0q3KDV6+5a kfHzYFtruUVWp5Dlwky4hqxYKqZJU/YfR03SO6Jpmwh923LIGyg9bYayvw9c3MCGmYzX Ys3Q== 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-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 dg4si9258408edb.439.2020.06.22.00.00.06; Mon, 22 Jun 2020 00:00:28 -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=l04caq2+; 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 S1731248AbgFVG61 (ORCPT + 99 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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