From patchwork Tue Nov 28 20:22:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119900 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2175294qgn; Tue, 28 Nov 2017 12:22:16 -0800 (PST) X-Google-Smtp-Source: AGs4zMYeVP9/JrVNZHMuVTARbFdh88TWvYHL6kO71Jt4F8mKcUDe+BZH8ZofwKdUitr/PYrcrwrY X-Received: by 10.28.157.7 with SMTP id g7mr585548wme.99.1511900536790; Tue, 28 Nov 2017 12:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511900536; cv=none; d=google.com; s=arc-20160816; b=twnoETVIGkBqOmpN07uls6N6yooCakF8gL74gdtKYi37Yv7U2Iq9oiZe8jAvYSe8n8 xg9vxbr1p22akpRQ80BoZ0YzWVCO1IDitJgQArer7NKMEU4/eS3XcAx4jZegYvb8zbvK /J4lqucQ6AnmZlRmvNvKu2XXTB2lMJDU5HNi/S73fx3nboNT0NiQr0rruklekonzf30E r2LDLJdm0Yp3/y3Zk5ERmp7hu0qPxTahv61I/zq3mAt93EVPtgzTBMAsJgoziKRTSAKQ csYzCFFZEnzshrZ9GaJAj5avkk3pJAb/q+GxKFkCUt4GeeMbkXsUnZEUtKJ9EanXpTn4 4qvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=YO/Fze2Rg+SRYeEgkYAsqoGq1ygXkh+Y2Ra4QaOyRsg=; b=jC7iZr0Fc4mJjpIQDcJCIDLR/JZQWlXwB1CMKHhASr9B2iMTBcDOr00rQHFW0t0kAP OrqWRu7Mdmmr+VHSbyUBREKVB43+GGxzXII1+Dl+00e1DX98EtcQGXjYew7gP61gj/OS L9snZ4bCnntDCJeJxM1Vn5+xoSeW1tNx4GMXshZcb2ElRC25oSEZtaKeihqaMuI6+OwK f+nf3rv5ms3VLi/QPJtSLxKdQE8t8YQs75RKPoxxZ68WeZwB78o1AD/uStZQf1Pl8LMq odt44+wzEx2EayXYH94dfic9uhqUHJLL0+RibcL3zJGrIG+IZCo5Z0BYox5/HZ1hIHqf 5pQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=A7G6328y; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 33si10747wry.156.2017.11.28.12.22.16; Tue, 28 Nov 2017 12:22:16 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=A7G6328y; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 46B7A267868; Tue, 28 Nov 2017 21:22:15 +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 D885B267869; Tue, 28 Nov 2017 21:22:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 642DF266B02 for ; Tue, 28 Nov 2017 21:22:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=/W5CeEEo/lgkbWp5nFLYg8XvHFvcl0fXTiF+4se6s2A=; b=A7G6328yQ2FK llRIkH/Y+cuKcz7O5SNq1PTjSAWY8Cunzt46SWdMKW+oJPy0FzWrcmhJs0dT0QYaX4U//ZhkU0v/C w48YhyUMCWKNh4xz0n3NTMM1XjitBVK1sCsqOb+UaAf+NOFxkdqfhwWiQBa7jCfjXCf0rg9wi8jUy iFhkU=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJmOL-000089-CZ; Tue, 28 Nov 2017 20:22:05 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJmOK-000894-UW; Tue, 28 Nov 2017 20:22:04 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87mv3z4xj5.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Tue, 28 Nov 2017 20:22:04 +0000 Cc: Takashi Iwai , alsa-devel@alsa-project.org, Mark Brown , Simon Subject: [alsa-devel] Applied "ASoC: rsnd: call snd_soc_disconnect_sync() when remove" to the asoc tree 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rsnd: call snd_soc_disconnect_sync() when remove has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 180d9ef58104dfae78622d01910b9b7756701134 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 6 Nov 2017 08:41:37 +0000 Subject: [PATCH] ASoC: rsnd: call snd_soc_disconnect_sync() when remove Renesas R-Car sound driver should be stopped if unbinded during playbacking/capturing. Otherwise clock open/close counter mismatch happen. One note is that we can't skip from remove function (= return -Exxx) in such case if user used unbind. Because unbind function doesn't check return value from each driver's remove function. This means we must to stop and remove driver in remove function. Now ASoC has snd_soc_disconnect_sync() for this purpose. Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.15.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index f12a88a21dfa..bd64dc6ec1c3 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1496,6 +1496,8 @@ static int rsnd_remove(struct platform_device *pdev) }; int ret = 0, i; + snd_soc_disconnect_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); for_each_rsnd_dai(rdai, priv, i) {