All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: tlv320dac33: codec enable fixes
@ 2010-11-30 12:31 Peter Ujfalusi
  2010-11-30 12:31 ` [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip Peter Ujfalusi
  2010-11-30 12:31 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up Peter Ujfalusi
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2010-11-30 12:31 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

Hello,

two small fixes to avoid duplicated codec enable, which reduces
i2c access to the chip.

---
Peter Ujfalusi (2):
  ASoC: tlv320dac33: Do not enable the codec in init_chip
  ASoC: tlv320dac33: Avoid multiple soft power up

 sound/soc/codecs/tlv320dac33.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

-- 
1.7.3.2

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

* [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip
  2010-11-30 12:31 [PATCH 0/2] ASoC: tlv320dac33: codec enable fixes Peter Ujfalusi
@ 2010-11-30 12:31 ` Peter Ujfalusi
  2010-11-30 12:41   ` Mark Brown
  2010-11-30 15:45   ` Liam Girdwood
  2010-11-30 12:31 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up Peter Ujfalusi
  1 sibling, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2010-11-30 12:31 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

No need to enable the codec at this time.
The codec will be enabled  later by other events

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
 sound/soc/codecs/tlv320dac33.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index ccb267f..080ec91 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -315,8 +315,6 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
 	 clock source = internal osc (?) */
 	dac33_write(codec, DAC33_ANA_VOL_SOFT_STEP_CTRL, DAC33_VOLCLKEN);
 
-	dac33_write(codec, DAC33_PWR_CTRL, DAC33_PDNALLB);
-
 	/* Restore only selected registers (gains mostly) */
 	dac33_write(codec, DAC33_LDAC_DIG_VOL_CTRL,
 		    dac33_read_reg_cache(codec, DAC33_LDAC_DIG_VOL_CTRL));
-- 
1.7.3.2

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

* [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up
  2010-11-30 12:31 [PATCH 0/2] ASoC: tlv320dac33: codec enable fixes Peter Ujfalusi
  2010-11-30 12:31 ` [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip Peter Ujfalusi
@ 2010-11-30 12:31 ` Peter Ujfalusi
  2010-11-30 12:41   ` Mark Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Ujfalusi @ 2010-11-30 12:31 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

During playback start the codec has been already powered at
BIAS_ON event time, so there's no need to enable the codec again.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
 sound/soc/codecs/tlv320dac33.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 080ec91..a0ba5d1 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -642,7 +642,8 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec,
 
 	switch (level) {
 	case SND_SOC_BIAS_ON:
-		dac33_soft_power(codec, 1);
+		if (!dac33->substream)
+			dac33_soft_power(codec, 1);
 		break;
 	case SND_SOC_BIAS_PREPARE:
 		break;
-- 
1.7.3.2

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

* Re: [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip
  2010-11-30 12:31 ` [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip Peter Ujfalusi
@ 2010-11-30 12:41   ` Mark Brown
  2010-11-30 15:45   ` Liam Girdwood
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-11-30 12:41 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood

On Tue, Nov 30, 2010 at 02:31:45PM +0200, Peter Ujfalusi wrote:
> No need to enable the codec at this time.
> The codec will be enabled  later by other events
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

* Re: [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up
  2010-11-30 12:31 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up Peter Ujfalusi
@ 2010-11-30 12:41   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-11-30 12:41 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood

On Tue, Nov 30, 2010 at 02:31:46PM +0200, Peter Ujfalusi wrote:
> During playback start the codec has been already powered at
> BIAS_ON event time, so there's no need to enable the codec again.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

* Re: [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip
  2010-11-30 12:31 ` [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip Peter Ujfalusi
  2010-11-30 12:41   ` Mark Brown
@ 2010-11-30 15:45   ` Liam Girdwood
  1 sibling, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2010-11-30 15:45 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Mark Brown

On Tue, 2010-11-30 at 14:31 +0200, Peter Ujfalusi wrote:
> No need to enable the codec at this time.
> The codec will be enabled  later by other events
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
> ---
>  sound/soc/codecs/tlv320dac33.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
> index ccb267f..080ec91 100644
> --- a/sound/soc/codecs/tlv320dac33.c
> +++ b/sound/soc/codecs/tlv320dac33.c
> @@ -315,8 +315,6 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
>  	 clock source = internal osc (?) */
>  	dac33_write(codec, DAC33_ANA_VOL_SOFT_STEP_CTRL, DAC33_VOLCLKEN);
>  
> -	dac33_write(codec, DAC33_PWR_CTRL, DAC33_PDNALLB);
> -
>  	/* Restore only selected registers (gains mostly) */
>  	dac33_write(codec, DAC33_LDAC_DIG_VOL_CTRL,
>  		    dac33_read_reg_cache(codec, DAC33_LDAC_DIG_VOL_CTRL));

Both Applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

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

end of thread, other threads:[~2010-11-30 15:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 12:31 [PATCH 0/2] ASoC: tlv320dac33: codec enable fixes Peter Ujfalusi
2010-11-30 12:31 ` [PATCH 1/2] ASoC: tlv320dac33: Do not enable the codec in init_chip Peter Ujfalusi
2010-11-30 12:41   ` Mark Brown
2010-11-30 15:45   ` Liam Girdwood
2010-11-30 12:31 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid multiple soft power up Peter Ujfalusi
2010-11-30 12:41   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.