Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3925347pxj; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztJQdpDqIKXXIsesIPd3g1CuymHEVWARotjqRQ9YCpAzrf+ULnD6bRFTzHbH0bdPU2RSiQ X-Received: by 2002:aa7:dad5:: with SMTP id x21mr12078781eds.280.1624293020100; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293020; cv=none; d=google.com; s=arc-20160816; b=0FiWfvD7Tr1hl3Szs8mg0CWPDU8WTGyBGi023Pcl/7lcfGZXA63iLJmvoeNV13lzGM nqNtZcQ4QpCMbGXiv7neL9kBOGSuS4eT2XpaFcx/1LVKU70sYTetEH4YiJ84fT3GwLEH ypNt9Uo05P7ifGGKNmkwRGVL4fGXC86fqMKt0ccby/35TWxy08uFLFIPn8d69W1xwb43 ec5Vj5GZZeOvaE9tDco/9dUKrNvEu9LqLpdRumL4rWg3RZFT0NCKXH5ycGw8jXhwmwh0 a4XfIaTWU0lXedkvmEBoZCXt4leSIA2jf56WsRwK6T+C9VB0mSpQeTkil18rHgE62ZXw q0cQ== 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=mCFCgo/zarrSs+xW1L5egzhH+qe9gQSr4caii6x95Gme6Q/JfPSPHzTQVDVj/d3Kzo 7Hi4x6gTJCQV8PMil4GLPqegouyJKkB2eMjCu2+g2+6zG3FjrQn+fYTElrTY7hR5aZKd 5LSZIFD6zWqSLBiu3rtssHzA7ZHyluhnCyELWXLEtftdJlzxsm0lHVELOEVzdS8moPnI 8YkoeIEea9MLKTlxBjoslRj5pBlhkkl7p0kcSNRUc4pd9yiqXb8TFhTnnSqyYxECJfez tVJ/Xce3XVizXCymIMJfQwaKHm5+g6Q0H98fcbUYfui4Yu0JDShROKWwY0oVUoySZPfx gg2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YJ99+ZYd; 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 4si10596939ejr.388.2021.06.21.09.29.57; Mon, 21 Jun 2021 09:30:20 -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=YJ99+ZYd; 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 S232402AbhFUQbS (ORCPT + 99 others); Mon, 21 Jun 2021 12:31:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:46838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbhFUQ3R (ORCPT ); Mon, 21 Jun 2021 12:29:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B626761289; Mon, 21 Jun 2021 16:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292650; bh=qna0s9b3nXSCyr1sPmpyt8aI5vVVDvjz9OIvUIi7AhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YJ99+ZYd+ONDpqVhJ/cEMg32WALKEtLI0ZVC++UuW5qd7zhzRp0Tkc8gTiUZ5OReN R+L+yEpzGOo0TqBFDLJtj0yRtGuGFTndo8HK3veAdJ5yifk42ClS7ehN2gaSb9jvIQ Oi6KjRti5bpPpSVHNlLQ9s0fhh9CaFF1J4+a+A4Q= 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.10 078/146] ASoC: rt5659: Fix the lost powers for the HDA header Date: Mon, 21 Jun 2021 18:15:08 +0200 Message-Id: <20210621154915.913018521@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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