Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3034003ybe; Sun, 8 Sep 2019 05:52:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9G3jfLbrsMHuauacKRrtT3i1kJ0JSwH2U0n5ZQSGMrPi088m4AnhsxqzUgEDgJtcQaXin X-Received: by 2002:a50:adea:: with SMTP id b39mr18944456edd.16.1567947147819; Sun, 08 Sep 2019 05:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947147; cv=none; d=google.com; s=arc-20160816; b=Kemk8yw/I3BQrvUjc73ttY0mfapdLBY3I5vwdCaX/797XDN6yVqCB4LAimQJ/jb4RX OsLAm3JbG8iM224A2wBbTQSsavu74Ho8LPPPOcoBUf17B+eupG1OO4OVItIVu9gT1/W0 5eKVTa1MtWP6DfZTcMMacrLKv2ufBpSW5LRFaIHyLEIU3795352Af+9Z49LRZI0ERTsF K98sJSxsZVF+4bLArd2kS1WY43itPD1v4+c/UzcOeIMncZaEiD+B865Zha01NhLcqN1M 2/xQx576RRecRiihnxin30YcyscsyxEoQ+5aLAA2ze02KcbhNooZQJ7CNTGHPXNmF5WI XwFA== 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 :message-id:date:subject:cc:to:from; bh=umWMS76t7w6lgQWJZiuZGqOJandO3dWqklGBzJC76vE=; b=VrOr1a3shPShnuWoDGK0m+K9tOmAniTe/fBX527sPdOFwNqJqqScKia/ZSv0OreiNS URAZ7R8WimhX37SPJPh2HRIr3WJXMKUbJNk/XN/46fsOSs2YKxTOthXwHZ4rRj/pOnyR 6cqbUuZCRcWdufB9PpoF540s7y7g9ORQknKzN+UU/478xEBSVkCaWXNjiTcPIycEdYhE sHcr22YBTSGa474+UglLNUGKIIw/aiTeayLIq8720I2F7rZO9uXL4ooo0TDxseSxJ1pZ E8HyJEHrgqVVL22fWral6QN8hGwxSFyTo/kYyCtHVhSbpejsQWKtV479eLCz22ELMYSf 1H0Q== ARC-Authentication-Results: i=1; mx.google.com; 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 l12si1849280ejc.390.2019.09.08.05.52.04; Sun, 08 Sep 2019 05:52:27 -0700 (PDT) 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; 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 S2391932AbfIGRn6 (ORCPT + 99 others); Sat, 7 Sep 2019 13:43:58 -0400 Received: from www1102.sakura.ne.jp ([219.94.129.142]:36587 "EHLO www1102.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbfIGRn6 (ORCPT ); Sat, 7 Sep 2019 13:43:58 -0400 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 Cc: Heiko Stuebner , linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Katsuhiro Suzuki Subject: [PATCH] ASoC: rockchip: ignore 0Hz sysclk 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.23.0.rc1