From patchwork Mon Oct 26 08:40:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7486201 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 595A8BEEA4 for ; Mon, 26 Oct 2015 08:45:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92540206E3 for ; Mon, 26 Oct 2015 08:45:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 56279206C3 for ; Mon, 26 Oct 2015 08:45:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3446A26512A; Mon, 26 Oct 2015 09:44:59 +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 60D3326062C; Mon, 26 Oct 2015 09:42:52 +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 8DDB526062E; Mon, 26 Oct 2015 09:42:51 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id F0C3A26060E for ; Mon, 26 Oct 2015 09:41:03 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 26 Oct 2015 17:41:02 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 74F804D2F7; Mon, 26 Oct 2015 17:41:02 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 6064A2806E; Mon, 26 Oct 2015 17:41:02 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 5B6B42806D; Mon, 26 Oct 2015 17:41:02 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id TBK19715; Mon, 26 Oct 2015 17:41:02 +0900 X-IronPort-AV: E=Sophos;i="5.20,200,1444662000"; d="scan'";a="198438108" Received: from mail-pu1apc01lp0015.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.15]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 26 Oct 2015 17:41:01 +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 HK2PR06MB1009.apcprd06.prod.outlook.com (10.161.183.28) with Microsoft SMTP Server (TLS) id 15.1.306.13; Mon, 26 Oct 2015 08:40:59 +0000 Message-ID: <87pp023u3a.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: <871tci58tc.wl%kuninori.morimoto.gx@renesas.com> References: <871tci58tc.wl%kuninori.morimoto.gx@renesas.com> Date: Mon, 26 Oct 2015 08:40:59 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0002.jpnprd01.prod.outlook.com (25.161.74.140) To HK2PR06MB1009.apcprd06.prod.outlook.com (25.161.183.28) X-Micro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9Q00sRJeRB5x1HB+uCxTHzMFb4Kin92ccn9gdHnL/z7GdRuHW0G5xxM2OVKbUmoKH9FLSYRo+x48tiSsz+7+egSylmPq/9mbbOmucbDYO2irC5BLMaxZy4XQodSQZghkIyl8f3tLjr5cFsE9rbshV2Qo7D8WnnM35k7TnLNPn+Yekko; 4:haEl+bcMv00nAY6lHiP4fw8nd+cOV+t7Epgpw/Mfp50YaFxQCdHIzKIlDe9IhYbidWqlxInaIvMs5Fwy8RRQ7q9KAjJMqkd6f5JLsAjV2Kv7SRtCadpkPPENiYWlCVt0i0xfNWrt0zK3G8sbKl6Qb/LaWaUuAFAmJQekKUV+G3Ra+adZojluEHGnYFBgoC4QP+/v+kd3nqtT3/s1W1Lzb6GzjqwAaIaqevt4zY8x8Gfw6hcsD9y7t04abLn3ZstvhMjFydDAuXRRrmyv8Cz/3EhmrwBS0MjMk4ve19P4aESp54JhR9/VnbgaXfpUsO1gfCbu97vpfhI00uTnRjo9L8UYs2PPgg1Fin26z69hMxDUsm3QkIhWof544H+W7Njf X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(102215026); SRVR:HK2PR06MB1009; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1009; X-Forefront-PRVS: 0741C77572 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(86362001)(2950100001)(46406003)(33646002)(229853001)(19580395003)(54356999)(76176999)(5007970100001)(77096005)(106356001)(50986999)(5004730100002)(53416004)(42186005)(92566002)(36756003)(47776003)(101416001)(19580405001)(69596002)(40100003)(83506001)(189998001)(23726002)(66066001)(5001960100002)(5008740100001)(4001350100001)(97736004)(87976001)(81156007)(110136002)(50466002)(105586002)(122386002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1009; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1009; 23:Rk+Pg8jq7tFometVdedKSgQZ8DrfIr4ZREN/m1Ewo?= =?us-ascii?Q?2TRFFgdtDH1N3YPennwx3lP7oBeWcPQvxpSBhOKRa2GRdL5v4ngrcFC5jftn?= =?us-ascii?Q?yTl87rOMoc8PUq7kikqTpNnlV/7dProEvTld9MarDrpFvX//krKjl1SWo7K/?= =?us-ascii?Q?pcPGnnCF+98luB2KwtMLy6p4lyNJZJLOp4DMNNhVn+LTVL6LLNtscr7TDMW1?= =?us-ascii?Q?a0UeJNFpeZAzGTz+OR3i7J6bVBCc2EB9v3BGvzcj726fffKIPgzdqZRXPHGg?= =?us-ascii?Q?xmWJHpckYdxlvPGHghhaQmuzS84wpyrVzUdJysezKosHmnUg6Wgug9+1jCMJ?= =?us-ascii?Q?+TqrxpUHXoI4PQ70NYyI91CBf0j2ACvrqh2WuOiYKDPhj+vf3qOtDYVF+sXP?= =?us-ascii?Q?BZkBTsdl4KsNKDCi5rwTSQHyVQIIYmrat4hxrR0l00J+l4PXJW7KmkfduYea?= =?us-ascii?Q?IZjS9dJRuLsvc34iwRmIkPIEDIkMRmpjU4G04C98gxTTsy+hqXyYotS1/+Yu?= =?us-ascii?Q?YIQX0l3VN7h2NnLYo71ytfwiVVQjqr9m2g+rjsDf2pRbOBLDQ8FP6AAjkahY?= =?us-ascii?Q?Rw9/fUL36YtxzTLHVQ0+xUOf3LqmCuSQFwkwZ+aRt7WjxCZcn6pTGye1JycB?= =?us-ascii?Q?qJkZy1rmwRwU8k4pM1aRusbjoWtFO0l7Hes3EuI6bKTXJMjlzzWSS0XfqD+A?= =?us-ascii?Q?9tdJCAq7SPXe9qrxmfmQsY3AZfkbHD9bHhN7UH+O1fnygiRptEPa5mF4o3k9?= =?us-ascii?Q?HDFvrEf+U6ARYhV9GcTufl5HGduAwpPvocC9SzoIFuw5eSvgdopla0xSD8mZ?= =?us-ascii?Q?nCkAZTsFKxxAGqZPXr0Kkr9+IGI2IGf5LX1cYxbOYFZkOODk6kyVIl5oJyG0?= =?us-ascii?Q?x36JlQVwK+u4Hoz0o0jRmhPGy2VBhfGjpFbYRhN7agDmWjGPvZwCAy27+d9H?= =?us-ascii?Q?Ok1StmEb+tY3ptlZFSCDDgQxt/cDfbuVu6ENgvVakx5rC1TbugaHP5gQTRP7?= =?us-ascii?Q?FbEa0a2HKTqjN7tL4NZd99XZveFN/r1uvoGcVFkj5yPJo5DwbNGLor0XB5jq?= =?us-ascii?Q?y9WObV8W1TKMTXwILZ6Vs/JzB0A?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1009; 5:iLZ5m9hqjrd17r3AN/7Ey90zVit6hzbB4gj3dtxupC8vkWpj2J+MbcxnsSuyQsFPEfpEOOY5sX7ad2o54g3Ccf71edqVuDjthy77tS+vM9CyMKT2zTYHjhqfD4GT7oAFVtbjg8ZagMLNKtJ4bqwsIQ==; 24:osBLQ2kV6/2SCOt4zR6/c+SBNVWXFi7qhdSQU+sO4lhuWpG7dJY/HTzndLK6wCKdxfM8ITlnjyZ8aNDpSpMgNBFXdj+l0biIPQo3Sv9k/LM=; 20:4UN7/5d517hIYTlNzz3gY7IUsgjZ2ZcUkQe2bqfm+K7h/IVVGG28fKZ0d4ysj1H9ylwsITx97TaMmkT/usPWjTJf+FDcPQKWq+0jMGOLiJ6lOcRXtRPrGeBXGJvaro2Hs5MqoQn1CZDhZELiaMfxnq/0WAmFxnSRRnddzBWbmPU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2015 08:40:59.8380 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1009 Cc: Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 08/18] ASoC: rsnd: disable SRC.out only when stop timing 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 Because SRC is connected to DMA and DMA want to keep dreq when stop timing. This patch makes SRC stop SRC.out only when stop timing. And it stops both SRC.out/SRC.in when quit timing Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/src.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 513094e..3f6993f 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -665,13 +665,27 @@ static int _rsnd_src_stop_gen2(struct rsnd_mod *mod) { rsnd_src_irq_disable_gen2(mod); - rsnd_mod_write(mod, SRC_CTRL, 0); + /* + * stop SRC output only + * see rsnd_src_quit_gen2 + */ + rsnd_mod_write(mod, SRC_CTRL, 0x01); rsnd_src_error_record_gen2(mod); return rsnd_src_stop(mod); } +static int rsnd_src_quit_gen2(struct rsnd_mod *mod, + struct rsnd_dai_stream *io, + struct rsnd_priv *priv) +{ + /* stop both out/in */ + rsnd_mod_write(mod, SRC_CTRL, 0); + + return 0; +} + static void __rsnd_src_interrupt_gen2(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { @@ -943,7 +957,7 @@ static struct rsnd_mod_ops rsnd_src_gen2_ops = { .probe = rsnd_src_probe_gen2, .remove = rsnd_src_remove_gen2, .init = rsnd_src_init_gen2, - .quit = rsnd_src_quit, + .quit = rsnd_src_quit_gen2, .start = rsnd_src_start_gen2, .stop = rsnd_src_stop_gen2, .hw_params = rsnd_src_hw_params,