Message ID | 20190312174006.32174-1-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2b13bee3884926cba22061efa75bd315e871de24 |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC7631390 for <patchwork-alsa-devel@patchwork.kernel.org>; Tue, 12 Mar 2019 17:41:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E4B29831 for <patchwork-alsa-devel@patchwork.kernel.org>; Tue, 12 Mar 2019 17:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8D8E2982C; Tue, 12 Mar 2019 17:41:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 99B18297F5 for <patchwork-alsa-devel@patchwork.kernel.org>; Tue, 12 Mar 2019 17:41:31 +0000 (UTC) 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 3539F74C; Tue, 12 Mar 2019 18:40:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3539F74C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1552412489; bh=bpocLdjBst27jb8uRRfNgOUwlfztoYZHFQrdCxdjzmU=; h=From:To:Date:References:Cc:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=VkAPg9yVALiBoKzsELhnosCagdG+gfxJorpGzXEnj9I02Y5Ha0KmbJ2NUq6lbXk+1 3QDuAKj7HTxAwb1FpTRKHdZeLqM+9NdROiMPM23M6ZHshFvmOm38pgO2510Yrb9Dd+ E/oiIEwED7GF38sZXYYed7q1KVJZAg/t4xXYzUYU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7598F89693; Tue, 12 Mar 2019 18:40:38 +0100 (CET) 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 81B8BF896B7; Tue, 12 Mar 2019 18:40:36 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BDD61F89693 for <alsa-devel@alsa-project.org>; Tue, 12 Mar 2019 18:40:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BDD61F89693 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="QtqpZJIt" Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190312174024epoutp030557a6a0e2b8ea05f71caea9d67d7af2~LRuAIOUhF2128321283epoutp03b; Tue, 12 Mar 2019 17:40:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190312174024epoutp030557a6a0e2b8ea05f71caea9d67d7af2~LRuAIOUhF2128321283epoutp03b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1552412424; bh=CvIWIPw2q6Sbq8KzQUZymMcT3if/BXDwLPRSYwHf9ro=; h=From:To:Cc:Subject:Date:References:From; b=QtqpZJItnwp/Wcvpz4IyVfnnITIHVDytHAwAKwqq1IIchQsaPDxbSqH9XqmqmqKON 3QsXKtexEMjfq+tN4k+DK/lYzU3aRNc7c3mXKs9NA1pqo51f3ScTui7bMEkoF/ljLv ZwvWDiq7MRkq6zv0xjIGO8+yQXqZ+y+9wyLjLsqw= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190312174024epcas1p49f13a2adc59c082f695c31e1cf23831d~LRt-qv5570911009110epcas1p4K; Tue, 12 Mar 2019 17:40:24 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 59.E0.04108.70FE78C5; Wed, 13 Mar 2019 02:40:23 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190312174023epcas1p32bc468e295974dadc7c6e510e467e665~LRt-FYPbM2724127241epcas1p3A; Tue, 12 Mar 2019 17:40:23 +0000 (GMT) X-AuditID: b6c32a39-8b7ff7000000100c-37-5c87ef07168b Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5C.4B.03598.70FE78C5; Wed, 13 Mar 2019 02:40:23 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PO9000EIL30EK60@mmp1.samsung.com>; Wed, 13 Mar 2019 02:40:23 +0900 (KST) From: Sylwester Nawrocki <s.nawrocki@samsung.com> To: broonie@kernel.org, lgirdwood@gmail.com Date: Tue, 12 Mar 2019 18:40:06 +0100 Message-id: <20190312174006.32174-1-s.nawroc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b 2Dx2zrrL7rFpVSebR9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGXs2vqLteAAT8XDSxsZGxin cXUxcnJICJhIHJxxi72LkYtDSGAno8S5yWdYIJxfjBLvb3SxglSxCRhK9B7tYwSxRQS0Jebc 7GADKWIWaGWSeL98E1iRsEC4RNeOTewgNouAqsTJq5PBGngFrCUWdhxkglgnL7F6wwHmCYxc CxgZVjFKphYU56bnFhsVGOallusVJ+YWl+al6yXn525iBAbQtsNafTsY7y+JP8QowMGoxMOb sLs9Rog1say4MvcQowQHs5IIr0UOUIg3JbGyKrUoP76oNCe1+BCjNAeLkjjv7bxjkUIC6Ykl qdmpqQWpRTBZJg5OqQbGAK+ESdlWTv1hgXtfflzAsc77WYSYzfF2496t4vtfblFe8KJoquuN 6Y9OO7sWWmiGJVw+W5J/sr7zhPRXFXfjoMvLWPNFq3W5rx1RTlgtsFWbz+e8dADLsxMXJRbw +95/n9Ba7vqycHJq567vATdenZFiqmbpus99SfTLldWNa82rrXi5HYOUWIozEg21mIuKEwHs ydQwHAIAAA== X-CMS-MailID: 20190312174023epcas1p32bc468e295974dadc7c6e510e467e665 CMS-TYPE: 101P X-CMS-RootMailID: 20190312174023epcas1p32bc468e295974dadc7c6e510e467e665 References: <CGME20190312174023epcas1p32bc468e295974dadc7c6e510e467e665@epcas1p3.samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, jcsing.lee@samsung.com, linux-kernel@vger.kernel.org, krzk@kernel.org, Sylwester Nawrocki <s.nawrocki@samsung.com>, m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH] ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate 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" <alsa-devel.alsa-project.org> List-Unsubscribe: <https://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <https://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" <alsa-devel-bounces@alsa-project.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate
|
expand
|
diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index 694512f980fd..1dc54c4206f0 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -91,11 +91,11 @@ static int odroid_card_be_hw_params(struct snd_pcm_substream *substream, return ret; /* - * We add 1 to the rclk_freq value in order to avoid too low clock + * We add 2 to the rclk_freq value in order to avoid too low clock * frequency values due to the EPLL output frequency not being exact * multiple of the audio sampling rate. */ - rclk_freq = params_rate(params) * rfs + 1; + rclk_freq = params_rate(params) * rfs + 2; ret = clk_set_rate(priv->sclk_i2s, rclk_freq); if (ret < 0)
After commit fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling") the audio root clock frequency is configured improperly for 44100 sample rate. Due to clock rate rounding it's 20070401 Hz instead of 22579000 Hz. This results in a too low value of the PSR clock divider in the CPU DAI driver and too fast actual sample rate for fs=44100. E.g. 1 kHz tone has actual 1780 Hz frequency (1 kHz * 20070401/22579000 * 2). Fix this by increasing the correction passed to clk_set_rate() to take into account inaccuracy of the EPLL frequency properly. Fixes: fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling") Reported-by: JaeChul Lee <jcsing.lee@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> --- sound/soc/samsung/odroid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)