Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp478893pxt; Fri, 6 Aug 2021 06:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxIxBI7ovXQZ8YIWwuavdVmo5HF8DDZrRHI/4wAdSDLwx8eMJTCg57+hniii4C8+AjSQNp X-Received: by 2002:a05:6e02:e0c:: with SMTP id a12mr136390ilk.179.1628257183699; Fri, 06 Aug 2021 06:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628257183; cv=none; d=google.com; s=arc-20160816; b=X2YKaIPpfeIiSrHAjCGOo3dbDyzbh95V1v2w/lWx79ln5epZQhm39rQRqwXA8wvmG1 tt59UWYvCU3ZrJ2vm4A7kMaoLBzzt+vkinPM8QNFpRoU8F6a+EcRdqIgNvPSzxcY2iu3 QwnTbLJEOjqBiDNwdYGZ7eCiOVjVEqmTFLbZly96hXepCyuei2CUL2y7fsdgcPkiEPrb vSD7bi8CF24yj+M2DnoI4NXJMbTZnYbXbrW7rPzNNrh7UA5bXSifk75nxeXLN69Y0RwW sGupIyy1+ZJ4GLPyL82+VtmetqTh1HljZclJ6JTIYenQ4LkiUJZsUpGlC3ssrxRUtSFN SL0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EJ3buuYFc489AZEvimZ1p+UBGpOHnpbJRHtDUCOgJi0=; b=L/fgRMm8uDkjIlvaJaaBq1RPL2tVmfWkIYXY0SCDErtF19nbaNRHpNg/QeL7lFEYuM 7NPhFA2DqISAQUGM2fGtxkJxQP6Qv5LksxeM3QgFFdJhxyiYnVgeOLubWqYJb/+ZQ3Rv 3kdvTid1yPvkok15641OgoTN0CWu67gNjpR6VKpi6YzSPdEy9NzTWfjs38vzvMyjGq5/ atgnkM4ZJ0LLPMDqgUxdiiet/W//gsICFbTaQ5zbntz7XUDl+SpryOg8Us5qsILpYJny kslxAZL7F8xiYJTGeVY9690LBKKuUaKORh5GZzhhNpihvkR2pB0p+qeW4OlN9Bx7W/m3 JK7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UMo9HhhI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si375888iob.65.2021.08.06.06.39.30; Fri, 06 Aug 2021 06:39:43 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UMo9HhhI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244747AbhHFIYM (ORCPT + 99 others); Fri, 6 Aug 2021 04:24:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:46112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244143AbhHFIUv (ORCPT ); Fri, 6 Aug 2021 04:20:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 28D886120A; Fri, 6 Aug 2021 08:20:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628238023; bh=xq9vaZuEISXwGZ9amMGFnKhviWUhwICbRCBqRFA/CAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMo9HhhIbhoLuQ8EpesrxKnyC8bLXcY6v5cdKhzodWr/ZNzLypLPQdG2OKqST3cFn +oWVXJmQAHkmvisG2eUfYshsZawMS/QpOlGP6z/HGTkC0A1/u+07fKtKA5Uxu9/zzt YPqRlorr9rSA1wvd/RX2IjMB0NW47AG1RpoIph4E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oder Chiou , Mark Brown , Sasha Levin Subject: [PATCH 5.13 22/35] ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend Date: Fri, 6 Aug 2021 10:17:05 +0200 Message-Id: <20210806081114.458380450@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.718626745@linuxfoundation.org> References: <20210806081113.718626745@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oder Chiou [ Upstream commit 6a503e1c455316fd0bfd8188c0a62cce7c5525ca ] While using the DMIC recording, the garbled data will be captured by the DMIC. It is caused by the critical power of PLL closed in the jack detect function. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20210716085853.20170-1-oder_chiou@realtek.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt5682.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index e4c91571abae..abcd6f483788 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -973,10 +973,14 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert) rt5682_enable_push_button_irq(component, false); snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1, RT5682_TRIG_JD_MASK, RT5682_TRIG_JD_LOW); - if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS")) + if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS") && + !snd_soc_dapm_get_pin_status(dapm, "PLL1") && + !snd_soc_dapm_get_pin_status(dapm, "PLL2B")) snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_MB, 0); - if (!snd_soc_dapm_get_pin_status(dapm, "Vref2")) + if (!snd_soc_dapm_get_pin_status(dapm, "Vref2") && + !snd_soc_dapm_get_pin_status(dapm, "PLL1") && + !snd_soc_dapm_get_pin_status(dapm, "PLL2B")) snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_VREF2, 0); snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3, -- 2.30.2