Skip to content

Commit 02e2455

Browse files
Jack Yugregkh
authored andcommitted
ASoC: rt5659: Fix the lost powers for the HDA header
[ Upstream commit 6308c44 ] 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 <oder_chiou@realtek.com> Signed-off-by: Jack Yu <jack.yu@realtek.com> Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3fb6c6a commit 02e2455

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

‎sound/soc/codecs/rt5659.c‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,13 +2433,18 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w,
24332433
return 0;
24342434
}
24352435

2436-
static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
2436+
static const struct snd_soc_dapm_widget rt5659_particular_dapm_widgets[] = {
24372437
SND_SOC_DAPM_SUPPLY("LDO2", RT5659_PWR_ANLG_3, RT5659_PWR_LDO2_BIT, 0,
24382438
NULL, 0),
2439-
SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0,
2440-
NULL, 0),
2439+
SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT,
2440+
0, NULL, 0),
24412441
SND_SOC_DAPM_SUPPLY("Mic Det Power", RT5659_PWR_VOL,
24422442
RT5659_PWR_MIC_DET_BIT, 0, NULL, 0),
2443+
};
2444+
2445+
static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
2446+
SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0,
2447+
NULL, 0),
24432448
SND_SOC_DAPM_SUPPLY("Mono Vref", RT5659_PWR_ANLG_1,
24442449
RT5659_PWR_VREF3_BIT, 0, NULL, 0),
24452450

@@ -2464,8 +2469,6 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
24642469
RT5659_ADC_MONO_R_ASRC_SFT, 0, NULL, 0),
24652470

24662471
/* Input Side */
2467-
SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT,
2468-
0, NULL, 0),
24692472
SND_SOC_DAPM_SUPPLY("MICBIAS2", RT5659_PWR_ANLG_2, RT5659_PWR_MB2_BIT,
24702473
0, NULL, 0),
24712474
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,
36603663

36613664
static int rt5659_probe(struct snd_soc_component *component)
36623665
{
3666+
struct snd_soc_dapm_context *dapm =
3667+
snd_soc_component_get_dapm(component);
36633668
struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
36643669

36653670
rt5659->component = component;
36663671

3672+
switch (rt5659->pdata.jd_src) {
3673+
case RT5659_JD_HDA_HEADER:
3674+
break;
3675+
3676+
default:
3677+
snd_soc_dapm_new_controls(dapm,
3678+
rt5659_particular_dapm_widgets,
3679+
ARRAY_SIZE(rt5659_particular_dapm_widgets));
3680+
break;
3681+
}
3682+
36673683
return 0;
36683684
}
36693685

0 commit comments

Comments
 (0)