All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: WM8940: incorrect mask for BCLKDIV
@ 2010-10-01  8:23 Grzegorz Daniluk
  2010-10-01 18:13 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Grzegorz Daniluk @ 2010-10-01  8:23 UTC (permalink / raw)
  To: alsa-devel

corrected bitmask in BCLKDIV setting (wm8940_set_dai_clkdiv) and
bias_level in wm8940 register function.

best regards,
Grzegorz Daniluk

----
diff -urN a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
--- a/sound/soc/codecs/wm8940.c    2010-04-16 11:10:10.000000000 +0000
+++ b/sound/soc/codecs/wm8940.c    2010-09-29 14:12:17.263497290 +0000
@@ -514,7 +514,7 @@

     if ((Ndiv < 6) || (Ndiv > 12))
         printk(KERN_WARNING
-            "WM8940 N value %d outwith recommended range!d\n",
+            "WM8940 N value %d outwith recommended range!\n",
             Ndiv);

     pll_div.n = Ndiv;
@@ -604,7 +604,7 @@

     switch (div_id) {
     case WM8940_BCLKDIV:
-        reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFEF3;
+        reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFE3;
         ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2));
         break;
     case WM8940_MCLKDIV:
@@ -800,9 +800,10 @@

     wm8940_dai.dev = codec->dev;

-    wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
+    wm8940_set_bias_level(codec, SND_SOC_BIAS_PREPARE);

-    ret = snd_soc_write(codec, WM8940_POWER1, 0x180);
+    reg = snd_soc_read(codec, WM8940_POWER1);
+    ret = snd_soc_write(codec, WM8940_POWER1, reg | 0x180);
     if (ret < 0)
         return ret;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: WM8940: incorrect mask for BCLKDIV
  2010-10-01  8:23 [PATCH] ASoC: WM8940: incorrect mask for BCLKDIV Grzegorz Daniluk
@ 2010-10-01 18:13 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2010-10-01 18:13 UTC (permalink / raw)
  To: Grzegorz Daniluk; +Cc: alsa-devel

On Fri, Oct 01, 2010 at 10:23:43AM +0200, Grzegorz Daniluk wrote:
> corrected bitmask in BCLKDIV setting (wm8940_set_dai_clkdiv) and
> bias_level in wm8940 register function.

This doesn't correspond to the contents of the patch?

You also need to provide a Signed-off-by for your patches - the meaning
and purpose of this is covered in Documentation/SubmittingPatches.
Please remember to CC maintainers on patches also.

> ----
> diff -urN a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
> --- a/sound/soc/codecs/wm8940.c    2010-04-16 11:10:10.000000000 +0000
> +++ b/sound/soc/codecs/wm8940.c    2010-09-29 14:12:17.263497290 +0000
> @@ -514,7 +514,7 @@
> 
>      if ((Ndiv < 6) || (Ndiv > 12))
>          printk(KERN_WARNING
> -            "WM8940 N value %d outwith recommended range!d\n",
> +            "WM8940 N value %d outwith recommended range!\n",
>              Ndiv);
> 
>      pll_div.n = Ndiv;

This is a typo fix, it's fine but should ideally be submitted as a
separate patch and should at least be noted in the changelog.

> @@ -604,7 +604,7 @@
> 
>      switch (div_id) {
>      case WM8940_BCLKDIV:
> -        reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFEF3;
> +        reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFE3;
>          ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2));
>          break;
>      case WM8940_MCLKDIV:

This is the bit from the changelog, this looks like a good fix.

> @@ -800,9 +800,10 @@
> 
>      wm8940_dai.dev = codec->dev;
> 
> -    wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> +    wm8940_set_bias_level(codec, SND_SOC_BIAS_PREPARE);
> 
> -    ret = snd_soc_write(codec, WM8940_POWER1, 0x180);
> +    reg = snd_soc_read(codec, WM8940_POWER1);
> +    ret = snd_soc_write(codec, WM8940_POWER1, reg | 0x180);
>      if (ret < 0)
>          return ret;

These are another separate change which wasn't mentioned in the
changelog.  I don't understand the purpose of this change but it doesn't
look like a change I'd expect to see made.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-01 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01  8:23 [PATCH] ASoC: WM8940: incorrect mask for BCLKDIV Grzegorz Daniluk
2010-10-01 18:13 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.