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" <alsa-devel@alsa-project.org>,
	"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: TWL4030: PM fix for output amplifiers
Date: Mon, 22 Mar 2010 15:06:03 +0000	[thread overview]
Message-ID: <20100322150602.GD1379@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201003221646.08974.peter.ujfalusi@nokia.com>

On Mon, Mar 22, 2010 at 04:46:08PM +0200, Peter Ujfalusi wrote:
> On Monday 22 March 2010 16:15:44 ext Mark Brown wrote:

> > I don't see any fundamental problem here - mostly this just maps on to
> > "if the widget is powered on write this value, otherwise write the
> > value configured by the control.".

> Hmm, I suppose it could be possible to pass the name of the DAPM widget, a 
> bitmask to a control...
> Than in the handler in the core we could walk through the DAPM widgets, and find 
> the one, check the status, and if it is on, we allow the write, otherwise we 
> could use the mask to write only the things, that it is needed.

Something like that, yes - the walk could happen at startup time to
avoid having to do it repeatedly.

> But, in TWL case I'd like to filter out also the writes which is done by the 
> DAPM widgets (which is visible from the user space, the mixers).
> As it is now, if user changes the mixer, which is associated with DAPM widget 
> (and it is different than the PGA, they are DAPM_MIXER), than that write goes 
> directly to the register, and this write takes the cached value, makes the 
> changes and than writes it to register. This also enables the gain (which 
> enables the amp, which takes power).

Remember, the register cache is below the controls and transparent to
them - if the controls haven't written a value to the chip then it will
not appear in the register cache so other controls will not be affected.

> > Well, I was rather hoping I could convince you to make this more
> > generic.  But if that's not possible then yes, please do make the commit
> > message clearer.

> I need to study other codes as well, before I could start doing something more 
> generic, which I totally agree would be beneficial for others as well.
> But for now, I would like to update the commit message, and come back later, and 
> revisit the possibility of similar, and more generic ways of doing this.

I guess.

  reply	other threads:[~2010-03-22 15:06 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
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 [this message]
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=20100322150602.GD1379@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.