[alsa-devel] [PATCH 3/3] ASoC: ssm2602: Support setting the oscillator and the clock output state
lars at metafoo.de
Tue Sep 27 14:47:12 CEST 2011
On 09/27/2011 02:30 PM, Mark Brown wrote:
> On Tue, Sep 27, 2011 at 11:08:48AM +0200, Lars-Peter Clausen wrote:
>> Currently the oscillator is always enabled and the clock output is always
>> disabled. This patch adds support for controlling the oscillator and clock
>> output state through snd_soc_dai_set_sysclk. Which makes it possible to
>> disable or enable them dynamically according to the requirements of the board
>> on which the CODEC is used.
>> This patch also slightly modifies the behavior as to when the oscillator is
>> going to be disabled in low-power states. Previously it would only be disabled
>> in BIAS_OFF, now it is also going to be disabled in BIAS_STANDBY, since no
>> components which depend on it should be active in this state.
> Is this last assumption actually true? Things like accessory detect can
> need clocks on devices even when they're idle from an audio point of
> view. Still, I've applied the patch - we can always fix up later if
> something needs the clock enabling.
At least for the ssm2602 the sysclk is only used to for audio processing and to
drive the clock out signal. Audio is off in standby and the clock out signal
was going to be disabled when switching to standby even before this patch. But
you are correct the later might be a problem in systems where the clock out
signal is used for another external component which needs a clock input signal
in standby mode.
More information about the Alsa-devel