From patchwork Mon Mar 7 05:07:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8515541 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 886FB9F7CA for ; Mon, 7 Mar 2016 05:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCC3A2010B for ; Mon, 7 Mar 2016 05:07:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22B5920142 for ; Mon, 7 Mar 2016 05:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbcCGFHe (ORCPT ); Mon, 7 Mar 2016 00:07:34 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:16649 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750854AbcCGFHe (ORCPT ); Mon, 7 Mar 2016 00:07:34 -0500 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 07 Mar 2016 14:07:32 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 590B14906E; Mon, 7 Mar 2016 14:07:32 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 589EF480A4; Mon, 7 Mar 2016 14:07:32 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 46115480A3; Mon, 7 Mar 2016 14:07:32 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id QBE06490; Mon, 7 Mar 2016 14:07:32 +0900 X-IronPort-AV: E=Sophos;i="5.22,549,1449500400"; d="scan'";a="207104246" Received: from mail-sg2apc01lp0246.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.246]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 07 Mar 2016 14:07:30 +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=KeUCMjcyvnedwUe+iyvHDVJqhWsr9smZCXI1Y5EN23w=; b=PNA9/aazmHQkI5CwUPVexELzeVueo/euSWbLLQ5YvT6JjAikyLf5zR1r04s2cEFNdcYnz5puvm77UJbFexDnUTbL5/xRr69lj81Okr4P/BrDN0q/fvjL8pUpw0zM+mhwQITWpkISxyWd9fTiGn3g3yqayIh8AsOi2IFTPlzuHAE= 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 HKXPR06MB1013.apcprd06.prod.outlook.com (10.161.137.28) with Microsoft SMTP Server (TLS) id 15.1.415.20; Mon, 7 Mar 2016 05:07:29 +0000 Message-ID: <87h9giyj5v.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/7] ASoC: rsnd: SRC function parameter uses "mod" instead of "src" 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:29 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0045.jpnprd01.prod.outlook.com (25.164.161.155) To HKXPR06MB1013.apcprd06.prod.outlook.com (25.161.137.28) X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1013; 2:OayFUXrROO6p0OwxTCdrzNoiR0soTVI3Gf0AJrz848kDXkjQorb9nJzrv36f2XUvGexUOyF+8czZvIO9EP8QXN4jDnmd+sX+6AiUNC6oqV/1C6dhVTopdtlO1Yi/mjl463+y3ekE/AyvdsrswPcZaA==; 3:Qlex6EbPX6KVbpwfR3SVU+5YZVanFWy30Xhqfdbv3HK/YFn7vX5WRcdV6vCw2ikb0wBB/ROL7GD69Nf7JvMYtGtDcFcEuDu0Uw+8iDntNmDVdJrcsX5J8Yvd885fNP+P; 25:dqXnTJ89TZ+cYepfQ2NbTa5hC6GVsyvZA1P49UnAOBSSlZ1C2aPziCJ1BRLanb5xnOQDwMNktjS8vlzqgtPBL9+TkdInixBzhzyIXt0GydR027cJYJDr+Z6H5cS4s/l6DzYBVMM+3QlWCCzAP4KPC+8h2AnDMjFaxmguKC7i6JtM8S/Ks1CKVtWvlJc7L8fdVKwjzXKaFFgZ/VH6K4jwbAW7672Og5bEq8gHmdgNi3Ku4vJjRctqL2RUBgOwVn4ZNZqDiGCv6bTXAfj5aQP7gLYWswR9XK1zGwQERTdMKajzmeapM804EorD/JV5f4FhPdFfdElObmHcZclaqSWJwA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB1013; X-MS-Office365-Filtering-Correlation-Id: 9e7b08da-df9d-4e87-ab6e-08d34646622a X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1013; 20:wqeL/Z0FRgqRB0NjO7aAy0ZNhyRSgHDlOXHZw+D+RTlziaYpgQ0Aa1Lv22RWA1/DpLdNw/OBfDIs47X/zIl2mL3tdXJRPphS7Gp0xm1JDDOfJ/QtfYv59W6/Jio0F+M/vS+0zYFaeFDBiQR7XwZkqxkq73h8cJCwOfz3HDKmJZMd3fM+PY4/R5sqr8dhzngWEnSt8XuNZqGxRR8s9EmX7Vue1/jrmRlCc9SzxWWEbFVryeP2TofLcZI+BwA2M8O1qwkUdNQP6YrMFxBDVG1cJ20oxnaMY5tnc2MXkW7gIOEyaDpucRNMiOVy9wiQHbEmUEcDgnyNTJW6Rdx5iQdEZSgEWMR5sCb8MXQxAwV3t0jYq+qqysX5Xykyzmhj6yz9+1+xvwW9BwL4905hnMbduLfV/xF1sm//0AJx/604d1wbjnSs3huJ1zHC4P2etgm9vSr4ScI4ZrEfcsn/z37uVSeSEp/fmTdK2yOCGJUE/sYQu13pvn4ihAr9MqRZtmQt; 4:6dWuNQHAosf4SFhXYGcRE3HNQMMw+z0vwZ4kzt1jc4SxIK4WF/ls21LAY6QH41vLMVO/VAygEnozw2kMGrTpA72+aMxFHaKnqrfopzyPo8WMK58z0H7U7xmjzhKqpXibhat+sRdN3kKqQqDruAjC9ADqcNdHlzMtsL5uVJL6j3uekkgGQNQ2uQuwYti9gCD4Gw3oLfVgDAUyBWrIXXQXCBM+srno5OYkkte5dQGHeKevUSGvQ8NDmLMSTeYTjNv0VPO5g3G50PkP2fnJzQrGi59XxMbtuVhPZJsqsG3ZAgCvIuXkdfuRVuI9NY6MSpr/9iKvGpRocolwQLskaCwEAWxxNYpywrwq9BIJmlsi2y50ujpjtvqwOXPq7CuvTxfB 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)(10201501046)(3002001); SRVR:HKXPR06MB1013; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB1013; X-Forefront-PRVS: 087474FBFA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(110136002)(189998001)(33646002)(5004730100002)(86362001)(50466002)(2950100001)(81166005)(42186005)(46406003)(77096005)(53416004)(87976001)(4001350100001)(50986999)(229853001)(76176999)(54356999)(36756003)(92566002)(19580405001)(1096002)(122386002)(2906002)(40100003)(4326007)(5008740100001)(47776003)(66066001)(23726003)(6116002)(3846002)(586003)(19580395003)(83506001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB1013; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HKXPR06MB1013; 23:2tTaOICeHFngqCfFTkN99mSP1pynLBuY6U/DiinVn?= =?us-ascii?Q?ZxJMdKTzXvVGT1w6ef34i/dN/wmw8f8higWfLOwlF8FT1yEpoUcOz6aYn+tL?= =?us-ascii?Q?n8Ttwb5jA1ZdI5YA3/iAYj3hYsutp7aMHGzPolWzFwvMxISibZQh+6Ft11dV?= =?us-ascii?Q?Ga/Jug5IW7ge5qu1BMEplcPtdz7pSB2CvwI/tgO95E/SG7j6D/UpgH6Nqhix?= =?us-ascii?Q?TP9qJm+YVE/ax4MT2U9+1R6WjUL+QjPiJg9pkOJZIfu4oCfXvNau+WWuc/w3?= =?us-ascii?Q?Y0f169qMlBXL37RUTussH4cAvXPO8AtzElzmxUaSNFaeNz9AmqobHA5XmDwl?= =?us-ascii?Q?rnksSVzLvEVfTQ8cLJBx5ItSpKGzGOpEm+HAGx+RK5u/Lc03/NUaEJXPLBL2?= =?us-ascii?Q?+q41lBEmuLhm53Aa+6lMnEHHXkHdH6BdOg/WLuejaoraVghSopN8L059qBwr?= =?us-ascii?Q?XOGZtXuuolih64XQiAcz6Kd0loDODe1Hn54+4Z0gqAslUjTjd3QlhPjKTguY?= =?us-ascii?Q?Y3lBETvONNAOELvaC62ciNUmDOjO1sAb6dyCXN3rmErrfDc/Z1s2nQL0L3rx?= =?us-ascii?Q?dmMkpbWwYGHsGWAboPkgOAsMUmypkMBGS0G4VRhsSVf+V7Kw2J8V2TX6fVh4?= =?us-ascii?Q?vIowL5aMsP2JHdNVBLyYEFm1Byo5FiXU2/gi/bN72tOg3es4QTWnjdNf7FuF?= =?us-ascii?Q?RBynpcuMiHfEZKYjsRclwlnyHQ/358OJayHHqScCc5/jbKTEZ9W4nHcy9zqH?= =?us-ascii?Q?wZMrKeWmE1GJhvQxmRuN3Jz53hBgcJ86aX7rN7jmgOiEavLAonl4tqqTHH1l?= =?us-ascii?Q?3WcLJvO9VlTMjMgp5/WIUmpUuYHFgZEqYi8OhDWlv/2G4Nq/PXhZGm+CZPbC?= =?us-ascii?Q?81A6W3x5+4+OoG7T4jI4FyfhWeYl9iBSKd6/UDHxyaBkYqCiFLNlUyPiXvzp?= =?us-ascii?Q?ItMLUCQvrOWaNtmErhZT0YKa+r7LAn1pjFCSW3KmTnlPESS9bd+CxkChQfve?= =?us-ascii?Q?MAWd0oB626J6T5w0aRa2t3znWtNCaDKqo89m6fDAMmoyQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1013; 5:1CToJW/FXbBsfiXmE/Lajgqc5nkI1s0RPJ2xLR7x6s4a6BGo015fHkfCZQ1Et3K5RhwIrh67nuXUXroBsWZ7ZiPFdBs+JwOqJnq60KAKkmhPgc34e7S8J0E7spa3V8aSqIDpkpZ9Kp3IiEHwGHxbOQ==; 24:WqoThDmZE0Sem3oZzG5QvWxYQXOgkESXbq9LPBCuHA8A5z1hGQVBcuOjU/+vt7RCirZMvyssoPTx39sTCFjhuvOW7axnXYvoPUwykBCbWus=; 20:wvn6oqRPQNKquxbnhC6XNnuJjrZnbjrYJmqMqrvK5sQQf2zqK3VJN/hEJK5r4GKNSZH287Nw9D2IzieVL9qjADAytizU27AzhPS+qfyDy2FrhMDvWQ6v6dHgO2mNVx6fpco6uLpyckXt73fsx26dkwfruWDtjZ2V8z5s1qvxxQc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2016 05:07:29.2521 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB1013 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 To reduce confusion, SRC uses "mod" instead of "src" as function parameter Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/src.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index ab974af..d520690 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -93,9 +93,10 @@ static struct dma_chan *rsnd_src_dma_req(struct rsnd_dai_stream *io, } static u32 rsnd_src_convert_rate(struct rsnd_dai_stream *io, - struct rsnd_src *src) + struct rsnd_mod *mod) { struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); + struct rsnd_src *src = rsnd_mod_to_src(mod); u32 convert_rate; if (!runtime) @@ -120,18 +121,14 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv, struct snd_pcm_runtime *runtime) { struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io); - struct rsnd_src *src; unsigned int rate = 0; - if (src_mod) { - src = rsnd_mod_to_src(src_mod); - - /* - * return convert rate if SRC is used, - * otherwise, return runtime->rate as usual - */ - rate = rsnd_src_convert_rate(io, src); - } + /* + * return convert rate if SRC is used, + * otherwise, return runtime->rate as usual + */ + if (src_mod) + rate = rsnd_src_convert_rate(io, src_mod); if (!rate) rate = runtime->rate; @@ -179,7 +176,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io, 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, src); + u32 convert_rate = rsnd_src_convert_rate(io, mod); u32 ifscr, fsrate, adinr; u32 cr, route; u32 bsdsr, bsisr;