From patchwork Mon Mar 7 05:07:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8515561 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 BD7B5C0553 for ; Mon, 7 Mar 2016 05:08:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10EFD20142 for ; Mon, 7 Mar 2016 05:08:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3852C2012D for ; Mon, 7 Mar 2016 05:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbcCGFIJ (ORCPT ); Mon, 7 Mar 2016 00:08:09 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:30866 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750854AbcCGFII (ORCPT ); Mon, 7 Mar 2016 00:08:08 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 07 Mar 2016 14:08:06 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id EA66844C76; Mon, 7 Mar 2016 14:08:06 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id E265C8002E; Mon, 7 Mar 2016 14:08:06 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id DD7528002D; Mon, 7 Mar 2016 14:08:06 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id QAP20386; Mon, 7 Mar 2016 14:08:06 +0900 X-IronPort-AV: E=Sophos;i="5.22,549,1449500400"; d="scan'";a="205831590" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 07 Mar 2016 14:08:05 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Nh0l6sHInA1kDSkcuHPbAEpEFCXDKzGuP4kiK4LWvlY=; b=IDDjh3hysNRcbeh/OfhotpFp6H+1emkMPnCKYUVFT4c3AiIvjAdxPXAMmXu+0JgHasU6YytNhwqV3rWBJ+7oMZoQhjx2IVAcKQD1S6iTaeJoGYhAEcm9rbptTDmR9g40GZfuXeP9WQw2XCrX8wG1zDifhU+y2iaK+RNnrkXCo08= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=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.415.20; Mon, 7 Mar 2016 05:07:57 +0000 Message-ID: <87fuw2yj55.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/7] ASoC: rsnd: rename rsnd_enable_sync_convert() to rsnd_src_sync_is_enabled() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87lh5uyj9a.wl%kuninori.morimoto.gx@renesas.com> References: <87lh5uyj9a.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Mon, 7 Mar 2016 05:07:57 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0008.jpnprd01.prod.outlook.com (25.161.74.146) To HKXPR06MB1016.apcprd06.prod.outlook.com (25.161.181.156) X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 2:C4sXLMbl9juN7J2N4/2Gv+DniJmShuuCFbEWDtJv4et53hMFUZ6EdtJDOdqlM8IixgcdFwrfYdYN8H8xSlam4joEVnPJvITgmq5Wn930VkKRtxyyTeJOSQ2vaYwdJBi4HrCyPKg3dMJGmhxHOyLu4w==; 3:deUi7Oea+Mio6I4QhUvnACnJNhOiZfCTsORfrAMXNwvKVDkoAUr7lN74bzGUZs3HB0cabr3mmueRAhCAhRlY3vxBGMFMYtvh3C4FdYXzSfrGWum2xu7N99NAaK067w1h; 25:xWLL0s0yVcstYPU2avg7Y10nyY5Z6qn8VWMZEvI8LjPS6kd+l6OtCdHgHt49OBrPrjY93c6dJDrkg9dehN2hIR4zeva/qLlutd5T6HOt7wZ5ktVvpVBi38LAImr5tV2BT7MsVX2hjmXW5hV+GepZBhLnf08l5thHwoAVKGQGFRL521/if1vLeAvuvOtZpkfBg2QHsXsORn9TVoZ0NYPHfIsQwgmKBL4QAo9Y5u3DA40Z3gW9CVqsVVKAVduJ/21dWxA7Qt+U5U/nMI7oojXlwOK7KalM423DCU5T1vdmkQt+q3+ayJh14N5LtGaWM+Tg57JW1PSTT5MmE3KIXYlhEQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB1016; X-MS-Office365-Filtering-Correlation-Id: ac73106a-09fd-40eb-61f0-08d3464672d4 X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 20:9SRzcikg7Ckp8nPz5Ku/BFJ3Hqa12Gw732LpTiK4cnRj0mTOKeKgbBPBeWpcCUskLsVOZCiKoGIIFD9F7b7S8XXEt6zxk8thgjSq1gwRCXavGUbuL6mg5vqPOExpTETJsgeCr79kVKVckGrw4bPZym/+mbIP6ILiHuSS/U4aKUuV9NEZ4nuKFiUaQ/1FF6RiP3XolMsdJK3M+v4+fbDASRQ4gYAi5H/KMwftYY3OrbnHmdETBJR15fC/aNAuJG2faF1+ZPLqHTF1leqDeXrJTEtRzqwYadOJJfhw3e39I4Wfwi6uZ80ZYvwCvpmhD+NrwFjgwqusdVPMFZilnpMoglPMYbI2k0ndQAGhsU54edvvBxMxQhFCcu7rPbjJkltaGZdTmel6iGjde6oo+YP5tVwNGmalYXcMbbw1OnkHc3EfZ4TrFaaz1m1+5Yq4H2FxUCuCYpYpDIxcFLcX2fG/0/IwipgLxKt9K4WS9BDH4+JpWZd6Nv5zW//jvPekIo+c; 4:jLIwBwa3cEwpfM+OQVG/9vMoZdNBpNF4Hl6J+oIQDXd+vxlVRtmM5UXRY/6auwKAlduvPbxDdUvQU/wB13yiljlLaQdagF5daXnjYogIVaSd+bJfoWuXk8jmT0E0rdGY08AlWqRh0Nlszufg19KMgQru6ADLBcs1oEZpgQVoVzUe2gTbxPTcf8Tb8Okcxoj6njwWdHk/Jg3lD2tntOAedR7yTYuwOYLTpl5jjR5MB+xG1OhdZ3G3rO3DLTwzKQZ/TVH8dU2xZOkYpPGe2s+DFxepGOorxn0v4tixBC2a8hw0xONJHbG1qiVO0ZjS4UIFKaX7jFg77YXl5PMbsv2MzTrUgBKiXCuT+aNQdgZ2ZTWhWxJpXP5Li8d9K9RbWQq0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:HKXPR06MB1016; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB1016; X-Forefront-PRVS: 087474FBFA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(189998001)(229853001)(2950100001)(40100003)(77096005)(86362001)(42186005)(122386002)(87976001)(47776003)(110136002)(50466002)(33646002)(4326007)(46406003)(53416004)(66066001)(83506001)(5004730100002)(23726003)(2906002)(81166005)(586003)(6116002)(3846002)(4001350100001)(1096002)(19580395003)(92566002)(5008740100001)(54356999)(50986999)(76176999)(36756003)(19580405001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB1016; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HKXPR06MB1016; 23:vfhWQ7ihAliT3l84BbGOFkkTVEwn9a+m1zqv+QT/M?= =?us-ascii?Q?vOc1H6KdJK4cTYkxXvVi6i1zZZiQoHtPxOYdfrFsD3NQa/5uoaWAXEmju6HH?= =?us-ascii?Q?tDhOmtaJmF/C8drLT9gWva3iq7Jd+7QQE+ZIsCsr5oFqKrWFz6Cc7YFRpExq?= =?us-ascii?Q?MPP5mx/DrZGLjF2OZHrz8jL7U4INRdJlGOuIj0Bcp0xinsE1g5ofMo19ujCu?= =?us-ascii?Q?7IXgDryjh5CaVkA4TieYeUS83ga0UT3rTmOeNgUrW+zOq1rRG2/njaFmJ0wJ?= =?us-ascii?Q?4sTgaKA6jXqrjB6shBvTKlJQeDQCII4jcN29+gbuJyMFJJPj11wsy6fQmdTo?= =?us-ascii?Q?V3KplFCcz2xEwZS/5Pe5lKkVGrucsxsbPA1D+bxYrBbtk5DMYLye+6aaXjWv?= =?us-ascii?Q?vlQXniFE5W0ZYrEtJr0u5IY6tXOm+HHwrzRTqQWcq/6sYtJX15gZxmgHDUnH?= =?us-ascii?Q?u5cM7zBXRql43uWnkIcKJRM8mKyikNDnozqwMvWUsRhQFH3xoMK+EbcVoZYJ?= =?us-ascii?Q?lr/o5SGhovrs0XcvqulR4S6SbdqlJmkEqMyNpewQRJYIYGnnskBtTH2OSCqy?= =?us-ascii?Q?u+ckZ4aep9ddyg9BITCwZu1YYs3UUdP9V+KAh/Wsy2lepaH5hEY/X34Dv9Cm?= =?us-ascii?Q?rVYul/7y3/2TXDkcR4q+khaYpxkIbI+ats6WVM6fsz+DHNPzZzqOITM27m72?= =?us-ascii?Q?WZfhCMPvVRARz6K+o3XE7buGAwtPEIFK2YR/mOFpOoYmyKCy0l8SeZWA1T0j?= =?us-ascii?Q?bi7SO+Naym1pNTrAp3d/DCzxFa5mMUyCsxcigvd5wD56SI2ZHMqSccKoWASw?= =?us-ascii?Q?7PC+yqXumgZ6YYH5A6apXvs84mxJbe91FSNDfReBCHiw8V3vetKX5IEhszqN?= =?us-ascii?Q?Am5oS02g3t8Ux53MBULKPANosjxdsdqBIj4ej1U+mgk5geK6BAB80tIVApwE?= =?us-ascii?Q?x+Cl0IPAe9vlMNDpH/aWsHDbA0FW86xdbb+/LQJZi9VbZ9rjSOmevnCBGaSN?= =?us-ascii?Q?ctH6dmERcHaCvjnakQ6GCKYO0WPrGZOHgsvu5ur5cT5lQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 5:z7qM9/3PtS6E7pnD9Dpr3BK65P+sJeus3macKdFdIhaKGIQp9HQfwk9DvZME7/eFDrXTVkO+Ery926fFMZYVTg5kBoYgxy+3giXFBXod1sxluSljwCXwQd4Tcx8MEavicbdoqiHqXy3MH9e+0ND5dQ==; 24:DNQy120RqwjkPHvlSuD4vJOuPRU6hME/JLjPo+XUeLGTptWXBaMZEGOPu5ZrdzbnyGO5Awi4i8aDe1A02xKh/1XLadys+nV/3uQhlbE6DaA=; 20:jUR9CBFqneB61hwI7rbySq4qicjaGPpY7kFfBjjjNyL+88dj7OCb+iSOvNWabWeswUQJLnGZBp+eWx3LTsJNnQQlJbuNczgug53JMVVaj3vwtveq5VtNd6/jUnMdzQrw180gQghWJgT+QO6oBwrC4FWJgEooXTPXKPbGk52VQVk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2016 05:07:57.2079 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB1016 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto rsnd_enable_sync_convert() is for checking, not for setting. In order to avoid confusion, this patch renamed it to rsnd_src_sync_is_enabled() Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/src.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index d520690..1d5aedb 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -33,7 +33,7 @@ struct rsnd_src { #define rsnd_src_get(priv, id) ((struct rsnd_src *)(priv->src) + id) #define rsnd_src_to_dma(src) ((src)->dma) #define rsnd_src_nr(priv) ((priv)->src_nr) -#define rsnd_enable_sync_convert(src) ((src)->sen.val) +#define rsnd_src_sync_is_enabled(mod) (rsnd_mod_to_src(mod)->sen.val) #define rsnd_mod_to_src(_mod) \ container_of((_mod), struct rsnd_src, mod) @@ -102,7 +102,7 @@ static u32 rsnd_src_convert_rate(struct rsnd_dai_stream *io, if (!runtime) return 0; - if (!rsnd_enable_sync_convert(src)) + if (!rsnd_src_sync_is_enabled(mod)) return src->convert_rate; convert_rate = src->sync.val; @@ -175,7 +175,6 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io, struct rsnd_priv *priv = rsnd_mod_to_priv(mod); struct device *dev = rsnd_priv_to_dev(priv); struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); - struct rsnd_src *src = rsnd_mod_to_src(mod); u32 convert_rate = rsnd_src_convert_rate(io, mod); u32 ifscr, fsrate, adinr; u32 cr, route; @@ -222,7 +221,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io, if (convert_rate) { route = 0x1; - if (rsnd_enable_sync_convert(src)) { + if (rsnd_src_sync_is_enabled(mod)) { cr |= 0x1; route |= rsnd_io_is_play(io) ? (0x1 << 24) : (0x1 << 25); @@ -296,9 +295,9 @@ static int rsnd_src_irq(struct rsnd_mod *mod, /* * WORKAROUND * - * ignore over flow error when rsnd_enable_sync_convert() + * ignore over flow error when rsnd_src_sync_is_enabled() */ - if (rsnd_enable_sync_convert(src)) + if (rsnd_src_sync_is_enabled(mod)) sys_int_val = sys_int_val & 0xffff; rsnd_mod_write(mod, SRC_INT_ENABLE0, int_val); @@ -318,7 +317,6 @@ static void rsnd_src_status_clear(struct rsnd_mod *mod) static bool rsnd_src_error_occurred(struct rsnd_mod *mod) { - struct rsnd_src *src = rsnd_mod_to_src(mod); u32 val0, val1; bool ret = false; @@ -327,9 +325,9 @@ static bool rsnd_src_error_occurred(struct rsnd_mod *mod) /* * WORKAROUND * - * ignore over flow error when rsnd_enable_sync_convert() + * ignore over flow error when rsnd_src_sync_is_enabled() */ - if (rsnd_enable_sync_convert(src)) + if (rsnd_src_sync_is_enabled(mod)) val0 = val0 & 0xffff; if ((rsnd_mod_read(mod, SCU_SYS_STATUS0) & val0) || @@ -343,7 +341,6 @@ static int rsnd_src_start(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { - struct rsnd_src *src = rsnd_mod_to_src(mod); u32 val; /* @@ -351,7 +348,7 @@ static int rsnd_src_start(struct rsnd_mod *mod, * * Enable SRC output if you want to use sync convert together with DVC */ - val = (rsnd_io_to_mod_dvc(io) && !rsnd_enable_sync_convert(src)) ? + val = (rsnd_io_to_mod_dvc(io) && !rsnd_src_sync_is_enabled(mod)) ? 0x01 : 0x11; rsnd_mod_write(mod, SRC_CTRL, val);