aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authormerge <null@invalid>2009-03-02 11:15:46 +0000
committerAndy Green <agreen@octopus.localdomain>2009-03-02 11:15:46 +0000
commite80325b62387d1e85e6555a2a8eb16379e97af8d (patch)
tree535c61cb2fead513c794d701d338b3bf6b00ff45 /sound
parent4e3e58ca4efbac9e8bdc05b728369e279fecc8d3 (diff)
MERGE-via-pending-tracking-hist-asoc-only-write-back-non-defau
pending-tracking-hist top was asoc-only-write-back-non-defau / 04f55b6c2392d4af2b8b2178c333c7f131d3cdc0 ... parent commitmessage: From: Mark Brown <broonie@opensource.wolfsonmicro.com> ASoC: Only write back non-default registers when resuming WM8753 This will reduce the number of writes done on resume, allowing that to complete faster (especially on systems with very slow I2C like the current Samsung driver). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8753.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 8dbf6083b87..5812668ce94 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -51,8 +51,6 @@
#include "wm8753.h"
-#define WM8753_VERSION "0.16"
-
static int caps_charge = 2000;
module_param(caps_charge, int, 0);
MODULE_PARM_DESC(caps_charge, "WM8753 cap charge time (msecs)");
@@ -1537,6 +1535,11 @@ static int wm8753_resume(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(wm8753_reg); i++) {
if (i + 1 == WM8753_RESET)
continue;
+
+ /* No point in writing hardware default values back */
+ if (cache[i] == wm8753_reg[i])
+ continue;
+
data[0] = ((i + 1) << 1) | ((cache[i] >> 8) & 0x0001);
data[1] = cache[i] & 0x00ff;
codec->hw_write(codec->control_data, data, 2);
@@ -1807,8 +1810,6 @@ static int wm8753_probe(struct platform_device *pdev)
struct wm8753_priv *wm8753;
int ret = 0;
- pr_info("WM8753 Audio Codec %s\n", WM8753_VERSION);
-
setup = socdev->codec_data;
codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
if (codec == NULL)