All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH] ASoC: TWL4030: PM fix for output amplifiers
Date: Mon, 22 Mar 2010 13:47:01 +0000	[thread overview]
Message-ID: <20100322134701.GB1379@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1269264967-2003-1-git-send-email-peter.ujfalusi@nokia.com>

On Mon, Mar 22, 2010 at 03:36:07PM +0200, Peter Ujfalusi wrote:
> Gain controls on outputs affect the power consumption
> when the gain is set to non 0 value.
> To prevent amps beeing enabled, when they are not
> needed, introduce the following workaround:
> Track the state of each of this type of output.
> In twl4030_write only allow actual write, when the
> given output is enabled, otherwise only update
> the reg_cache.
> The PGA event handlers on power up will write the cached
> value to the chip (restoring gain, routing selection).
> On power down 0 is written to the register (disabling
> the amp, and also just in case clearing the routing).

I'm not 100% clear on what the existing code is supposed to be doing so
this explanation isn't entirely clear to me, sorry.

If it's supposed to be holding the controls at a mute value while the
PGA is powered down then this is something that ASoC could benefit from
in general - it'd be much better if we could keep amplifiers muted while
not in active use and sequence the unmute into the power management at
the end since this is good for pop/click management in general.  I'd
started to look at this but not yet got enough time to finish off
implementing it.

What I'd been thinking of doing was introducing a new control type which
would be the inverse of supply - something that's switched on whenever
its inputs are switched on, sequenced to power on at the end of the
sequence and power off at the start.  This would support both events and
a set of controls, with the controls doing what this looks like and only
writing to the device when the widget is powered.  I've not actually
tried implementing this properly yet, though - it'd involve adding a
new bunch of control types, sadly.

  reply	other threads:[~2010-03-22 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 13:36 [PATCH] ASoC: TWL4030: PM fix for output amplifiers Peter Ujfalusi
2010-03-22 13:47 ` Mark Brown [this message]
2010-03-22 14:04   ` Peter Ujfalusi
2010-03-22 14:15     ` Mark Brown
2010-03-22 14:46       ` Peter Ujfalusi
2010-03-22 15:06         ` Mark Brown
2010-03-22 15:31           ` Peter Ujfalusi
2010-03-22 16:19             ` Mark Brown
2010-03-22 16:48               ` Liam Girdwood
2010-03-22 17:00                 ` Mark Brown
2010-03-23  7:05               ` Peter Ujfalusi
2010-03-23  7:59                 ` Peter Ujfalusi
2010-03-23 10:02                   ` Mark Brown
2010-03-23 12:29                     ` Peter Ujfalusi

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=20100322134701.GB1379@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=peter.ujfalusi@nokia.com \
    /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 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.