Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3941258pxj; Mon, 21 Jun 2021 09:50:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUQz8PcYiw4v4IUfiNQpBcW367IqdsXqY0mJfU14l9U9belxJJbg4+UfJ90Gj5PEfxtbWw X-Received: by 2002:a02:cdc9:: with SMTP id m9mr5285092jap.55.1624294243477; Mon, 21 Jun 2021 09:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294243; cv=none; d=google.com; s=arc-20160816; b=DoFmpvbUqa4kCZ+VK/ETn3A/8YsXBW88kNd1/lKV0TxuX5cAM2u0cZWOEu4at6w0MW IPJIn66fPcprrkxnJ2W7yq8aI0XqFRI2TX9xzYdNLcx1p5JfiWwkbwhWkiz4aP28Bn3W 0kfG5Va5eantSBSKeDMgC7YCX/gZV4Z+Tcv298Im0bA/qs7pXuQoRSl+Des1VMaHnVLO MTBHGKuouaG0idD1gDBZEbKALkZjaBxE1zebNjOra22Iq0iXYRLKKqOTh4S06jmpwUKx iopxdXgiN3G6klgy/VKk2GKCM5YuXcNu88nKQPqMkuRlp2nuJoo8A+23WbsJEprVhBFl mmEw== 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=R+vgLOJR+wfach94H0Nr+o2w+BfxXkbPQzvLGvqnYqo=; b=sSocIXTgo3NKX9ttfMMdIUfTwWuH1QbM4UCxhaR8XVioy8ZobGmbupCKf8GBvrla1Z u9zU9yERpO0JGgE3NL2jvRqe7vOtnuWCAj/uw/rp8Xgus2nNJO4iD9EMK0ogkjz3H+8I RBGOAGs6gyYdEQLqK8jAgkNrQDpJjTLm4FexhbAy2u3Eja27rm9ExER4t3KhIRtbSvWX lnMyNo4itdRq6FD+U+/peuw1l/RLFHvdF8mFn+kJZuXiO85pjUZXl1JZM/PAAVmnW05L b/ide2olokExGhPOrrvv49EGQo86Ugf8nTvASAQAIHSeQCFv/Q9QfiPNWj0Jg687xhs+ p1UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jmSVjfSL; 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 z11si1392157jap.110.2021.06.21.09.50.28; Mon, 21 Jun 2021 09:50: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=jmSVjfSL; 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 S232210AbhFUQuo (ORCPT + 99 others); Mon, 21 Jun 2021 12:50:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:37916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbhFUQrM (ORCPT ); Mon, 21 Jun 2021 12:47:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23DE36140F; Mon, 21 Jun 2021 16:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293200; bh=qna0s9b3nXSCyr1sPmpyt8aI5vVVDvjz9OIvUIi7AhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmSVjfSL7Q7oV8ZhDO+MPMV4uWBpUeOLuLxjhFqRmECjqwM+3/KjCvfBnfSOJ3Wuz BN5IKQE2kDXq0QPOBI7Fo7RbfuoTVhgpoYurbcQEg7gWHY//SiuDwPwJJqof28azqc +/yjy3AJj8o7HJaFcGgGdRaCFIGa3elZR09dEPMo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oder Chiou , Jack Yu , Mark Brown , Sasha Levin Subject: [PATCH 5.12 092/178] ASoC: rt5659: Fix the lost powers for the HDA header Date: Mon, 21 Jun 2021 18:15:06 +0200 Message-Id: <20210621154925.849140514@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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: Jack Yu [ Upstream commit 6308c44ed6eeadf65c0a7ba68d609773ed860fbb ] The power of "LDO2", "MICBIAS1" and "Mic Det Power" were powered off after the DAPM widgets were added, and these powers were set by the JD settings "RT5659_JD_HDA_HEADER" in the probe function. In the codec probe function, these powers were ignored to prevent them controlled by DAPM. Signed-off-by: Oder Chiou Signed-off-by: Jack Yu Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com> Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt5659.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 91a4ef7f620c..a9b079d56fd6 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -2433,13 +2433,18 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w, return 0; } -static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = { +static const struct snd_soc_dapm_widget rt5659_particular_dapm_widgets[] = { SND_SOC_DAPM_SUPPLY("LDO2", RT5659_PWR_ANLG_3, RT5659_PWR_LDO2_BIT, 0, NULL, 0), - SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0, - NULL, 0), + SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT, + 0, NULL, 0), SND_SOC_DAPM_SUPPLY("Mic Det Power", RT5659_PWR_VOL, RT5659_PWR_MIC_DET_BIT, 0, NULL, 0), +}; + +static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = { + SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0, + NULL, 0), SND_SOC_DAPM_SUPPLY("Mono Vref", RT5659_PWR_ANLG_1, RT5659_PWR_VREF3_BIT, 0, NULL, 0), @@ -2464,8 +2469,6 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = { RT5659_ADC_MONO_R_ASRC_SFT, 0, NULL, 0), /* Input Side */ - SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT, - 0, NULL, 0), SND_SOC_DAPM_SUPPLY("MICBIAS2", RT5659_PWR_ANLG_2, RT5659_PWR_MB2_BIT, 0, NULL, 0), SND_SOC_DAPM_SUPPLY("MICBIAS3", RT5659_PWR_ANLG_2, RT5659_PWR_MB3_BIT, @@ -3660,10 +3663,23 @@ static int rt5659_set_bias_level(struct snd_soc_component *component, static int rt5659_probe(struct snd_soc_component *component) { + struct snd_soc_dapm_context *dapm = + snd_soc_component_get_dapm(component); struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component); rt5659->component = component; + switch (rt5659->pdata.jd_src) { + case RT5659_JD_HDA_HEADER: + break; + + default: + snd_soc_dapm_new_controls(dapm, + rt5659_particular_dapm_widgets, + ARRAY_SIZE(rt5659_particular_dapm_widgets)); + break; + } + return 0; } -- 2.30.2