[alsa-devel] [PATCH] ASoC: wm8994: Manage wm8994's MCLK in codec driver
Mark Brown
broonie at kernel.org
Thu Mar 12 12:39:45 CET 2015
On Thu, Mar 12, 2015 at 11:49:39AM +0900, Inha Song wrote:
> - if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
> + if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) {
> + for (i = 0; i < ARRAY_SIZE(wm8994->clk_mclk); i++) {
> + if (!IS_ERR(wm8994->clk_mclk[i]))
> + clk_prepare_enable(wm8994->clk_mclk[i]);
> + }
This isn't checking return values. It's also enabling both clocks all
the time which isn't always going to be what's desired - it may result
in an expensive high frequency reference clock being enabled when only
a 32kHz clock is needed for example. That doesn't seem desirable.
> active_reference(codec);
Should this perhaps be being done in active_reference instead?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150312/f67d61a0/attachment.sig>
More information about the Alsa-devel
mailing list