From patchwork Fri Feb 20 10:28:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5855571 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C30F3BF440 for ; Fri, 20 Feb 2015 10:34:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 051B82035C for ; Fri, 20 Feb 2015 10:34:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D3CE92034B for ; Fri, 20 Feb 2015 10:34:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CF460261ADA; Fri, 20 Feb 2015 11:34:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9EDDD26063C; Fri, 20 Feb 2015 11:31:09 +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 BAD552606A2; Fri, 20 Feb 2015 11:31:08 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 2D7A0260566 for ; Fri, 20 Feb 2015 11:28:36 +0100 (CET) Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 20 Feb 2015 19:28:35 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id BECBD6155C; Fri, 20 Feb 2015 19:28:35 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id B143D2806E; Fri, 20 Feb 2015 19:28:35 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 7BA2C2806D; Fri, 20 Feb 2015 19:28:35 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id VAM27335; Fri, 20 Feb 2015 19:28:35 +0900 X-IronPort-AV: E=Sophos;i="5.09,613,1418050800"; d="scan'208";a="181395429" Received: from mail-sg1lp0091.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.91]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 Feb 2015 19:28:34 +0900 Received: from remon.renesas.com (211.11.155.132) by SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) with Microsoft SMTP Server (TLS) id 15.1.93.16; Fri, 20 Feb 2015 10:28:32 +0000 Message-ID: <87vbiwnae7.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Vinod Koul , Mark Brown , Arnd Bergmann In-Reply-To: <87fva0opax.wl%kuninori.morimoto.gx@renesas.com> References: <87fva0opax.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Fri, 20 Feb 2015 10:28:32 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: SG2PR03CA0018.apcprd03.prod.outlook.com (25.160.233.28) To SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB176; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005003); SRVR:SIXPR06MB176; X-Forefront-PRVS: 0493852DA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(23726002)(97736003)(53416004)(50466002)(66066001)(46406003)(46102003)(33646002)(92566002)(19580405001)(101416001)(19580395003)(69596002)(42186005)(86362001)(106356001)(122386002)(81156004)(105586002)(68736005)(77096005)(50986999)(76176999)(54356999)(40100003)(64706001)(36756003)(83506001)(87976001)(2950100001)(47776003)(77156002)(229853001)(62966003); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB176; H:remon.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB176; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2015 10:28:32.1585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB176 Cc: Linux-ALSA , Linux-SH , Liam Girdwood , Simon , Laurent , dmaengine@vger.kernel.org Subject: [alsa-devel] [PATCH 14/24 v2] ASoC: rsnd: remove rsnd_dma::dir 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto DMAEngine direction can be calculated from rsnd_dai_stream, So, rsnd_dma::dir does not make sense now. Let's remove it. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change sound/soc/sh/rcar/dma.c | 5 ++--- sound/soc/sh/rcar/rsnd.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index c407fd2..3f1ea58 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -87,12 +87,13 @@ static void rsnd_dmaen_start(struct rsnd_dma *dma) struct snd_pcm_substream *substream = io->substream; struct device *dev = rsnd_priv_to_dev(priv); struct dma_async_tx_descriptor *desc; + int is_play = rsnd_io_is_play(io); desc = dmaengine_prep_dma_cyclic(dma->chan, substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), snd_pcm_lib_period_bytes(substream), - dma->dir, + is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { @@ -156,8 +157,6 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id, if (ret < 0) goto rsnd_dma_init_err; - dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; - return 0; rsnd_dma_init_err: diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index a295491..5d65a4b 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -182,7 +182,6 @@ struct rsnd_dma_ops { struct rsnd_dma { struct dma_chan *chan; struct rsnd_dma_ops *ops; - enum dma_transfer_direction dir; int dmapp_id; u32 chcr; dma_addr_t src_addr;