From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ASoC: rsnd: stop all working stream when .remove Date: Fri, 01 Sep 2017 10:17:11 +0200 Message-ID: References: <874lsnniv3.wl%kuninori.morimoto.gx@renesas.com> <87d17akgqr.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 54EDF266B70 for ; Fri, 1 Sep 2017 10:17:12 +0200 (CEST) In-Reply-To: <87d17akgqr.wl%kuninori.morimoto.gx@renesas.com> 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 To: Kuninori Morimoto Cc: Linux-ALSA , Mark Brown , Simon List-Id: alsa-devel@alsa-project.org On Fri, 01 Sep 2017 09:48:52 +0200, Kuninori Morimoto wrote: > > > Hi Takashi > > > > Driver should stop all working stream when .remove timing. > > > Current Renesas sound driver is assuming that all stream was > > > stopped when .remove but it was wrong. > > > This patch stops all working stream when .remove, otherwise > > > kernel will get damage for example in below case. > > > Special thanks to Truong, Hiep > > > > > > > cd /sys/bus/platform/drivers/rcar_sound > > > > aplay xxx.wav & > > > > echo ec500000.sound > unbind > > > > > > Reported-by: Hiep Cao Minh > > > Signed-off-by: Kuninori Morimoto > > > > The lack of stop sync is a known problem in the ALSA PCM > > infrastructure. The standard idiom is to do sync at both prepare and > > hw_free (or close) callbacks. > > Thanks. > This path main sync is for clk ON/OFF Hm, but it's managed as PCM trigger, no? How can the rsnd_io_is_working() return true after PCM streams are stopped? Takashi