Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp554807ybl; Wed, 11 Dec 2019 04:01:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzgs5XvuirIM3IrafSmv1F7fGiyAFOf5WQJlpFo52rDNL1KzgNWZuYjznKlKkGVTnd8H2v5 X-Received: by 2002:aca:48cf:: with SMTP id v198mr2455498oia.35.1576065664657; Wed, 11 Dec 2019 04:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576065664; cv=none; d=google.com; s=arc-20160816; b=Ucr3qimCVee92K7AIxnO47Hnvl9KoAD/yN+ru11n5F/Xy8iuFN60gptZSLMADVQCab BImhtnUWDopf+K07J2NGDp2fdoMLNTjpLk3W5jSm2KCef7Eonz7C8IZImETeGVcDt+Dc 97/FwdRctx5B2srJHmAIgALgqzsoYFqv8e3lNidIvKaw5hr1or54EChRk8bSAztYt7D+ 4Nf4xHr7JlKSt6YUXavcG6Vlvun6yKV5fivcbikpY3Ayz6pljkrY/AkCB+I+2GTrbwXO p8cHvBUFopWtJV9HKoijSz7DKZ4WddVv7h+0sYoq8IeNyKUjKQYaetnNnxuiLt3/ZXSS 5+3w== 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 k188si942571oib.201.2019.12.11.04.00.42; Wed, 11 Dec 2019 04:01:04 -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 S1729146AbfLKMAA (ORCPT + 99 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(-) 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 */ -- 2.21.0