From patchwork Wed Jul 15 07:12:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6793671 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 A78BCC05AC for ; Wed, 15 Jul 2015 07:18:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A230F20592 for ; Wed, 15 Jul 2015 07:18:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5514E20585 for ; Wed, 15 Jul 2015 07:18:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 098D02659EF; Wed, 15 Jul 2015 09:17:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 93BB3265881; Wed, 15 Jul 2015 09:14:29 +0200 (CEST) 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 36599265881; Wed, 15 Jul 2015 09:14:28 +0200 (CEST) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 7F38726595E for ; Wed, 15 Jul 2015 09:12:04 +0200 (CEST) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 15 Jul 2015 16:12:02 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id DCAB0424F0; Wed, 15 Jul 2015 16:12:02 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id DB2972806E; Wed, 15 Jul 2015 16:12:02 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id D66992806D; Wed, 15 Jul 2015 16:12:02 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id SAN25095; Wed, 15 Jul 2015 16:12:02 +0900 X-IronPort-AV: E=Sophos;i="5.15,477,1432566000"; d="scan'";a="190394659" Received: from mail-hk1lp0124.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.124]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 15 Jul 2015 16:12:02 +0900 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB0603.apcprd06.prod.outlook.com (10.161.10.153) with Microsoft SMTP Server (TLS) id 15.1.213.14; Wed, 15 Jul 2015 07:12:00 +0000 Message-ID: <87twt5vqwh.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87d1ztx5pb.wl%kuninori.morimoto.gx@renesas.com> References: <87d1ztx5pb.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Wed, 15 Jul 2015 07:12:00 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0017.jpnprd01.prod.outlook.com (25.161.225.155) To SG2PR06MB0603.apcprd06.prod.outlook.com (25.161.10.153) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0603; 2:5UtaCawTEb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u6on9nzEguAq3YTH+dO3KfnH5dVIJoYDzu8uK4R/xOeEbq4niHSvDPLqltLIjEVXsAnABw0E28wWKOJqDS4l04YtZ58GfODq1L1TnC5VVxMYQQVmySnlbNHdVsL8C1rAndQXleFNN9od79dHNub/ExpKzxit94liDn+oLdYDzsi0JHSAOcRinHENn5u4zxmm9PjcFuJMpg3ln4+IkkzqWSt+cQZHEDekE0JtoxCBeQpyVEkeZt5yzJnGuABKJLVMmiQXC4YbDbEcKeZKbDetrrmup0SepGKVdGA= SG2PR06MB0603: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:SG2PR06MB0603; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0603; X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(2950100001)(47776003)(66066001)(46406003)(42186005)(77096005)(92566002)(40100003)(23726002)(107886002)(53416004)(36756003)(189998001)(4001350100001)(110136002)(5001960100002)(46102003)(77156002)(122386002)(62966003)(33646002)(83506001)(50986999)(19580405001)(87976001)(50466002)(19580395003)(229853001)(54356999)(76176999)(86362001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0603; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0603; 23:ak6akl+5w2B/ScI2LydNoSppRkXFVTdU+N/DAjiOn+tj+iMDKSiKZ/D5ho3PfFTLcOnSooVHW+uGX0ZOapuxj1bmn/8AoPIT1gJdgeXi6dWPcIj0FXmZnSRLxrez1KcU3TPgrhdpNvAl2NkFwm1sMq1HGgCTVZ+FUau3eQk73qyJmsebm2n1/BTMmUtVESBYTpCb8aM4MBFq/4UCaiHL6XhN801Snzz12K8QmP53ejVUPj21a5hRgpGfZ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/uP+VoAMs+Dd+qszlCV7PRqlbZ4khF0LhslH7sLQ0fG1Men5Xj5uRt8qqXIA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2015 07:12:00.0506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0603 Cc: Linux-ALSA , shiiba , Liam Girdwood , komatsu , kobayashi , Simon Subject: [alsa-devel] [PATCH 13/35] ASoC: rsnd: dvc: make sure DVC soft reset 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 Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC, and these have similar register. xxxRSR (Software reset Register) is one of them. These xxxRSR need be set to 1 to 0 when software reset. Current rsnd driver has src.c / dvc.c, and we will have mix.c. It is readable if these have same named function. This patch adds rsnd_dvc_soft_reset() and make sure it Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi --- sound/soc/sh/rcar/dvc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 8a61aa3..24d0763 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -64,6 +64,12 @@ static const char * const dvc_ramp_rate[] = { "0.125 dB/8192 steps", /* 10111 */ }; +static void rsnd_dvc_soft_reset(struct rsnd_mod *mod) +{ + rsnd_mod_write(mod, DVC_SWRSR, 0); + rsnd_mod_write(mod, DVC_SWRSR, 1); +} + static void rsnd_dvc_volume_update(struct rsnd_dai_stream *io, struct rsnd_mod *mod) { @@ -160,15 +166,14 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, rsnd_mod_hw_start(dvc_mod); + rsnd_dvc_soft_reset(dvc_mod); + /* * fixme * it doesn't support CTU/MIX */ rsnd_mod_write(dvc_mod, CMD_ROUTE_SLCT, route[src_id]); - rsnd_mod_write(dvc_mod, DVC_SWRSR, 0); - rsnd_mod_write(dvc_mod, DVC_SWRSR, 1); - rsnd_mod_write(dvc_mod, DVC_DVUIR, 1); rsnd_mod_write(dvc_mod, DVC_ADINR, rsnd_get_adinr(dvc_mod, io));