[alsa-devel] FW: [PATCH v3] ASoC: Add support for TI LM49453 Audio codec
broonie at opensource.wolfsonmicro.com
Wed Feb 8 12:20:59 CET 2012
On Wed, Feb 08, 2012 at 10:57:30AM +0000, Liam Girdwood wrote:
> On Wed, 2012-02-08 at 16:06 +0530, Vinod Koul wrote:
> > 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 modern devices set_bias_level() is often a better choice if you're
only going to do one of that or hw_params(), especially on the shutdown
paths - devices these days typically need the clocks for a lot more
stuff. hw_params() by itself obviously has issues for analogue only
I'd generally expect to see new machine drivers doing this stuff in
set_bias_level() and possibly also having additional startup code in
hw_params() depending on how flexible the clocking is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120208/351358f1/attachment.sig
More information about the Alsa-devel