All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: tlv320dac33: small power handling updates
@ 2010-05-17 11:21 Peter Ujfalusi
  2010-05-17 11:21 ` [PATCH 1/2] ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function Peter Ujfalusi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-05-17 11:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: felipe.balbi, broonie, lrg

Hello,

While testing suspend, it has been noticed, that the driver would
try to power off the codec more than once.
Since this case handled in the driver, and results no functional
defect we can lower the noise in the kernel log.

Also avoid the root cause of the multiple off calls by filtering
BIAS_OFF request when the codec was already OFF.

---
Felipe Balbi (1):
  ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function

Peter Ujfalusi (1):
  ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF

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

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

* [PATCH 1/2] ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
  2010-05-17 11:21 [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Peter Ujfalusi
@ 2010-05-17 11:21 ` Peter Ujfalusi
  2010-05-17 11:21 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF Peter Ujfalusi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-05-17 11:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: felipe.balbi, broonie, lrg

From: Felipe Balbi <felipe.balbi@nokia.com>

Since the cases when the same power state would be set again
handled gracefully, we do not need to use dev_warn.

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

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 007fe83..ad1795a 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -352,7 +352,7 @@ static int dac33_hard_power(struct snd_soc_codec *codec, int power)
 
 	/* Safety check */
 	if (unlikely(power == dac33->chip_power)) {
-		dev_warn(codec->dev, "Trying to set the same power state: %s\n",
+		dev_dbg(codec->dev, "Trying to set the same power state: %s\n",
 			power ? "ON" : "OFF");
 		goto exit;
 	}
-- 
1.7.1

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

* [PATCH 2/2] ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
  2010-05-17 11:21 [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Peter Ujfalusi
  2010-05-17 11:21 ` [PATCH 1/2] ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function Peter Ujfalusi
@ 2010-05-17 11:21 ` Peter Ujfalusi
  2010-05-17 13:54 ` [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Mark Brown
  2010-05-17 19:35 ` Liam Girdwood
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-05-17 11:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: felipe.balbi, broonie, lrg

Avoid calling the dac33_hard_power when the codec was
already in BIAS_OFF state.
This could happen in device suspend and module removal
time.

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

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index ad1795a..bcf6d93 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -589,6 +589,9 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec,
 		}
 		break;
 	case SND_SOC_BIAS_OFF:
+		/* Do not power off, when the codec is already off */
+		if (codec->bias_level == SND_SOC_BIAS_OFF)
+			return 0;
 		ret = dac33_hard_power(codec, 0);
 		if (ret != 0)
 			return ret;
-- 
1.7.1

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

* Re: [PATCH 0/2] ASoC: tlv320dac33: small power handling updates
  2010-05-17 11:21 [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Peter Ujfalusi
  2010-05-17 11:21 ` [PATCH 1/2] ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function Peter Ujfalusi
  2010-05-17 11:21 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF Peter Ujfalusi
@ 2010-05-17 13:54 ` Mark Brown
  2010-05-17 19:35 ` Liam Girdwood
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-05-17 13:54 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, felipe.balbi, lrg

On Mon, May 17, 2010 at 02:21:44PM +0300, Peter Ujfalusi wrote:

> Felipe Balbi (1):
>   ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
> 
> Peter Ujfalusi (1):
>   ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF

Both

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

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

* Re: [PATCH 0/2] ASoC: tlv320dac33: small power handling updates
  2010-05-17 11:21 [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Peter Ujfalusi
                   ` (2 preceding siblings ...)
  2010-05-17 13:54 ` [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Mark Brown
@ 2010-05-17 19:35 ` Liam Girdwood
  3 siblings, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2010-05-17 19:35 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, broonie, felipe.balbi

On Mon, 2010-05-17 at 14:21 +0300, Peter Ujfalusi wrote:
> Hello,
> 
> While testing suspend, it has been noticed, that the driver would
> try to power off the codec more than once.
> Since this case handled in the driver, and results no functional
> defect we can lower the noise in the kernel log.
> 
> Also avoid the root cause of the multiple off calls by filtering
> BIAS_OFF request when the codec was already OFF.
> 
> ---
> Felipe Balbi (1):
>   ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
> 
> Peter Ujfalusi (1):
>   ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
> 
>  sound/soc/codecs/tlv320dac33.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 

Applied.

Thanks

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

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

end of thread, other threads:[~2010-05-17 19:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 11:21 [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Peter Ujfalusi
2010-05-17 11:21 ` [PATCH 1/2] ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function Peter Ujfalusi
2010-05-17 11:21 ` [PATCH 2/2] ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF Peter Ujfalusi
2010-05-17 13:54 ` [PATCH 0/2] ASoC: tlv320dac33: small power handling updates Mark Brown
2010-05-17 19:35 ` Liam Girdwood

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.