lkml.org 
[lkml]   [2015]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel][PATCH 1/4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK
On Wed, Dec 31, 2014 at 11:39:11AM +0800, Zidan Wang wrote:

> + if (!IS_ERR(wm8960->mclk)) {
> + if (codec->dapm.bias_level == SND_SOC_BIAS_ON)
> + clk_disable_unprepare(wm8960->mclk);
> + else {

Both sides of the if statement should have braces if one does, though in
this case nesting a second switch statement would probably be clearer.

> @@ -661,6 +678,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
>
> /* Disable VMID and VREF, let them discharge */
> snd_soc_write(codec, WM8960_POWER1, 0);
> +
> msleep(600);
> break;
> }

Random while space change here and in a couple of other places.

> + wm8960->mclk = devm_clk_get(&i2c->dev, "codec_mclk");
> + if (IS_ERR(wm8960->mclk)) {
> + if (PTR_ERR(wm8960->mclk) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> + }
> +

Why name this "codec_mclk" - the device calls it just MCLK?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-01-06 19:01    [W:0.079 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site