All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 4/4] ASoC: tlv320dac33: Support for	turning off the codec in BIAS_STANDBY
Date: Fri, 30 Apr 2010 13:10:14 +0300	[thread overview]
Message-ID: <201004301310.14378.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <20100430095636.GC21607@sirena.org.uk>

On Friday 30 April 2010 12:56:37 ext Mark Brown wrote:
> > 
> > I will keep the current logic, but move it a bit with the idle_bias_off
> > change.
> 
> Hrm, you need to do this any time playback is started? 

Yes, otherwise the codec might get confused.

> Then just use
> the hooks in the normal audio stream bringup/teardown surely?  It's
> possible that I'm missing something as a result of your list of use
> cases but I'd expect this to flow fairly naturally from the normal call
> flow.

The thing is, that I want to handle the chip power in one place, and 
dac33_set_bias_level is a really good place for that.

Now, when the codec was in off, and I start the playback:
[   31.705444] dac33_prepare_chip (0) // called from pcm_prepare
[   31.708953] Bias level: STANDBY
[   31.729278] dac33_hard_power: 1
[   31.726074] Bias level: PREPARE
...
[   31.833801] dac33_prepare_chip (1) // From set_bias_level
...
DAPM switching
...
[   32.075775] Bias level: ON
...
Workqueue kicks the codec (in FIFO enabled mode)

At the time when pcm_prepare is called the codec is still in OFF.
So I just postponed the dac33_prepare_chip call for later, when the codec 
switches BIAS level.
Than I enable the power and if there is a stream, than I do the preparation.
Note: the BIAS level change is still within the pcm_prepare call chain...

But, if the codec is still in _ON, and the stream is restarted, than the codec 
can be re-configured within the pcm_prepare call, since it is on.

In this way I don't need to do any additional housekeeping while managing the 
power of the codec.

-- 
Péter

  reply	other threads:[~2010-04-30 10:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30  7:31 [PATCH 0/4] ASoC: tlv320dac33: Support for turning codec off Peter Ujfalusi
2010-04-30  7:31 ` [PATCH 1/4] ASoC: tlv320dac33: Optimize power up, and restore Peter Ujfalusi
2010-04-30  7:37   ` Peter Ujfalusi
2010-04-30  7:31 ` [PATCH 2/4] ASoC: tlv320dac33: Revised module loading, and DAC33 ID read Peter Ujfalusi
2010-04-30  7:31 ` [PATCH 3/4] ASoC: tlv320dac33: Manage a pointer for snd_pcm_substream in private structure Peter Ujfalusi
2010-04-30  7:31 ` [PATCH 4/4] ASoC: tlv320dac33: Support for turning off the codec in BIAS_STANDBY Peter Ujfalusi
2010-04-30  8:41   ` Mark Brown
2010-04-30  9:45     ` Peter Ujfalusi
2010-04-30  9:56       ` Mark Brown
2010-04-30 10:10         ` Peter Ujfalusi [this message]
2010-04-30 10:23           ` [PATCH 4/4] ASoC: tlv320dac33: Support for?turning " Mark Brown
2010-04-30 10:55             ` [PATCH 4/4] ASoC: tlv320dac33: Support for turning " Peter Ujfalusi
2010-04-30 11:42               ` Mark Brown
2010-04-30 11:42               ` 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=201004301310.14378.peter.ujfalusi@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    /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.