[Balloon-svn] r1916 - 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] r1916 - balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4
Author: nick
Date: 2012-06-26 10:02:31 +0100 (Tue, 26 Jun 2012)
New Revision: 1916

Modified:
balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch
Log:
fix resume, avoid updating reset register as it affects previously updated registers

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-06-24 16:20:48 UTC (rev 1915)
+++ balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/wm8960.patch    2012-06-26 09:02:31 UTC (rev 1916)
@@ -1,8 +1,18 @@
 Index: linux-2.6.39.4/sound/soc/codecs/wm8960.c
 ===================================================================
---- linux-2.6.39.4.orig/sound/soc/codecs/wm8960.c    2012-04-20 10:16:03.000000000 +0100
-+++ linux-2.6.39.4/sound/soc/codecs/wm8960.c    2012-04-20 10:15:25.000000000 +0100
-@@ -159,6 +159,7 @@
+--- 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 @@
+  * 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 @@
  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);
@@ -10,7 +20,7 @@


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


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


@@ -32,3 +42,17 @@

  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 @@
+ 
+     /* Sync reg_cache with the hardware */
+     for (i = 0; i < ARRAY_SIZE(wm8960_reg); i++) {
++        if (i == WM8960_RESET)
++            continue;
+         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;