From patchwork Tue Aug 8 11:06:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 109609 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp3919472obb; Tue, 8 Aug 2017 04:06:42 -0700 (PDT) X-Received: by 10.223.175.212 with SMTP id y20mr2504051wrd.267.1502190402765; Tue, 08 Aug 2017 04:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502190402; cv=none; d=google.com; s=arc-20160816; b=h0exoTdSPDYBm+zex8vTfkVbAWErvz4FlyF7FqjdwmL+C8azg7R/jJ5mpqIAKWo8+I mhRjry1XA3KjEoy6O8MYEnObZJLc79PDZul7X3DndxwWH5xDEHVp3iMbJlrpJOApxpgo 0EAEUdoOln0TQ9YKR8DM9XaE189emCKfDNT+Sona4Mio1bc2Ode1fLz54qrSyumEUIhg FD1X/qcmoSJAMFt01hFbjdtk6YF1R+OQTxbgAKz1fP/TXAlUN//Yo+J2ACEMM447ESRS N/bGAOovywRvEugpBd8h8muqrlfWKJM/rsmnfud2SUNgzo2T7yiyPWXv80yU5xF3WUoD yloQ== 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 :delivered-to:arc-authentication-results; bh=fX6DQCrvLAbWfY4gBAZLMVpuTP6goH6GQNbUoN7NdK4=; b=eZeTEuSsGZTLvIE2iv54YtgtII5I+GHqLrRN0fVdLpv3F5SVlkb6NbSKAMEaFg8G3F ykkdRJE9LfLrBCw+ShgEC5hbd2DVfZ4uCZ0Oxoc2ZAjCCLOyrL0Ycn701FbFr0UnEclM Pq61G64VcXtZc1Ze1CYySO2bt+I2XF1IZ9/iQUVmxhfTfgadv6IUyRbwBCITMhhQzmFM nTct137hRuuxwZZzqDhd7MiE1Yam1Kig6MYYiHfSm4kThP4gE/ZSoBT2Kzcff3Wuw5HW U5m+j0fCSm/tSUAcKLKdEbIzjX9FZqrnAnyMvHHGD338fYmSxwZLWev8qrK8GRz9me88 zv8A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id p88si999738wmf.209.2017.08.08.04.06.42; Tue, 08 Aug 2017 04:06:42 -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; 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 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 03960267379; Tue, 8 Aug 2017 13:06:22 +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 981E926737A; Tue, 8 Aug 2017 13:06:20 +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.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 25BF626691A for ; Tue, 8 Aug 2017 13:06:18 +0200 (CEST) Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1df2Kz-0000G1-56; Tue, 08 Aug 2017 11:06:15 +0000 Received: from broonie by finisterre with local (Exim 4.89) (envelope-from ) id 1df2Kw-0004ve-BA; Tue, 08 Aug 2017 12:06:10 +0100 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <871somn93g.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Tue, 08 Aug 2017 12:06:10 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5:7e7a:91ff:fede:4a45 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Cc: linux-renesas-soc@vger.kernel.org, alsa-devel@alsa-project.org, Mark Brown , Simon Subject: [alsa-devel] Applied "ASoC: rsnd: rsnd_ssi_can_output_clk() macro" 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: rsnd_ssi_can_output_clk() macro has been applied to the asoc tree at git://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 bb002f925ae18c0c9d72d87b74b311a5209d7178 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 8 Aug 2017 01:32:42 +0000 Subject: [PATCH] ASoC: rsnd: rsnd_ssi_can_output_clk() macro For example SSI0/SSI1 case, SSI1 can share pin with SSI0. And then, SSI1 needs SSI0's clock. This clock controlling is very picky and difficult to understand in current code. This patch adds new rsnd_ssi_can_output_clk() macro, the code will be more understandable. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/ssi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.13.2 _______________________________________________ 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/ssi.c b/sound/soc/sh/rcar/ssi.c index 3ee7b2de7dea..434996d4054a 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -106,6 +106,7 @@ struct rsnd_ssi { (rsnd_ssi_multi_slaves(io) & (1 << rsnd_mod_id(mod))) #define rsnd_ssi_is_run_mods(mod, io) \ (rsnd_ssi_run_mods(io) & (1 << rsnd_mod_id(mod))) +#define rsnd_ssi_can_output_clk(mod) (!__rsnd_ssi_is_pin_sharing(mod)) int rsnd_ssi_hdmi_port(struct rsnd_dai_stream *io) { @@ -255,7 +256,6 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_dai *rdai = rsnd_io_to_rdai(io); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); - struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); int chan = rsnd_runtime_channel_for_ssi(io); int idx, ret; unsigned int main_rate; @@ -266,7 +266,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, if (!rsnd_rdai_is_clk_master(rdai)) return 0; - if (ssi_parent_mod && !rsnd_ssi_is_parent(mod, io)) + if (!rsnd_ssi_can_output_clk(mod)) return 0; if (rsnd_ssi_is_multi_slave(mod, io)) @@ -307,12 +307,11 @@ static void rsnd_ssi_master_clk_stop(struct rsnd_mod *mod, { struct rsnd_dai *rdai = rsnd_io_to_rdai(io); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); - struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); if (!rsnd_rdai_is_clk_master(rdai)) return; - if (ssi_parent_mod && !rsnd_ssi_is_parent(mod, io)) + if (!rsnd_ssi_can_output_clk(mod)) return; if (ssi->usrcnt > 1)