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 14:15:44 +0000 [thread overview]
Message-ID: <20100322141543.GC1379@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201003221604.56497.peter.ujfalusi@nokia.com>
On Mon, Mar 22, 2010 at 04:04:56PM +0200, Peter Ujfalusi wrote:
> bit 4-5: Gain (0x0 - power down, 0x1 - 6dB, 0x2 - 0dB, 0x3 - -6dB)
> If there is no audio activity, and user changes the routing, than the gain value
> will be also written to the chip, which causes the amp to be enabled.
So it's shared power and volume in a single bitfield.
> > 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.
> Yes, I have been also thinking about that, but I really don't know how it can be
> done:
> For the DAPM part it is kind of easy, since we can decide in the core when to
> write to the chip, and when only to the reg_cache.
> But since I have the gain in the same register, when the user changing the
> volume, than that control don't have information about the associated DAPM
> widget's state.
That's why I'm saying you'll need a new control type - it'd need to know
how to look at the state of a DAPM widget and decide if it should update
the hardware based on that. The PGA handling code that's in current
mainline (not for-2.6.35, it got removed) is an example of this.
> Well, I think the core could have some basic support for similar cases, but I'm
> not sure if it is possible to cover all cases in the core.
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.".
> I do think, that at least the TWL codec has to be handled in a custom way. For
> now at least.
> Should I add more explanation to the commit message to make the intention more
> clear?
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.
next prev parent reply other threads:[~2010-03-22 14:15 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 [this message]
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=20100322141543.GC1379@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 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).