Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp55841ybz; Tue, 21 Apr 2020 04:39:24 -0700 (PDT) X-Google-Smtp-Source: APiQypLLoEzcVasjRTRLbswGAHWrY2RWisNlcRnihhpSq+vH/BsI1UXb1SUdPYRpuKRVSal3aAFx X-Received: by 2002:a50:e007:: with SMTP id e7mr18437319edl.361.1587469163933; Tue, 21 Apr 2020 04:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587469163; cv=none; d=google.com; s=arc-20160816; b=mpskx+8HqwA4gfydCJkdFCH+E6DJra1qqWiyB/jHhWQTpwlxVq3XzeSERt6Rw5FFFl Kgy/sD2RPCQyg9zYjlDPJ1Dcii8CSZfjOP1/MAXMjC+93fo+wVknHzU8DfYlsSMbuR2r kTZ3m2R/gW5pKrQloReHidHQZ7dEWS0/dVvnEiRz/5I1/4XcA7VpWmtMIfDOkA63SLEk soiDFkS/VqCFrguzYoOPXNdXzAWvWdODXdCodbX4e9eZHYqgU7b3uxzcGSC7zl/2oafL 0fO/D6wZFAvnvrIuVXjj6Qpt6hYwOZ6E0p0RVCLBsyl+6aUDc/r64VuyEZSDdwZBha7U PDbA== 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=B5j7afiOzFcBnXuFWaB9Ac2JZFySm12FMcuWWjSdE+4=; b=OBsLd+28k33qzlNrGCEMMEcZy0i5hRDlqcVw4fls2sJOujp+uVLhLSU1gT/AJAtDTf JsJIaNrRi3KBARbV5uYNWtd+v5sLAS3J39DEfwnM5geXlXmp8GlNFNrmF07ax+pqpk7a QWfTlkcKwg2YY95bfNTJjSTkmrkyuHOpnr6fkp75dj8T24i/m1ahcT94KWCYPrZCG3jh vyXJuzqb9ZL4SD/Kh7La20pEANnMD1kf4SoNLipcNZHpAp7ucCVXyzdB2lwrWaaYUavp mrurHDd2nM0yUmK17DFXjlple379KaOtvobyjof4sf7J4A560/85Xg/wRU+Rb8BwX1S3 mnYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s13si1376079ejr.484.2020.04.21.04.39.01; Tue, 21 Apr 2020 04:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728668AbgDULhU (ORCPT + 99 others); Tue, 21 Apr 2020 07:37:20 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48992 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728316AbgDULhU (ORCPT ); Tue, 21 Apr 2020 07:37:20 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8D59020044D; Tue, 21 Apr 2020 13:37:18 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 48960200C61; Tue, 21 Apr 2020 13:37:13 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9BD60402A8; Tue, 21 Apr 2020 19:37:06 +0800 (SGT) From: Shengjiu Wang To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, kstewart@linuxfoundation.org, allison@lohutok.net, shengjiu.wang@nxp.com, tglx@linutronix.de, info@metux.net, ckeepax@opensource.wolfsonmicro.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: wm8960: Fix wrong clock after suspend & resume Date: Tue, 21 Apr 2020 19:28:45 +0800 Message-Id: <1587468525-27514-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 After suspend & resume, wm8960_hw_params may be called when bias_level is not SND_SOC_BIAS_ON, then wm8960_configure_clocking is not called. But if sample rate is changed at that time, then the output clock rate will be not correct. So judgement of bias_level is SND_SOC_BIAS_ON in wm8960_hw_params is not necessary and it causes above issue. Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function") Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8960.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 55112c1bba5e..6cf0f6612bda 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -860,8 +860,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, wm8960->is_stream_in_use[tx] = true; - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON && - !wm8960->is_stream_in_use[!tx]) + if (!wm8960->is_stream_in_use[!tx]) return wm8960_configure_clocking(component); return 0; -- 2.21.0