Skip to content

Commit 6308c44

Browse files
Jack Yubroonie
authored andcommitted
ASoC: rt5659: Fix the lost powers for the HDA header
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 <[email protected]> Signed-off-by: Jack Yu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 41daf6b commit 6308c44

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

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)