From patchwork Tue Oct 27 04:49:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 105297 Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1567637lbq; Mon, 26 Oct 2015 22:01:25 -0700 (PDT) X-Received: by 10.180.20.228 with SMTP id q4mr24695429wie.34.1445922085781; Mon, 26 Oct 2015 22:01:25 -0700 (PDT) Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id y16si27838549wij.7.2015.10.26.22.01.25; Mon, 26 Oct 2015 22:01:25 -0700 (PDT) Received-SPF: neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) client-ip=77.48.224.243; Authentication-Results: mx.google.com; spf=neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id F3C7C265D6E; Tue, 27 Oct 2015 06:01:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 560E7265736; Tue, 27 Oct 2015 05:53:27 +0100 (CET) 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 9E337265736; Tue, 27 Oct 2015 05:53:26 +0100 (CET) Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 0E21B265789 for ; Tue, 27 Oct 2015 05:49:10 +0100 (CET) Received: from [58.123.138.250] (helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZqwC4-0005PL-6U; Tue, 27 Oct 2015 04:49:08 +0000 Received: from broonie by finisterre with local (Exim 4.86) (envelope-from ) id 1ZqwBw-0004t0-Gn; Tue, 27 Oct 2015 13:49:00 +0900 From: Mark Brown To: Kuninori Morimoto , Mark Brown In-Reply-To: <87wpua3u61.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Tue, 27 Oct 2015 13:49:00 +0900 X-SA-Exim-Connect-IP: 58.123.138.250 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] Applied "ASoC: rsnd: rename rsnd_dma_init() to rsnd_dma_attach()" 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: rename rsnd_dma_init() to rsnd_dma_attach() 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 d0980b58dae834ab749c9ca74d359469d092bdee Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 26 Oct 2015 08:39:20 +0000 Subject: [PATCH] ASoC: rsnd: rename rsnd_dma_init() to rsnd_dma_attach() Renesas sound needs many devices (SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp). SSI/SRC/CTU/MIX/DVC are implemented as module. SSI parent, SSIU are implemented as part of SSI CMD is implemented as part of CTU/MIX/DVC AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC It is nice sense that these all devices are implemented as mod. DMA will be implemented as module. Then each rsnd_dma_ops will be rsnd_mod_ops. But current rsnd_dma_ops::init means "DMA attach". This patch removes .init from rsnd_dma_ops, and renames rsnd_dma_init() to rsnd_dma_attach() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/dma.c | 35 +++++++++++++++++++---------------- sound/soc/sh/rcar/rsnd.h | 2 +- sound/soc/sh/rcar/src.c | 2 +- sound/soc/sh/rcar/ssi.c | 2 +- 4 files changed, 22 insertions(+), 19 deletions(-) -- 2.6.1 _______________________________________________ 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 00e83e0..705e524b 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -52,8 +52,6 @@ struct rsnd_dma_ops { char *name; void (*start)(struct rsnd_dai_stream *io, struct rsnd_dma *dma); void (*stop)(struct rsnd_dai_stream *io, struct rsnd_dma *dma); - int (*init)(struct rsnd_dai_stream *io, struct rsnd_dma *dma, int id, - struct rsnd_mod *mod_from, struct rsnd_mod *mod_to); void (*quit)(struct rsnd_dai_stream *io, struct rsnd_dma *dma); }; @@ -176,7 +174,7 @@ static struct dma_chan *rsnd_dmaen_request_channel(struct rsnd_dai_stream *io, return rsnd_mod_dma_req(io, mod_to); } -static int rsnd_dmaen_init(struct rsnd_dai_stream *io, +static int rsnd_dmaen_attach(struct rsnd_dai_stream *io, struct rsnd_dma *dma, int id, struct rsnd_mod *mod_from, struct rsnd_mod *mod_to) { @@ -221,11 +219,11 @@ static int rsnd_dmaen_init(struct rsnd_dai_stream *io, ret = dmaengine_slave_config(dmaen->chan, &cfg); if (ret < 0) - goto rsnd_dma_init_err; + goto rsnd_dma_attach_err; return 0; -rsnd_dma_init_err: +rsnd_dma_attach_err: rsnd_dma_quit(io, dma); rsnd_dma_channel_err: @@ -252,7 +250,6 @@ static struct rsnd_dma_ops rsnd_dmaen_ops = { .name = "audmac", .start = rsnd_dmaen_start, .stop = rsnd_dmaen_stop, - .init = rsnd_dmaen_init, .quit = rsnd_dmaen_quit, }; @@ -372,9 +369,9 @@ static void rsnd_dmapp_start(struct rsnd_dai_stream *io, struct rsnd_dma *dma) rsnd_dmapp_write(dma, dmapp->chcr, PDMACHCR); } -static int rsnd_dmapp_init(struct rsnd_dai_stream *io, - struct rsnd_dma *dma, int id, - struct rsnd_mod *mod_from, struct rsnd_mod *mod_to) +static int rsnd_dmapp_attach(struct rsnd_dai_stream *io, + struct rsnd_dma *dma, int id, + struct rsnd_mod *mod_from, struct rsnd_mod *mod_to) { struct rsnd_dmapp *dmapp = rsnd_dma_to_dmapp(dma); struct rsnd_priv *priv = rsnd_io_to_priv(io); @@ -398,7 +395,6 @@ static struct rsnd_dma_ops rsnd_dmapp_ops = { .name = "audmac-pp", .start = rsnd_dmapp_start, .stop = rsnd_dmapp_stop, - .init = rsnd_dmapp_init, .quit = rsnd_dmapp_stop, }; @@ -630,8 +626,8 @@ void rsnd_dma_quit(struct rsnd_dai_stream *io, struct rsnd_dma *dma) dma->ops->quit(io, dma); } -struct rsnd_dma *rsnd_dma_init(struct rsnd_dai_stream *io, - struct rsnd_mod *mod, int id) +struct rsnd_dma *rsnd_dma_attach(struct rsnd_dai_stream *io, + struct rsnd_mod *mod, int id) { struct rsnd_mod *mod_from = NULL; struct rsnd_mod *mod_to = NULL; @@ -639,6 +635,8 @@ struct rsnd_dma *rsnd_dma_init(struct rsnd_dai_stream *io, struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv); struct rsnd_dma *dma; struct device *dev = rsnd_priv_to_dev(priv); + int (*attach)(struct rsnd_dai_stream *io, struct rsnd_dma *dma, int id, + struct rsnd_mod *mod_from, struct rsnd_mod *mod_to); int is_play = rsnd_io_is_play(io); int ret; @@ -663,21 +661,26 @@ struct rsnd_dma *rsnd_dma_init(struct rsnd_dai_stream *io, dma->dst_addr = rsnd_dma_addr(io, mod_to, is_play, 0); /* for Gen2 */ - if (mod_from && mod_to) + if (mod_from && mod_to) { dma->ops = &rsnd_dmapp_ops; - else + attach = rsnd_dmapp_attach; + } else { dma->ops = &rsnd_dmaen_ops; + attach = rsnd_dmaen_attach; + } /* for Gen1, overwrite */ - if (rsnd_is_gen1(priv)) + if (rsnd_is_gen1(priv)) { dma->ops = &rsnd_dmaen_ops; + attach = rsnd_dmaen_attach; + } dev_dbg(dev, "%s %s[%d] -> %s[%d]\n", dma->ops->name, rsnd_mod_name(mod_from), rsnd_mod_id(mod_from), rsnd_mod_name(mod_to), rsnd_mod_id(mod_to)); - ret = dma->ops->init(io, dma, id, mod_from, mod_to); + ret = attach(io, dma, id, mod_from, mod_to); if (ret < 0) return ERR_PTR(ret); diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 1dc05a2..dc31f6d 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -197,7 +197,7 @@ struct rsnd_dma; void rsnd_dma_start(struct rsnd_dai_stream *io, struct rsnd_dma *dma); void rsnd_dma_stop(struct rsnd_dai_stream *io, struct rsnd_dma *dma); -struct rsnd_dma *rsnd_dma_init(struct rsnd_dai_stream *io, +struct rsnd_dma *rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod, int id); void rsnd_dma_quit(struct rsnd_dai_stream *io, struct rsnd_dma *dma); int rsnd_dma_probe(struct platform_device *pdev, diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 3296f1e..abfcc24 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -841,7 +841,7 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod, return ret; } - src->dma = rsnd_dma_init(io, mod, src->info->dma_id); + src->dma = rsnd_dma_attach(io, mod, src->info->dma_id); if (IS_ERR(src->dma)) return PTR_ERR(src->dma); diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index eec17bc..d4803a8 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -539,7 +539,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod, if (ret) return ret; - ssi->dma = rsnd_dma_init(io, mod, dma_id); + ssi->dma = rsnd_dma_attach(io, mod, dma_id); if (IS_ERR(ssi->dma)) return PTR_ERR(ssi->dma);