aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320dac33.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2011-03-24 03:11:49 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-03-26 11:51:06 -0400
commit4b8ffdb959c35f5e271fb7e08635dbdb2593018f (patch)
tree6c347d35b182bfbb164b8f80a5e19ce870fea195 /sound/soc/codecs/tlv320dac33.c
parent333802e90d3f0366c4a1cb767e2783d2e1df73a8 (diff)
ASoC: tlv320dac33: Move codec power up to DAPM
Move the codec power on (in reg 0x01, bit 4) from set_bias_level:SND_SOC_BIAS_ON to a DAPM supply. In this way we can be sure, that all the things within the codec is powered before the external amp is going to be enabled. 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>
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r--sound/soc/codecs/tlv320dac33.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 00b6d87e7bdb..4857f2ae0666 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -583,6 +583,9 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = {
583 SND_SOC_DAPM_SUPPLY("Right DAC Power", 583 SND_SOC_DAPM_SUPPLY("Right DAC Power",
584 DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0), 584 DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0),
585 585
586 SND_SOC_DAPM_SUPPLY("Codec Power",
587 DAC33_PWR_CTRL, 4, 0, NULL, 0),
588
586 SND_SOC_DAPM_PRE("Pre Playback", dac33_playback_event), 589 SND_SOC_DAPM_PRE("Pre Playback", dac33_playback_event),
587 SND_SOC_DAPM_POST("Post Playback", dac33_playback_event), 590 SND_SOC_DAPM_POST("Post Playback", dac33_playback_event),
588}; 591};
@@ -615,6 +618,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
615 /* output */ 618 /* output */
616 {"LEFT_LO", NULL, "Output Left Amplifier"}, 619 {"LEFT_LO", NULL, "Output Left Amplifier"},
617 {"RIGHT_LO", NULL, "Output Right Amplifier"}, 620 {"RIGHT_LO", NULL, "Output Right Amplifier"},
621
622 {"LEFT_LO", NULL, "Codec Power"},
623 {"RIGHT_LO", NULL, "Codec Power"},
618}; 624};
619 625
620static int dac33_add_widgets(struct snd_soc_codec *codec) 626static int dac33_add_widgets(struct snd_soc_codec *codec)
@@ -632,13 +638,10 @@ static int dac33_add_widgets(struct snd_soc_codec *codec)
632static int dac33_set_bias_level(struct snd_soc_codec *codec, 638static int dac33_set_bias_level(struct snd_soc_codec *codec,
633 enum snd_soc_bias_level level) 639 enum snd_soc_bias_level level)
634{ 640{
635 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
636 int ret; 641 int ret;
637 642
638 switch (level) { 643 switch (level) {
639 case SND_SOC_BIAS_ON: 644 case SND_SOC_BIAS_ON:
640 if (!dac33->substream)
641 dac33_soft_power(codec, 1);
642 break; 645 break;
643 case SND_SOC_BIAS_PREPARE: 646 case SND_SOC_BIAS_PREPARE:
644 break; 647 break;