@@ -198,13 +198,13 @@ static int small_pop_event(struct snd_soc_dapm_widget *w,
{
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
- SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
+// snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+// SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
break;
case SND_SOC_DAPM_PRE_PMD:
- snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
- SGTL5000_VAG_POWERUP, 0);
+// snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+// SGTL5000_VAG_POWERUP, 0);
msleep(400);
break;
default:
@@ -1153,11 +1153,13 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
/* VDDC use VDDIO rail */
- lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
- lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
- SGTL5000_VDDC_MAN_ASSN_SHIFT;
+// lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
+// lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
+// SGTL5000_VDDC_MAN_ASSN_SHIFT;
}
+// ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP | SGTL5000_VAG_POWERUP | SGTL5000_HP_POWERUP;
+ ana_pwr |= 0x5afb;
snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, lreg_ctrl);
snd_soc_write(codec, SGTL5000_CHIP_ANA_POWER, ana_pwr);
@@ -1194,9 +1196,9 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
else
vag = (vag - SGTL5000_ANA_GND_BASE) / SGTL5000_ANA_GND_STP;
- snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
- vag << SGTL5000_ANA_GND_SHIFT,
- vag << SGTL5000_ANA_GND_SHIFT);
+// snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
+// vag << SGTL5000_ANA_GND_SHIFT,
+/// vag << SGTL5000_ANA_GND_SHIFT);
/* set line out VAG to vddio / 2, in range (0.8v, 1.675v) */
vag = vddio / 2;
@@ -1208,14 +1210,15 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
else
vag = (vag - SGTL5000_LINE_OUT_GND_BASE) /
SGTL5000_LINE_OUT_GND_STP;
-
+#if 1
snd_soc_update_bits(codec, SGTL5000_CHIP_LINE_OUT_CTRL,
- vag << SGTL5000_LINE_OUT_GND_SHIFT |
+// vag << SGTL5000_LINE_OUT_GND_SHIFT |
SGTL5000_LINE_OUT_CURRENT_360u <<
SGTL5000_LINE_OUT_CURRENT_SHIFT,
- vag << SGTL5000_LINE_OUT_GND_SHIFT |
+// vag << SGTL5000_LINE_OUT_GND_SHIFT |
SGTL5000_LINE_OUT_CURRENT_360u <<
SGTL5000_LINE_OUT_CURRENT_SHIFT);
+#endif
return 0;
}
@@ -1378,7 +1381,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL,
SGTL5000_HP_ZCD_EN |
- SGTL5000_ADC_ZCD_EN);
+ SGTL5000_ADC_ZCD_EN
+ | SGTL5000_LINE_OUT_MUTE);
snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0);