summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2009-07-31 14:39:54 -0500
committerRob Herring <r.herring@freescale.com>2009-08-07 09:47:32 -0500
commit257059a3a26f2d507a9d10dfee0cff2ba1c2c21d (patch)
tree4c1b724185f0cfc180a1b5c6d4518b374800e0b5
parentf7e2a1d51853afaf7421e1cd2bd42732fd8f00b8 (diff)
ENGR00114820-1 Revert SGTL5000: Enable amixer controls Jack/Speaker Function
This reverts commit c93dade67610c073b19b8d36080fb386475767f3 (ENGR00111918). That commit brought back the pops that were fixed by ENGR00110076. Signed-off-by: Alan Tull <r80115@freescale.com>
-rw-r--r--sound/soc/codecs/sgtl5000.c14
-rw-r--r--sound/soc/imx/imx-3stack-sgtl5000.c13
2 files changed, 15 insertions, 12 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 6a43fcf7c2ab..d3f4ecdd34da 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -254,9 +254,6 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("HP_OUT"),
SND_SOC_DAPM_OUTPUT("LINE_OUT"),
- SND_SOC_DAPM_PGA("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0),
- SND_SOC_DAPM_PGA("LO", SGTL5000_CHIP_ANA_POWER, 0, 0, NULL, 0),
-
SND_SOC_DAPM_MUX("ADC Mux", SND_SOC_NOPM, 0, 0, &adc_mux),
SND_SOC_DAPM_MUX("DAC Mux", SND_SOC_NOPM, 0, 0, &dac_mux),
@@ -270,10 +267,8 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"ADC", NULL, "ADC Mux"},
{"DAC Mux", "DAC", "DAC"},
{"DAC Mux", "LINE_IN", "LINE_IN"},
- {"LO", NULL, "DAC"},
- {"HP", NULL, "DAC Mux"},
- {"LINE_OUT", NULL, "LO"},
- {"HP_OUT", NULL, "HP"},
+ {"LINE_OUT", NULL, "DAC"},
+ {"HP_OUT", NULL, "DAC Mux"},
};
static int sgtl5000_add_widgets(struct snd_soc_codec *codec)
@@ -675,6 +670,11 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec,
avoid pops. */
reg = sgtl5000_read(codec, SGTL5000_CHIP_ANA_POWER);
if ((reg & SGTL5000_HP_POWERUP) == 0) {
+ reg |= SGTL5000_HP_POWERUP;
+ reg |= SGTL5000_LINE_OUT_POWERUP;
+ sgtl5000_write(codec, SGTL5000_CHIP_ANA_POWER, reg);
+ msleep(10);
+
reg |= SGTL5000_VAG_POWERUP;
reg |= SGTL5000_REFTOP_POWERUP;
reg |= SGTL5000_DAC_POWERUP;
diff --git a/sound/soc/imx/imx-3stack-sgtl5000.c b/sound/soc/imx/imx-3stack-sgtl5000.c
index d38c0b26218b..bba68da621c9 100644
--- a/sound/soc/imx/imx-3stack-sgtl5000.c
+++ b/sound/soc/imx/imx-3stack-sgtl5000.c
@@ -296,6 +296,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
/* HP_OUT --> Headphone Jack */
{"Headphone Jack", NULL, "HP_OUT"},
+ /* LINE_OUT --> Line Out Jack */
+ {"Line Out Jack", NULL, "LINE_OUT"},
+
/* LINE_OUT --> Ext Speaker */
{"Ext Spk", NULL, "LINE_OUT"},
};
@@ -399,11 +402,10 @@ static int sgtl5000_set_spk(struct snd_kcontrol *kcontrol,
return 0;
sgtl5000_spk_func = ucontrol->value.enumerated.item[0];
- if (sgtl5000_spk_func) {
- snd_soc_dapm_enable_pin(codec, "Ext Spk");
- } else {
- snd_soc_dapm_disable_pin(codec, "Ext Spk");
- }
+ if (sgtl5000_spk_func)
+ snd_soc_dapm_enable_pin(codec, "Line Out Jack");
+ else
+ snd_soc_dapm_disable_pin(codec, "Line Out Jack");
snd_soc_dapm_sync(codec);
return 1;
@@ -431,6 +433,7 @@ static int spk_amp_event(struct snd_soc_dapm_widget *w,
static const struct snd_soc_dapm_widget imx_3stack_dapm_widgets[] = {
SND_SOC_DAPM_MIC("Mic Jack", NULL),
SND_SOC_DAPM_LINE("Line In Jack", NULL),
+ SND_SOC_DAPM_LINE("Line Out Jack", NULL),
SND_SOC_DAPM_SPK("Ext Spk", spk_amp_event),
SND_SOC_DAPM_HP("Headphone Jack", NULL),
};