From patchwork Thu Dec 17 02:57:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7868541 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87ED49F350 for ; Thu, 17 Dec 2015 03:00:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46CE6203E9 for ; Thu, 17 Dec 2015 03:00:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 19EFE201B9 for ; Thu, 17 Dec 2015 03:00:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id EE8B52662CA; Thu, 17 Dec 2015 04:00:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C90C32663EE; Thu, 17 Dec 2015 03:58: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 B3C212663EE; Thu, 17 Dec 2015 03:58:07 +0100 (CET) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 30048266406 for ; Thu, 17 Dec 2015 03:57:11 +0100 (CET) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 17 Dec 2015 11:57:09 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id C6AC241477; Thu, 17 Dec 2015 11:57:09 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id A6F5D480A3; Thu, 17 Dec 2015 11:57:09 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 9F6D548014; Thu, 17 Dec 2015 11:57:09 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id MAA15224; Thu, 17 Dec 2015 11:57:09 +0900 X-IronPort-AV: E=Sophos;i="5.20,438,1444662000"; d="scan'";a="201978718" Received: from mail-pu1apc01lp0023.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.23]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 17 Dec 2015 11:57:08 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HKXPR06MB1016.apcprd06.prod.outlook.com (10.161.181.156) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 17 Dec 2015 02:57:07 +0000 Message-ID: <8760zxiy3q.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Mark Brown In-Reply-To: <87egeliyaz.wl%kuninori.morimoto.gx@renesas.com> References: <87egeliyaz.wl%kuninori.morimoto.gx@renesas.com> Date: Thu, 17 Dec 2015 02:57:07 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: HKXPR02CA0030.apcprd02.prod.outlook.com (25.161.48.15) To HKXPR06MB1016.apcprd06.prod.outlook.com (25.161.181.156) X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 2:2X/j1RhfIjIXPzmKpigOjor347YQDc5diNCDFiZSl40CRl6sEFOGM8m/r8DvdeQehypqW7789rpcITLjiiyTxHjoO6XHymB8txC60MNU5PGj3XYsV8bPitAqQZ8vAbqOyIFKbM1vnIRZC8xoRJ1h4Q==; 3:dIB0eB+o8Ruon82mvbH46X27qknt4MuwU7kuVIGD8t6L91RRDAtgCTyTBDECp68kOxzb7yrhXZyvpSAlF81a4ZFsswtTUdWMKWKLyA2bcxht6M0xoXkgvg5jb/KV/O25; 25:Npe/Ews0OlY6r4FpQ3d6aJ1rjroKGK4/FX5SOWH47Uwn2BGyN1lx/8GfAJyndV4DrQld37usVcH11I8NzwXVS41MsLnAN9qOoKa7NzV/Hby05huQR0iBfGarWUNMIWGTb7vHoH5ALM06vPxixQTLZlcRDA1e2ZgwklSRA/Gof2rPF5EVfoHaYgv1rjXwitAnoeRTlo+xrwkjQiV+Iqj/7LFQ510zdOQ1ubF0Wa/AOpeQLbdz/OjDBZHRsuL3swkg X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB1016; X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 20:nCNm38zuNCHIMQCBk6vPwCJLsZpWai/vnj53pwvyeVKWpw7u+RmSxpmgtg/4If2iFGWQWvEG/au4hJU77wIaObYPThEpZqKla4DBywZo9bcWtj+FnsoMKdgrFrvmgUmuBK30OqKNQfGafhXQU1wyBrGruOOP9MtYlITpd+//1Sun4XAkEeUPjRbzWpKsKOLczJ/a2mSUMPxbZqzdYMAVc3KByDLRYK0PpiXafziFRy4JR2WbMK2J8vckDnapzTNFHoKXt6mumAoZpylJ80WJXCrWIxbnd+d1imU/ZlrmIa0eSxgAyEHIybAmz/gjeFa+E9A69HXkGbyBfnscws4mx0eHuzjG3sAuEF0G6PNsLZ+1+jcwjYxBuCE3hO8ctp4w9YIQrqJOus607girX1cJUu/BrZqPKrHRRfIBmL5Ic39poFyKdSY8rO8JcXgeVX69L/xMK4GuPiY7t2aevXa+lM7ePDhsHNEjMtUsb7uY1bDgyV1Uj+4YQKSjdSYNma++; 4:2PVBpvz7Vk4tV9XJY/hKyoSpAOWxId8wi88UhfN9qoWAJ3bRYum13mxnmhYdmUUbWJmuP0Y/ciMYqxribyfOWxBCi9Q7HVcz17YuwSXWTKkALkelcgAHLSP9zeh1cNrkdBr90QeyT4URFVl+SYrNRfqf3tqXQxoHAjMJPLryX3oSRG13PvArNPfqngUS7hpM2dRlX6EDhKBFPuBK04pCLX9zG4BOBIVfbG3teNAOsWmrCFHQGpDTMRKN5K3YcJwQJOM85epWtmYnnIjTLuWGx/Tovr6cFv2ESdy3Kqlsb402ByxINAa1Oxeu9VRP6ES4+nVvm+MwLj1CzcfjYHzyy3sRQiAVrJHd1hIIOQzejvro0gPQX6hLt2Sf2Dp/UdNk8ot3wiGU1NMpG1X+Jp0aSSCTzJT8n5Pu7Wh+rvk2WIM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:HKXPR06MB1016; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB1016; X-Forefront-PRVS: 07935ACF08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(50986999)(189998001)(122386002)(92566002)(229853001)(40100003)(5004730100002)(53416004)(19580405001)(19580395003)(5001960100002)(110136002)(50466002)(86362001)(76176999)(97736004)(46406003)(4001350100001)(105586002)(2950100001)(81156007)(106356001)(47776003)(87976001)(54356999)(1096002)(77096005)(36756003)(42186005)(66066001)(3846002)(6116002)(83506001)(69596002)(23726003)(5008740100001)(33646002)(101416001)(586003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB1016; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoR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= =?us-ascii?Q?erUp1ZqYsBE8ueZNESdMOjU6tHQ6tAoOfBdUrddKKqQvu66umaHL2fG6+/2+?= =?us-ascii?Q?d4652xZHmw/2YlcohQTOmiej4ejC1IcdVUDMB/0n6ZbtratfiQTjz4THw6jj?= =?us-ascii?Q?YahzjuG5BkmPITV+05pC3RmO4ojgsD/jzrvVEZagegFdo7vVy2apVS6EFiIw?= =?us-ascii?Q?fGVwkXsxsKbaYYAH144HlHgd4+ZOxrV83ykq2WN2vDBLtL73NduhYBAWBzOj?= =?us-ascii?Q?QxvE4OrQJ4iTXkLuF+/Q68yUZHZbxod84KWbffCmorJi87iAg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 5:iM1XM6dqkpDeWGQtoKPiLVsj8NCQtddU2x4XaPeJybHCvW8Fd4U4x6Zw1VvnrCpN1LhWvOq9TgsygyY+QIO/u0M1xmhs6WCEV/vvN5nIUP6/Upo456smF2kGFt2tUM/JIJNO9Jiouqxk4sU5gc0slw==; 24:cjgm6qFDt6bP3E/Gmx8sgnAEOvWDE4Teoc83lXAF/uu/v6HiZ41gcqzuShf/19cqbmzj0TVID1ooDVI8pXapIr0o5kU16dZ6QCd7FkXN1cw=; 20:XHJFLulGlq2ewXcRPhrUWUATrcFlcx4eiH4T/1YCXGzFLfBwF9tb4ZaYueQ9fZNFkpviOyVELM+BCpFIjljy0bCGn7w4t+8mdjtZ7Omb4xhOR5Grym2wlD4E59hKEzq7qrYHQo/hnA3m4vJL2pezXBWsXbU1fKH3/L/pzmwrIsM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2015 02:57:07.3449 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB1016 Cc: Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 06/12] ASoC: rsnd: remove rsnd_get_slot_runtime() 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 Current Renesas sound driver is using rsnd_get_slot_runtime(), but it is same as runtime->channels. This patch removes rsnd_get_slot_runtime() Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 19 ++++--------------- sound/soc/sh/rcar/rsnd.h | 1 - 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index e59dc8a..7f3a7ed 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -196,21 +196,10 @@ int rsnd_get_slot_rdai(struct rsnd_dai *rdai) return rdai->slots; } -int rsnd_get_slot_runtime(struct rsnd_dai_stream *io) -{ - struct rsnd_dai *rdai = rsnd_io_to_rdai(io); - struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); - int chan = rsnd_get_slot_rdai(rdai); - - if (runtime->channels < chan) - chan = runtime->channels; - - return chan; -} - int rsnd_get_slot_extend(struct rsnd_dai_stream *io) { - int chan = rsnd_get_slot_runtime(io); + struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); + int chan = runtime->channels; /* TDM Extend Mode needs 8ch */ if (chan == 6) @@ -243,9 +232,9 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io) u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_priv *priv = rsnd_mod_to_priv(mod); + struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); struct device *dev = rsnd_priv_to_dev(priv); - struct rsnd_dai *rdai = rsnd_io_to_rdai(io); - u32 chan = rsnd_get_slot_rdai(rdai); + u32 chan = runtime->channels; switch (chan) { case 1: diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 4b677e0..e9909a4 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -294,7 +294,6 @@ void rsnd_mod_interrupt(struct rsnd_mod *mod, struct rsnd_dai_stream *io)); int rsnd_get_slot_rdai(struct rsnd_dai *rdai); -int rsnd_get_slot_runtime(struct rsnd_dai_stream *io); int rsnd_get_slot_extend(struct rsnd_dai_stream *io); /*