All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@linux.intel.com>
To: Liam Girdwood <lrg@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	M R Swami Reddy <MR.Swami.Reddy@ti.com>
Subject: Re: FW: [PATCH v3] ASoC: Add support for TI LM49453 Audio codec
Date: Wed, 08 Feb 2012 16:47:00 +0530	[thread overview]
Message-ID: <1328699820.21099.12.camel@vkoul-udesk3> (raw)
In-Reply-To: <1328698650.3955.13.camel@odin>

On Wed, 2012-02-08 at 10:57 +0000, Liam Girdwood wrote:
> On Wed, 2012-02-08 at 16:06 +0530, Vinod Koul wrote:
> > On Wed, 2012-02-08 at 09:54 +0000, Liam Girdwood wrote:
> > > Atm, the machine driver would have to enable any system clocks before
> > > the codec driver could use them. 
> > But how would machine driver know _when_?
> > 
> 
> The machine driver gets all the PCM ops that the codec driver does and
> is responsible for configuring CODEC PLLs and clocks (usually in it's
> hw_params()).
> 
> > We want to dynamical turn off this clock when not is use and turn on
> > only when codec is using. So I was thinking of turning this ON in
> > codecs .set_bias_level callback, but how to propagate this into machine
> > driver?
> > 
> 
> It's usually done in the machine driver hw_params() since at this point
> we know the rate, format etc that can have a bearing on the clock
> configuration. You could switch it OFF in machine hw_free().
For DAIs yes. But I also have a Vibra controller on codec, which can be
configured and turned On using alsa controls. I treat the Vibra as input
(or as recoently as Mark has done a signal generator) so mixer
connections ensure loopback from Input to Output and my codec is powered
ON. Those cases DAI doesn't help me.

Possibly a .set_machine_clock_input callback which can be called from
codec driver in .set_bias_level callback?


-- 
~Vinod

  reply	other threads:[~2012-02-08 11:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <290463D19D2E064191F1F96ECA480A89434AC4A96E@EXMAIL02.scwf.nsc.com>
2012-02-08  9:10 ` FW: [PATCH v3] ASoC: Add support for TI LM49453 Audio codec M R Swami Reddy
2012-02-08  9:18   ` Liam Girdwood
2012-02-08  9:37     ` Vinod Koul
2012-02-08  9:54       ` Liam Girdwood
2012-02-08 10:36         ` Vinod Koul
2012-02-08 10:57           ` Liam Girdwood
2012-02-08 11:17             ` Vinod Koul [this message]
2012-02-08 11:21               ` Mark Brown
2012-02-08 14:31                 ` Vinod Koul
2012-02-08 11:20             ` Mark Brown
2012-02-08 13:27               ` Liam Girdwood
2012-02-08 13:54                 ` Mark Brown
2012-02-08 14:33                 ` Vinod Koul
2012-02-08 11:12         ` Mark Brown

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=1328699820.21099.12.camel@vkoul-udesk3 \
    --to=vinod.koul@linux.intel.com \
    --cc=MR.Swami.Reddy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.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.