From patchwork Thu Mar 19 04:14:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6045631 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 928CE9F440 for ; Thu, 19 Mar 2015 04:16:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE9FA204D5 for ; Thu, 19 Mar 2015 04:16:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9B84B202F2 for ; Thu, 19 Mar 2015 04:16:47 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A3D5E2652E2; Thu, 19 Mar 2015 05:16:46 +0100 (CET) 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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 615A5265350; Thu, 19 Mar 2015 05:15:13 +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 25C26265350; Thu, 19 Mar 2015 05:15:12 +0100 (CET) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 14490265383 for ; Thu, 19 Mar 2015 05:14:09 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 19 Mar 2015 13:14:07 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 4CBEB4683C; Thu, 19 Mar 2015 13:14:07 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 1F15F80030; Thu, 19 Mar 2015 13:14:06 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id B26298002D; Thu, 19 Mar 2015 13:14:06 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id PAD19452; Thu, 19 Mar 2015 13:14:06 +0900 X-IronPort-AV: E=Sophos;i="5.11,427,1422889200"; d="scan'208";a="182290558" Received: from mail-hk1lp0123.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.123]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 19 Mar 2015 13:14:06 +0900 Received: from morimoto-PC.renesas.com (211.11.155.132) by HKXPR06MB312.apcprd06.prod.outlook.com (10.141.135.155) with Microsoft SMTP Server (TLS) id 15.1.112.19; Thu, 19 Mar 2015 04:14:04 +0000 Message-ID: <87fv91eia6.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: <87mw39eide.wl%kuninori.morimoto.gx@renesas.com> References: <87mw39eide.wl%kuninori.morimoto.gx@renesas.com> Date: Thu, 19 Mar 2015 04:14:04 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: TY1PR01CA0012.jpnprd01.prod.outlook.com (25.161.131.150) To HKXPR06MB312.apcprd06.prod.outlook.com (10.141.135.155) Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB312; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(92566002)(66066001)(87976001)(40100003)(46406003)(122386002)(36756003)(77096005)(83506001)(2950100001)(23726002)(50466002)(110136001)(50986999)(19580395003)(47776003)(62966003)(229853001)(54356999)(53416004)(42186005)(77156002)(46102003)(19580405001)(33646002)(86362001)(29513003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB312; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:HKXPR06MB312; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB312; X-Forefront-PRVS: 052017CAF1 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2015 04:14:04.1099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB312 Cc: Linux-ALSA , Simon , shiiba , Liam Girdwood , Das Biju Subject: [alsa-devel] [PATCH 05/10 v3] ASoC: rsnd: no more SRC restart when unusual situation 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 It will be SRC interrupt endless loop f unusual situation happen. This patch adds restart limit for it. Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change sound/soc/sh/rcar/src.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 6ce8985..cc93f32 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -620,13 +620,17 @@ static irqreturn_t rsnd_src_interrupt_gen2(int irq, void *data) if (rsnd_src_error_record_gen2(mod)) { struct rsnd_priv *priv = rsnd_mod_to_priv(mod); + struct rsnd_src *src = rsnd_mod_to_src(mod); struct device *dev = rsnd_priv_to_dev(priv); - _rsnd_src_stop_gen2(mod); - _rsnd_src_start_gen2(mod); - dev_dbg(dev, "%s[%d] restart\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); + + _rsnd_src_stop_gen2(mod); + if (src->err < 1024) + _rsnd_src_start_gen2(mod); + else + dev_warn(dev, "no more SRC restart\n"); } return IRQ_HANDLED;