alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM
@ 2011-03-24  7:11 Peter Ujfalusi
  2011-03-24 10:15 ` Mark Brown
  2011-03-26 15:52 ` Liam Girdwood
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2011-03-24  7:11 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

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>
---
 sound/soc/codecs/tlv320dac33.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 6c3735d..c109f6d 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -587,6 +587,9 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY("Right DAC Power",
 			    DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0),
 
+	SND_SOC_DAPM_SUPPLY("Codec Power",
+			    DAC33_PWR_CTRL, 4, 0, NULL, 0),
+
 	SND_SOC_DAPM_PRE("Pre Playback", dac33_playback_event),
 	SND_SOC_DAPM_POST("Post Playback", dac33_playback_event),
 };
@@ -619,6 +622,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
 	/* output */
 	{"LEFT_LO", NULL, "Output Left Amplifier"},
 	{"RIGHT_LO", NULL, "Output Right Amplifier"},
+
+	{"LEFT_LO", NULL, "Codec Power"},
+	{"RIGHT_LO", NULL, "Codec Power"},
 };
 
 static int dac33_add_widgets(struct snd_soc_codec *codec)
@@ -636,13 +642,10 @@ static int dac33_add_widgets(struct snd_soc_codec *codec)
 static int dac33_set_bias_level(struct snd_soc_codec *codec,
 				enum snd_soc_bias_level level)
 {
-	struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
 	switch (level) {
 	case SND_SOC_BIAS_ON:
-		if (!dac33->substream)
-			dac33_soft_power(codec, 1);
 		break;
 	case SND_SOC_BIAS_PREPARE:
 		break;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM
  2011-03-24  7:11 [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM Peter Ujfalusi
@ 2011-03-24 10:15 ` Mark Brown
  2011-03-26 15:52 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-03-24 10:15 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood

On Thu, Mar 24, 2011 at 09:11:49AM +0200, Peter Ujfalusi wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM
  2011-03-24  7:11 [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM Peter Ujfalusi
  2011-03-24 10:15 ` Mark Brown
@ 2011-03-26 15:52 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-03-26 15:52 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Mark Brown

On Thu, 2011-03-24 at 09:11 +0200, Peter Ujfalusi wrote:
> 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>

Applied.

Thanks

Liam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-26 15:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  7:11 [PATCH] ASoC: tlv320dac33: Move codec power up to DAPM Peter Ujfalusi
2011-03-24 10:15 ` Mark Brown
2011-03-26 15:52 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).