[Balloon-svn] r1935 - balloon/branches/menuconfig2/package/k…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: subversion@balloonboard.org
Date:  
To: balloon-svn
Subject: [Balloon-svn] r1935 - balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4
Author: nick
Date: 2012-07-26 17:32:05 +0100 (Thu, 26 Jul 2012)
New Revision: 1935

Modified:
balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch
Log:
re-assert playback volume at each unmute. Seems to be needed to reliably assert volume. Also set zero crossing amplitude timeout.

Modified: balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch
===================================================================
--- balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch    2012-07-24 08:09:44 UTC (rev 1934)
+++ balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch    2012-07-26 16:32:05 UTC (rev 1935)
@@ -1,18 +1,23 @@
 Index: linux-2.6.39.4/sound/soc/codecs/wm8960.c
 ===================================================================
---- linux-2.6.39.4.orig/sound/soc/codecs/wm8960.c    2011-08-03 20:43:28.000000000 +0100
-+++ linux-2.6.39.4/sound/soc/codecs/wm8960.c    2012-06-26 09:52:32.000000000 +0100
-@@ -54,7 +54,8 @@
+--- linux-2.6.39.4.orig/sound/soc/codecs/wm8960.c    2012-07-26 17:28:26.000000000 +0100
++++ linux-2.6.39.4/sound/soc/codecs/wm8960.c    2012-07-26 17:29:35.000000000 +0100
+@@ -54,12 +54,12 @@
   * using 2 wire for device control, so we cache them instead.
   */
  static const u16 wm8960_reg[WM8960_CACHEREGNUM] = {
 -    0x0097, 0x0097, 0x0000, 0x0000,
-+//    0x0097, 0x0097, 0x0000, 0x0000,
 +    0x00b7, 0x00b7, 0x0040, 0x0040,
      0x0000, 0x0008, 0x0000, 0x000a,
      0x01c0, 0x0000, 0x00ff, 0x00ff,
      0x0000, 0x0000, 0x0000, 0x0000,
-@@ -159,6 +160,7 @@
+     0x0000, 0x007b, 0x0100, 0x0032,
+-    0x0000, 0x00c3, 0x00c3, 0x01c0,
++    0x0000, 0x00c3, 0x00c3, 0x01c1,
+     0x0000, 0x0000, 0x0000, 0x0000,
+     0x0000, 0x0000, 0x0000, 0x0000,
+     0x0100, 0x0100, 0x0050, 0x0050,
+@@ -159,6 +159,7 @@
  static const DECLARE_TLV_DB_SCALE(dac_tlv, -12700, 50, 1);
  static const DECLARE_TLV_DB_SCALE(bypass_tlv, -2100, 300, 0);
  static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
@@ -20,7 +25,7 @@


  static const struct snd_kcontrol_new wm8960_snd_controls[] = {
  SOC_DOUBLE_R_TLV("Capture Volume", WM8960_LINVOL, WM8960_RINVOL,
-@@ -219,6 +221,10 @@
+@@ -219,6 +220,10 @@
             WM8960_BYPASS2, 4, 7, 1, bypass_tlv),
  SOC_SINGLE_TLV("Right Output Mixer RINPUT3 Volume",
             WM8960_ROUTMIX, 4, 7, 1, bypass_tlv),
@@ -31,7 +36,7 @@
  };


  static const struct snd_kcontrol_new wm8960_lin_boost[] = {
-@@ -278,8 +284,8 @@
+@@ -278,8 +283,8 @@
  SND_SOC_DAPM_MIXER("Right Input Mixer", WM8960_POWER3, 4, 0,
             wm8960_rin, ARRAY_SIZE(wm8960_rin)),


@@ -42,8 +47,26 @@

  SND_SOC_DAPM_DAC("Left DAC", "Playback", WM8960_POWER2, 8, 0),
  SND_SOC_DAPM_DAC("Right DAC", "Playback", WM8960_POWER2, 7, 0),
-@@ -908,10 +914,13 @@
+@@ -548,11 +553,16 @@
+ {
+     struct snd_soc_codec *codec = dai->codec;
+     u16 mute_reg = snd_soc_read(codec, WM8960_DACCTL1) & 0xfff7;
++    u16 lvol_reg = snd_soc_read(codec, WM8960_LDAC);
++    u16 rvol_reg = snd_soc_read(codec, WM8960_RDAC);


+     if (mute)
+         snd_soc_write(codec, WM8960_DACCTL1, mute_reg | 0x8);
+-    else
++    else {
++        snd_soc_write(codec, WM8960_LDAC, lvol_reg | 0x100);
++        snd_soc_write(codec, WM8960_RDAC, rvol_reg | 0x100);
+         snd_soc_write(codec, WM8960_DACCTL1, mute_reg);
++    }
+     return 0;
+ }
+ 
+@@ -908,6 +918,8 @@
+ 
      /* Sync reg_cache with the hardware */
      for (i = 0; i < ARRAY_SIZE(wm8960_reg); i++) {
 +        if (i == WM8960_RESET)
@@ -51,8 +74,3 @@
          data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001);
          data[1] = cache[i] & 0x00ff;
          codec->hw_write(codec->control_data, data, 2);
-     }
-+    pr_info("\n");
- 
-     wm8960->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-     return 0;