Skip to content

Commit

Permalink
ASoC: tlv320dac33: Move DAC LR power on to a supply widget
Browse files Browse the repository at this point in the history
The power for the DACs need to be enabled, even when only
the analog bypass is in use with the codec, otherwise
the audio is going to be distorted.
Make sure that the DACs are powered all the time, when
there is audio activity.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Peter Ujfalusi authored and Liam Girdwood committed Dec 9, 2010
1 parent 9e87186 commit 76eac39
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sound/soc/codecs/tlv320dac33.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("LINEL"),
SND_SOC_DAPM_INPUT("LINER"),

SND_SOC_DAPM_DAC("DACL", "Left Playback", DAC33_LDAC_PWR_CTRL, 2, 0),
SND_SOC_DAPM_DAC("DACR", "Right Playback", DAC33_RDAC_PWR_CTRL, 2, 0),
SND_SOC_DAPM_DAC("DACL", "Left Playback", SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("DACR", "Right Playback", SND_SOC_NOPM, 0, 0),

/* Analog bypass */
SND_SOC_DAPM_SWITCH("Analog Left Bypass", SND_SOC_NOPM, 0, 0,
Expand All @@ -604,6 +604,11 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = {
SND_SOC_DAPM_REG(snd_soc_dapm_mixer, "Output Right Amplifier",
DAC33_OUT_AMP_PWR_CTRL, 4, 3, 3, 0),

SND_SOC_DAPM_SUPPLY("Left DAC Power",
DAC33_LDAC_PWR_CTRL, 2, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("Right DAC Power",
DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0),

SND_SOC_DAPM_PRE("Prepare Playback", playback_event),
};

Expand All @@ -618,6 +623,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Output Left Amplifier", NULL, "Analog Left Bypass"},
{"Output Right Amplifier", NULL, "Analog Right Bypass"},

{"Output Left Amplifier", NULL, "Left DAC Power"},
{"Output Right Amplifier", NULL, "Right DAC Power"},

/* output */
{"LEFT_LO", NULL, "Output Left Amplifier"},
{"RIGHT_LO", NULL, "Output Right Amplifier"},
Expand Down

0 comments on commit 76eac39

Please sign in to comment.