linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ASoC: wm8731: rework power management
Date: Wed, 29 Jun 2011 10:11:49 -0700	[thread overview]
Message-ID: <20110629171148.GB10798@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <ccd4b125244271af7978948689cf1dcef37bc06b.1309368631.git.nicolas.ferre@atmel.com>

On Wed, Jun 29, 2011 at 08:00:15PM +0200, Nicolas Ferre wrote:

Don't mix multiple changes into a single patch!  There's no perceptible
code overlap between these so I don't understand why you've merged them,
it just makes review harder and the changelog less descriptive.

> - preserve crystal oscillator across suspend/resume sequence:
>   enabled by default, it should be kept enabled on resume.

This isn't what your code does...

> - if codec is in active state: set the active bit at resume time.

Your changelog doesn't explain what the actual problem is here...  I can
see it by studying the diff but the changelog makes me think the change
is bad as the subsystem shuts everything down before it enters CODEC
suspend...

>  		snd_soc_write(codec, WM8731_ACTIVE, 0x0);
> -		snd_soc_write(codec, WM8731_PWR, 0xffff);
> +		/* standby: keep crystal oscillator enabled */
> +		snd_soc_write(codec, WM8731_PWR, 0x00df);

This doesn't keep the crystal oscillator enabled, this forces it on in
suspend (and without looking at the datasheet it also changes way more
than the one register bit I'd expect to be changed).  If the system
isn't using the oscillator then that's not good.

I'd expect to see a change to using snd_soc_update_bits() based on your
description, or more likely something more involved.

> @@ -533,6 +534,8 @@ static int wm8731_suspend(struct snd_soc_codec *codec, pm_message_t state)
>  static int wm8731_resume(struct snd_soc_codec *codec)
>  {
>  	wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> +	if (codec->active)
> +		snd_soc_write(codec, WM8731_ACTIVE, 0x0001);

This should be handled as part of the bias level managemnent and cache
sync, if the disable happens in bias level management so should the
restore.

  reply	other threads:[~2011-06-29 17:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 18:00 use dmaengine for atmel ssc/pcm dai drivers Nicolas Ferre
2011-06-29 18:00 ` [PATCH 1/5] ASoC: wm8731: rework power management Nicolas Ferre
2011-06-29 17:11   ` Mark Brown [this message]
2011-06-30 13:57     ` Nicolas Ferre
2011-06-30 15:04       ` [alsa-devel] " Nicolas Ferre
2011-06-30 15:22       ` Mark Brown
2011-07-01  9:31         ` Nicolas Ferre
2011-07-01 10:43   ` [PATCH] ASoC: wm8731: set the ACTIVE bit if bias ON entered Nicolas Ferre
2011-07-01 14:18     ` Liam Girdwood
2011-07-01 16:15     ` Mark Brown
2011-07-04  9:46       ` Nicolas Ferre
2011-07-04 17:29         ` Mark Brown
2011-07-04 17:34           ` Liam Girdwood
2011-07-05  7:58           ` Nicolas Ferre
2011-07-05 20:27             ` [alsa-devel] " Mark Brown
2011-06-29 18:00 ` [PATCH 2/5] ASoC: atmel-ssc: add phybase in device structure Nicolas Ferre
2011-06-29 17:48   ` Mark Brown
2011-07-01 14:46     ` [PATCH V2 " Nicolas Ferre
2011-06-29 18:00 ` [PATCH 3/5] ASoC: atmel-ssc: dmaengine usage switch depending on cpu Nicolas Ferre
2011-06-29 18:00 ` [PATCH 4/5] ASoC: atmel_ssc_dai/atmel-pcm: adapt to dmaengine usage Nicolas Ferre
2011-06-29 17:59   ` Mark Brown
2011-06-30  0:54   ` Koul, Vinod
2011-06-29 18:00 ` [PATCH 5/5] ASoC: atmel_ssc_dai: PM: actually stopping clock on suspend/resume Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110629171148.GB10798@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).