summaryrefslogtreecommitdiff
path: root/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch
diff options
context:
space:
mode:
authorFlorian Boor <florian.boor@kernelconcepts.de>2006-12-06 10:55:45 +0000
committerFlorian Boor <florian.boor@kernelconcepts.de>2006-12-06 10:55:45 +0000
commit17582a4ad4e22d8a4c65739913c63acb5d091aee (patch)
tree279bf2aad80fb7f86aacefda30665d354a563e31 /packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch
parent2aedfc4e34a370cbdec09d7a258d60cc4ad63ac3 (diff)
parent5b541ff766ed2a9ed77cd68ed558651a4fa5f5ae (diff)
merge of '3fa76fd2a4646a878f0810156dec4b7da94c14f2'
and 'ee31c6e3fc63b93eae8552042728645a8206cf1c'
Diffstat (limited to 'packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch')
-rw-r--r--packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch b/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch
new file mode 100644
index 0000000000..96919b6b02
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch
@@ -0,0 +1,44 @@
+ sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+Index: linux-2.6.18/sound/soc/codecs/wm9712.c
+===================================================================
+--- linux-2.6.18.orig/sound/soc/codecs/wm9712.c 2006-12-05 23:25:33.000000000 +0000
++++ linux-2.6.18/sound/soc/codecs/wm9712.c 2006-12-05 23:27:20.000000000 +0000
+@@ -618,18 +618,26 @@ static int wm9712_dapm_event(struct snd_
+
+ static int wm9712_reset(struct snd_soc_codec *codec, int try_warm)
+ {
+- if (try_warm && soc_ac97_ops.warm_reset) {
+- soc_ac97_ops.warm_reset(codec->ac97);
+- if (!(ac97_read(codec, 0) & 0x8000))
+- return 1;
+- }
++ int retry = 3;
++
++ while (retry--)
++ {
++ if(try_warm && soc_ac97_ops.warm_reset) {
++ soc_ac97_ops.warm_reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 1;
++ }
+
+- soc_ac97_ops.reset(codec->ac97);
+- if (ac97_read(codec, 0) & 0x8000)
+- goto err;
+- return 0;
++ soc_ac97_ops.reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 0;
++
++ }
+
+-err:
+ printk(KERN_ERR "WM9712 AC97 reset failed\n");
+ return -EIO;
+ }