|
@@ -153,12 +153,12 @@ static int power_vag_event(struct snd_soc_dapm_widget *w,
|
|
|
struct snd_kcontrol *kcontrol, int event)
|
|
|
{
|
|
|
switch (event) {
|
|
|
- case SND_SOC_DAPM_PRE_PMU:
|
|
|
+ case SND_SOC_DAPM_POST_PMU:
|
|
|
snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
|
|
|
SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
|
|
|
break;
|
|
|
|
|
|
- case SND_SOC_DAPM_POST_PMD:
|
|
|
+ case SND_SOC_DAPM_PRE_PMD:
|
|
|
snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
|
|
|
SGTL5000_VAG_POWERUP, 0);
|
|
|
msleep(400);
|
|
@@ -219,12 +219,11 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
|
|
|
0, SGTL5000_CHIP_DIG_POWER,
|
|
|
1, 0),
|
|
|
|
|
|
- SND_SOC_DAPM_SUPPLY("VAG_POWER", SGTL5000_CHIP_ANA_POWER, 7, 0,
|
|
|
- power_vag_event,
|
|
|
- SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
|
|
-
|
|
|
SND_SOC_DAPM_ADC("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0),
|
|
|
SND_SOC_DAPM_DAC("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0),
|
|
|
+
|
|
|
+ SND_SOC_DAPM_PRE("VAG_POWER_PRE", power_vag_event),
|
|
|
+ SND_SOC_DAPM_POST("VAG_POWER_POST", power_vag_event),
|
|
|
};
|
|
|
|
|
|
/* routes for sgtl5000 */
|
|
@@ -232,16 +231,13 @@ static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = {
|
|
|
{"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */
|
|
|
{"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */
|
|
|
|
|
|
- {"ADC", NULL, "VAG_POWER"},
|
|
|
{"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */
|
|
|
{"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */
|
|
|
|
|
|
- {"DAC", NULL, "VAG_POWER"},
|
|
|
{"DAC", NULL, "AIFIN"}, /* i2s-->dac,skip audio mux */
|
|
|
{"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */
|
|
|
{"LO", NULL, "DAC"}, /* dac --> line_out */
|
|
|
|
|
|
- {"LINE_IN", NULL, "VAG_POWER"},
|
|
|
{"Headphone Mux", "LINE_IN", "LINE_IN"},/* line_in --> hp_mux */
|
|
|
{"HP", NULL, "Headphone Mux"}, /* hp_mux --> hp */
|
|
|
|