From patchwork Fri Sep 21 17:05:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 147306 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1056456ljw; Fri, 21 Sep 2018 10:05:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYwdVGqR2Q29YN/ZdOEp56FSiUUzZWezWh6qB9C3tBix43zH3pqblvXpy4sMD267u7t5nVj X-Received: by 2002:adf:c38e:: with SMTP id p14-v6mr40687978wrf.68.1537549551543; Fri, 21 Sep 2018 10:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537549551; cv=none; d=google.com; s=arc-20160816; b=r0KTPCMVQ/Dwv8SeBeEDPl8XPlB4e4o8A1dw4peL2ygk5dp5uGXtELPd+X3jTCZDOe 6EEoV8kqAj0zInaF6YmOkrxyAE6zhxbE3bXpt3LBBDxSOaLjZXtNhYV3B7vFE886ukt4 FkGKhrqk3SeTziPrevdkCnsUcJquwoiviAhdJqKINCf2SZ7tgPpb9kBMr1bqjLiQlMs+ /5lmD8KBpMSwFmm/IiXGjtNN/f+CkJU7h10AyJ2pNa7ygSuG7zH5GLdHiKncBsd4fTVi iR/+cLi1BEsFbodnbVtjIq7my92et0j968TQye6QAlp15rx+aSEfOstC1Atwf9netA+M YHag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=T9wham3OXooR8KOkcaJbMtbq7hn+OPS8Rbx32dVCKv0=; b=PCtIipO/7OepX2QVU007ZPk9yE/nXIhk277kc7JagdbqmAW6FMpM42tvuzqUtXpnWF CyrtPgUh74iZ+0koMm5Zb1Yd0739RKJwLldLvgPcr+5gwWzf/F53/B8w7wMqi6wNVGnQ mIWyq9RhHbrJNIs9fAZuw0Pvyd5lCiD9SxPcPk6LVAo/f/oKpdgDX71uK6QClLjH9hS0 qo+ivT8qmuzsPLHgkMcaSALBEvSxzcNixg04W/0IhQKURt+ruhiRDOl66mp+SRUQO0eE aMoW7dE1x58a6jS0M5VGDepvcFGZEeYKvGXsnuNwgI6moWXdCKOs6YqeVykuytaK919d fscA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RQavFJjN; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id s194-v6si6436021wmb.165.2018.09.21.10.05.51; Fri, 21 Sep 2018 10:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RQavFJjN; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 92432267891; Fri, 21 Sep 2018 19:05:48 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id CF83F267892; Fri, 21 Sep 2018 19:05:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 9B2152676A7 for ; Fri, 21 Sep 2018 19:05:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=iTCAiot/DkcnFPvIvqpyawJYDKe704Ri/mUmrBqLYSo=; b=RQavFJjN7+xh qmg63AGeL85KXGGHyQGcj5eHDwf70rw/iQlhWwAJIRce9m++WLtB+MdKvPSSWKQq7qUKW+e5qwRxx uShRFLbdRKgB7uGDshdiyJA0Ah1TO8uTzxR7kE54JXvCznm/r0ONEftrMAJwp1TdjGXPT2us6kIY9 p0DrM=; Received: from [209.121.128.187] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3Os8-0000fs-RE; Fri, 21 Sep 2018 17:05:41 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 65F7B440078; Fri, 21 Sep 2018 18:05:38 +0100 (BST) From: Mark Brown To: Dmytro Prokopchuk In-Reply-To: <87fty3310u.wl-kuninori.morimoto.gx@renesas.com> Message-Id: <20180921170538.65F7B440078@finisterre.ee.mobilebroadband> Date: Fri, 21 Sep 2018 18:05:38 +0100 (BST) Cc: alsa-devel@alsa-project.org, Mark Brown , Hiroyuki Yokoyama , Kuninori Morimoto Subject: [alsa-devel] Applied "ASoC: rsnd: fixup SSI clock during suspend/resume modes" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rsnd: fixup SSI clock during suspend/resume modes has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 624d1a7cd8991e33dad96ab4629a52c412540e65 Mon Sep 17 00:00:00 2001 From: Dmytro Prokopchuk Date: Fri, 21 Sep 2018 04:59:59 +0000 Subject: [PATCH] ASoC: rsnd: fixup SSI clock during suspend/resume modes Prepare <-> Cleanup functions pair has balanced calls. But in case of suspend mode no call to rsnd_soc_dai_shutdown() function, so cleanup isn't called. OTOH during resume mode function rsnd_soc_dai_prepare() is called, but calling rsnd_ssi_prepare() is skipped (rsnd_status_update() returns zero, bacause was not cleanup before). We need to call rsnd_ssi_prepare(), because it enables SSI clocks by calling rsnd_ssi_master_clk_start(). This patch allows to call prepare/cleanup functions always. Signed-off-by: Dmytro Prokopchuk Tested-by: Hiroyuki Yokoyama [kuninori: adjusted to upstream] Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/dma.c | 7 +++---- sound/soc/sh/rcar/rsnd.h | 14 +++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) -- 2.19.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 0bbc4b0ea2c6..6d1947515dc8 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -134,10 +134,9 @@ static int rsnd_dmaen_prepare(struct rsnd_mod *mod, struct rsnd_dmaen *dmaen = rsnd_dma_to_dmaen(dma); struct device *dev = rsnd_priv_to_dev(priv); - if (dmaen->chan) { - dev_err(dev, "it already has dma channel\n"); - return -EIO; - } + /* maybe suspended */ + if (dmaen->chan) + return 0; /* * DMAEngine request uses mutex lock. diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index e857311ee5c1..4464d1d0a042 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -318,9 +318,8 @@ struct rsnd_mod { /* * status * - * 0xH0000CBA + * 0xH0000CB0 * - * A 0: prepare 1: cleanup * B 0: init 1: quit * C 0: start 1: stop * @@ -331,9 +330,8 @@ struct rsnd_mod { * H 0: hw_params * H 0: pointer * H 0: prepare + * H 0: cleanup */ -#define __rsnd_mod_shift_prepare 0 -#define __rsnd_mod_shift_cleanup 0 #define __rsnd_mod_shift_init 4 #define __rsnd_mod_shift_quit 4 #define __rsnd_mod_shift_start 8 @@ -345,11 +343,13 @@ struct rsnd_mod { #define __rsnd_mod_shift_fallback 28 /* always called */ #define __rsnd_mod_shift_hw_params 28 /* always called */ #define __rsnd_mod_shift_pointer 28 /* always called */ +#define __rsnd_mod_shift_prepare 28 /* always called */ +#define __rsnd_mod_shift_cleanup 28 /* always called */ #define __rsnd_mod_add_probe 0 #define __rsnd_mod_add_remove 0 -#define __rsnd_mod_add_prepare 1 -#define __rsnd_mod_add_cleanup -1 +#define __rsnd_mod_add_prepare 0 +#define __rsnd_mod_add_cleanup 0 #define __rsnd_mod_add_init 1 #define __rsnd_mod_add_quit -1 #define __rsnd_mod_add_start 1 @@ -363,7 +363,7 @@ struct rsnd_mod { #define __rsnd_mod_call_probe 0 #define __rsnd_mod_call_remove 0 #define __rsnd_mod_call_prepare 0 -#define __rsnd_mod_call_cleanup 1 +#define __rsnd_mod_call_cleanup 0 #define __rsnd_mod_call_init 0 #define __rsnd_mod_call_quit 1 #define __rsnd_mod_call_start 0