[alsa-devel] FW: [PATCH v3] ASoC: Add support for TI LM49453 Audio codec

Vinod Koul vinod.koul at linux.intel.com
Wed Feb 8 12:17:00 CET 2012

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?


More information about the Alsa-devel mailing list