From patchwork Wed Dec 11 11:57:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 181199 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp427506ile; Wed, 11 Dec 2019 04:00:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyUWDtlKe51TnJxQkBkVD1t07WWpbdemBUbpdLBIhSDFpspkqhe/cJxwj/ECBcd0pw4yuil X-Received: by 2002:a05:6830:204a:: with SMTP id f10mr1992777otp.29.1576065602251; Wed, 11 Dec 2019 04:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576065602; cv=none; d=google.com; s=arc-20160816; b=SUaRp2Z1s0fuRLCrCT0nEyXAmWH4f1ygoUECLlJ9uFaRpiLWeBRcDlFrxUEk0b+YXi EtaMjijUOs94Axdh9/v4JCmNKvIXOt6L1QJunHE57QZYsHkbrhNsqhNwYAt4xPURP5w3 KWbwSlwKeFmA8LvAeqb/2ajsDEMK7adKNBLtit0cYH09gel6oohg+LI30SQGfY6LpL7x OKoP1Fk+NBKVnTLav6tuUoIA1p0b+tgT5ud/WjFWdbhhRYqJ2SERV4go2RE27mqwkE7w WldPPVrkpbSTOX/uOUMcqPjNoxlXEMzhFVcLAUVPTn4Dv/bWTAgV7P6PDPo0PEHy3yst EEGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=IUZhAm7MarZF8rXQjZ3aaj9AgL3RbJ/Ub6s73eIY03s=; b=JRkvbUQu+95Gv49ZZwO1IBk68lnJHEqHI7mVT0sug2LNrEunaDk/ml9CGOfxFvk8e7 yAgS6xj+fV48+SHUAs5SyagFWMj6ui02Lm7StjKhczYeZxEUW4xG+mAuMpmgdtYUDYxz PD7tXsvd5p3h6K0NkZABbY4pcx80/x6cmO9YWjFcW6mUXEV0s60AT5Lh0i44XzFK7Mvt Q5SOgL8ICgWcnhkBshuzlyppw4aq8L1ubZi/NfFEtukexttBOCARjCQg+/TYl8iAIIuc C7VjHGosl2X7WN0slg9+nvJq4tVs9Tfi7+5pCBr2MF2/lPN2C1PvNigvbRoSej5Td8Y3 MSRQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si896597otq.137.2019.12.11.04.00.01; Wed, 11 Dec 2019 04:00:02 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729155AbfLKMAA (ORCPT + 27 others); Wed, 11 Dec 2019 07:00:00 -0500 Received: from inva020.nxp.com ([92.121.34.13]:51666 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729131AbfLKMAA (ORCPT ); Wed, 11 Dec 2019 07:00:00 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D6151A08B5; Wed, 11 Dec 2019 12:59:58 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CE0E21A011A; Wed, 11 Dec 2019 12:59:52 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A8043402B4; Wed, 11 Dec 2019 19:59:45 +0800 (SGT) From: Shengjiu Wang To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, gregkh@linuxfoundation.org, kstewart@linuxfoundation.org, allison@lohutok.net, guennadi.liakhovetski@linux.intel.com, tglx@linutronix.de, shengjiu.wang@nxp.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: wm8962: fix lambda value Date: Wed, 11 Dec 2019 19:57:22 +0800 Message-Id: <1576065442-19763-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to user manual, it is required that FLL_LAMBDA > 0 in all cases (Integer and Franctional modes). Fixes: 9a76f1ff6e29 ("ASoC: Add initial WM8962 CODEC driver") Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8962.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0 Acked-by: Charles Keepax diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 3e5c69fbc33a..d9d59f45833f 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2788,7 +2788,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, if (target % Fref == 0) { fll_div->theta = 0; - fll_div->lambda = 0; + fll_div->lambda = 1; } else { gcd_fll = gcd(target, fratio * Fref); @@ -2858,7 +2858,7 @@ static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int s return -EINVAL; } - if (fll_div.theta || fll_div.lambda) + if (fll_div.theta) fll1 |= WM8962_FLL_FRAC; /* Stop the FLL while we reconfigure */