From patchwork Wed Apr 23 05:59:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4038901 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72FEBBFF02 for ; Wed, 23 Apr 2014 05:59:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9875B201F7 for ; Wed, 23 Apr 2014 05:59:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8BABB2017E for ; Wed, 23 Apr 2014 05:59:42 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E314D2650E4; Wed, 23 Apr 2014 07:59:40 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D6EFA2650C1; Wed, 23 Apr 2014 07:59: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 F11542650C2; Wed, 23 Apr 2014 07:59:27 +0200 (CEST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by alsa0.perex.cz (Postfix) with ESMTP id A3ABB2650C1 for ; Wed, 23 Apr 2014 07:59:19 +0200 (CEST) Received: by mail-pd0-f177.google.com with SMTP id y10so421399pdj.36 for ; Tue, 22 Apr 2014 22:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=s57GYg5T888BYJ9mHKzL8u+egWyfTEh8RjFbb1YXGEw=; b=iW5rb2uSNtEv+Bpr6BYoMrghg6j8ESxssUpvlSMV1NhOtomhFDHckOIR8mkciesT0r tNFhgK7Ue4qDi5Bq0Xr/KkaLcSfpVUoEs7DVs3Nu66itwLasRT92Aq/wiO0xsssjE//T QdDFXt+M1e2B38OClDfcKFaA1LjkPizbsL6eBmoGUM7hEvCFmvhBeaacrtRo78r0+tkm dfheJT990On3tywh9mDEzXCjIYo5FhXxTDtJ5XSDvCMb7CXKz13CUl5Dms6o1pNcxwkf F3MWlDRKfQP3aSV5+iE473hvsvUN+JISQihtWKvj91MvXJiHJ6Mcpk3hIgVaiBdHjGQZ yqnQ== X-Received: by 10.68.137.136 with SMTP id qi8mr51434027pbb.79.1398232757824; Tue, 22 Apr 2014 22:59:17 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id bu1sm62787075pbb.54.2014.04.22.22.59.13 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Apr 2014 22:59:16 -0700 (PDT) Date: Wed, 23 Apr 2014 14:59:12 +0900 Message-ID: <871twoio27.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown , Ryo Kataoka In-Reply-To: <3977b65ffbb84cc89b66739c5b13ebdd@HKXPR06MB040.apcprd06.prod.outlook.com> <3977b65ffbb84cc89b66739c5b13ebdd@HKXPR06MB040.apcprd06.prod.outlook.com> References: <20140418.140133.428086893.ko-abe@nk4lx2> <5350B75C.6030500@renesas.com> <20140418.145315.172551492.ko-abe@nk4lx2> <5350CD5D.9060800@renesas.com> <5b6857d989484e3690995c92920930ac@HKXPR06MB040.apcprd06.prod.outlook.com> <874n1kj3je.wl%kuninori.morimoto.gx@renesas.com> <8738h4j2wo.wl%kuninori.morimoto.gx@renesas.com> <3977b65ffbb84cc89b66739c5b13ebdd@HKXPR06MB040.apcprd06.prod.outlook.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: TOMOHARU FUKAWA , Linux-ALSA , NAOYA SHIIBA , Kuninori Morimoto , YOSHIFUMI HOSOYA , Ryusuke Sakato , Koei Abe , Magnus , Liam Girdwood , TOSHIAKI KOMATSU , KHIEM NGUYEN , Yusuke Goda , Simon , "simon@horms.net" , Kuninori Morimoto , YOSHIYUKI ITO Subject: [alsa-devel] [PATCH] ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lock 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 rsnd_soc_dai_trigger() will be called after rsnd_dai_pointer_update() function which is using rsnd_lock(). Thus, it should be called from outside of rsnd_lock(). Kernel will be hangup without this patch. Special thanks to Kataoka-san Reported-by: Ryo Kataoka Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 1f6981a..964463d 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -197,13 +197,12 @@ static void rsnd_dma_complete(void *data) * rsnd_dai_pointer_update() will be called twice, * ant it will breaks io->byte_pos */ - - rsnd_dai_pointer_update(io, io->byte_per_period); - if (dma->submit_loop) rsnd_dma_continue(dma); rsnd_unlock(priv, flags); + + rsnd_dai_pointer_update(io, io->byte_per_period); } static void __rsnd_dma_start(struct rsnd_dma *dma)