From patchwork Sat Sep 7 17:43:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 11136623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1477F13BD for ; Sat, 7 Sep 2019 17:44:43 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C1ED218AE for ; Sat, 7 Sep 2019 17:44:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FEAt72tS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C1ED218AE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=katsuster.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CC59338; Sat, 7 Sep 2019 19:43:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CC59338 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567878279; bh=FTCdMOYFbYq4mnz/GyFvwfgfDTtuM3+YWVuqVMKf3fo=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=FEAt72tS9lKY/a9H2sshYQDcEmd9+wFBYSGCQwQrObVan6iLV86x7LPehX54jF6gb xb4pGP1Ps6FmVhBTybOQ/XmisrKQiV/d+5jTfJC8D9T9kmTyK0azkH9eglRls0O3hA MCrF8xBfQICr9n0mFpVeaBcuHvnUK9wYlQPK5llg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2D8CDF803D1; Sat, 7 Sep 2019 19:43:49 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 63776F80448; Sat, 7 Sep 2019 19:43:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from www1102.sakura.ne.jp (www1102.sakura.ne.jp [219.94.129.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6C223F80157 for ; Sat, 7 Sep 2019 19:43:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6C223F80157 Received: from fsav402.sakura.ne.jp (fsav402.sakura.ne.jp [133.242.250.101]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x87Hhbm7008546; Sun, 8 Sep 2019 02:43:37 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav402.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav402.sakura.ne.jp); Sun, 08 Sep 2019 02:43:37 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav402.sakura.ne.jp) Received: from localhost.localdomain (118.153.231.153.ap.dti.ne.jp [153.231.153.118]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x87HhYmW008539 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Sep 2019 02:43:37 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Mark Brown Date: Sun, 8 Sep 2019 02:43:32 +0900 Message-Id: <20190907174332.19586-1-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 Cc: Katsuhiro Suzuki , alsa-devel@alsa-project.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: rockchip: ignore 0Hz sysclk X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" This patch ignores sysclk setting if it is 0Hz. Some codecs treat 0Hz sysclk as signal of applying no constraints. This driver does not have such feature but current implementation outputs 'Failed to set mclk' error message if machine driver sets 0Hz sysclk to this driver. Signed-off-by: Katsuhiro Suzuki --- sound/soc/rockchip/rockchip_i2s.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 88ebaf6e1880..af2d5a6124c8 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -419,6 +419,9 @@ static int rockchip_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id, struct rk_i2s_dev *i2s = to_info(cpu_dai); int ret; + if (freq == 0) + return 0; + ret = clk_set_rate(i2s->mclk, freq); if (ret) dev_err(i2s->dev, "Fail to set mclk %d\n", ret);