Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3918506pxj; Mon, 21 Jun 2021 09:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3u7rxjCuQOQSW9I9Ob9Qp2xEh1x93+9d7uH87NJi+9S/c49k7ftrFWnHLbd/fhly5L9s/ X-Received: by 2002:aa7:db0c:: with SMTP id t12mr282889eds.112.1624292475483; Mon, 21 Jun 2021 09:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292475; cv=none; d=google.com; s=arc-20160816; b=OnETyD0XoVrQwy9jFbVplnG4YEXXTIVSQKyYe7rGGa/T2t1RATHEsrnXzvg+sRhgUD Sx8G1RaOPTzobk2JSFWFW/7RbL0StPw3GKi+qoHFsIv6BIsPEXNOkxYuoEz5Zb4kmfdu FzxDEx1j7ODYivm3tLvvDRyQgdjI+jJ8PHwEYzx8q18KTCqz9mK/VdwY6i8zDR13yf1f ka3f2VmDs5E3IRWCOQgvobOrIDC+JG+SzPkYv90mYHXwuSbrQQ7eZ1UIVJLsDSSeF+UD rFFLevk2EI/ZIAgvcrfqEI1m1mimWnC0IYIcuK81kX0B0MIuxXmdVbdJ7V1xk2/8OYzA IDJw== 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=956RKRvTDb/ixl1Iahhu5vg9Q5UltZVJbYN5tVN7VVA=; b=gHjHqZUuUIxdVjh7K4arJruqBH2tsrHzSKCH1FUORfdrqNt3P0giU8PZhCIuA8L1RS NldsoeC3O1ucvWRMinHvZJzwNqKIX4fSjPATw+gVzHVGZz/1ZRHf/pf/JuIMbecD1fj7 /CjwoUIdPciMMJAjzQG/4iAk7FzBJy8tgVhqStKecXXotf+bwXnOE9oizwrlajlvDk3Y tvoTWW65q2vmSeVkRBMdFgXW1cpTUS0RYTg5dH66uR5tsg/oZzNPDEuODndaRKPHQaKz l+EXwqAaW/OWvyUqMhJx3XX/OXxXBHdLnRACqGAHTkEIZ4F/VmZO8DbRmrMHNOlArVxd sgnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XIP7CWLd; 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 l7si15121001edb.278.2021.06.21.09.20.53; Mon, 21 Jun 2021 09:21:15 -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=XIP7CWLd; 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 S231792AbhFUQVk (ORCPT + 99 others); Mon, 21 Jun 2021 12:21:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbhFUQUo (ORCPT ); Mon, 21 Jun 2021 12:20:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 30ACE611BD; Mon, 21 Jun 2021 16:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292309; bh=4djWdP+YP9qSSz2OtYTFed8UAOgPodRXrJ0ydVDkVzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIP7CWLdpPNoY3afodtAF2prcSlXVRG77F8FQg6ijUmZZV1CPHvQRlXTHY4OBlCti h2lnIZkQb83yIDeU1RIeaMBUV0I4tGFWDsz5iqte3Ao96nI9zKT+h615D0Gko0KtNd Yrcbklr12kGPFwQ/nhregel91X5eeh9D73iYmkFs= 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.4 44/90] ASoC: rt5659: Fix the lost powers for the HDA header Date: Mon, 21 Jun 2021 18:15:19 +0200 Message-Id: <20210621154905.612353474@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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 afd61599d94c..a28afb480060 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -2470,13 +2470,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), @@ -2501,8 +2506,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, @@ -3697,10 +3700,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