Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2026311imu; Fri, 14 Dec 2018 04:43:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uu+fHzYmrtfdK6V8IyT0Wto8+SnkrmHB1+wZ1HVy7SLlaA6b8gHiADikI0hkgAs6Gb2ImO X-Received: by 2002:a62:670f:: with SMTP id b15mr2699864pfc.212.1544791398700; Fri, 14 Dec 2018 04:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791398; cv=none; d=google.com; s=arc-20160816; b=SgZ6TNrdybNxQ2EnTNOWoLFtUVmHK8FvgiU95iBRJ1xl7HnAl1jneaLaTE/uqr0phq AaGt63rAgpSD2yKrogCOsiLps5JFk1YCH60RFcdxlG/433bHu5w7o4RrYJwOaATwU7um dG7qYI+7u4PO8TWTCdw6GD1oqt9/CyAbPSl6Mn+Er2APxO5nNqAhEX+wH5Ibk0lGBpq3 SY3coktdA0NQ20tR7SS6fGl1pG3kFf6WjmqsEiLxO2D+uaaCmzV2fXBTB58zyNmuzjeE LoWSrMTAHISmVkYLlLZyoXf1rqjocVfJi2VjRhc78u0pKAmW8CPDzQ17yWoCJqZ6oVKI SVLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g1mxUiG7Jay940beU2W+hDCZvsDaIWbDzt2ptRrC+/E=; b=zUy0nkIpxuCTX4Ctvhg1GiIAV5TRGCm7yUckewUvx9Cq3QdL66S4cyctHoT/Ldb0gk QGoRwNZK7G/4FukrNa7TnE0hs29faw8+sD0sRbhF8sgL54s2qaqIINwLgUYtTYaRiQ53 Wa+ivjUHk5YivJ/7/7tOmklNqNvF3u8WZns/oUvUA9OnULg6KVITK/pUqkGMierXRHFb f2wOH0md1dPnZLoAe/WY3MZlzOhpT2cwWnO9jiLEPf3kLgziaXRuTfzrFD5JEgSZpK4G lJ2Ekkx5ALdzyCHtgoXtgJ6bojyhp1XhJV4u+hnQ6/Qs5IPzzaXMDU4jNSamU73/IhU1 h8cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jqiWAH6w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si3696026plo.293.2018.12.14.04.43.03; Fri, 14 Dec 2018 04:43:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jqiWAH6w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730197AbeLNMC6 (ORCPT + 99 others); Fri, 14 Dec 2018 07:02:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:46096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730174AbeLNMC5 (ORCPT ); Fri, 14 Dec 2018 07:02:57 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E30BC2146F; Fri, 14 Dec 2018 12:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544788976; bh=VqVv3MVaWZ1EnqKzV1T5aPIyQlZ2MAK2hr/7w9JfD1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jqiWAH6wVjZgx/ytRelv+jykSI0eWOSpeeixu5Ra/y8gS6nBttto/YXRQ9YW3ivDj 27wStgZDtdPYjjL7Wk9GaHDQbsvMFy1QUNW4QxEY1F7GL1DTNLea+8M2eQNcxQQcdp Df7e+dpM1soYf1Xwp30V1olyeJPZpEuOKnojDgG4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yusuke Goda , Kuninori Morimoto , Mark Brown , Sasha Levin Subject: [PATCH 4.19 023/142] ASoC: rsnd: fixup clock start checker Date: Fri, 14 Dec 2018 12:58:28 +0100 Message-Id: <20181214115747.986058299@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 3ee9a76a8c5a10e1bfb04b81db767c6d562ddaf3 ] commit 4d230d12710646 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic") fixuped clock start timing. But it exchanged clock start checker from ssi->usrcnt to ssi->rate. Current rsnd_ssi_master_clk_start() is called from .prepare, but some player (for example GStreamer) might calls it many times. In such case, the checker might returns error even though it was not error. It should check ssi->usrcnt instead of ssi->rate. This patch fixup it. Without this patch, GStreamer can't switch 48kHz / 44.1kHz. Reported-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Tested-by: Yusuke Goda Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sh/rcar/ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 3f880ec66459..a566dae3ec8a 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -283,7 +283,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, if (rsnd_ssi_is_multi_slave(mod, io)) return 0; - if (ssi->rate) { + if (ssi->usrcnt > 1) { if (ssi->rate != rate) { dev_err(dev, "SSI parent/child should use same rate\n"); return -EINVAL; -- 2.19.1