summaryrefslogtreecommitdiff
path: root/packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2006-12-17 11:02:26 +0000
committerRod Whitby <rod@whitby.id.au>2006-12-17 11:02:26 +0000
commit842b65362983666a1f914f8c4a848159b8a8e944 (patch)
tree71d5fa1600f18e49abbe28460c248cc40a71756f /packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch
parent42e6943b56b5cff26a4eb6874cb0e70229deacea (diff)
parentdb8fb05c672025788cac42c01fd30145de0119cc (diff)
merge of 14913ea896b200b8793c1a74b43586b44451a471
and e6282b8a6c27894ff62776a8cd275d5f0a9a0efd
Diffstat (limited to 'packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch')
-rw-r--r--packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch b/packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch
new file mode 100644
index 0000000000..78e81ea83a
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.19+git/wm9712-reset-loop-r2.patch
@@ -0,0 +1,44 @@
+ sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+Index: git/sound/soc/codecs/wm9712.c
+===================================================================
+--- git.orig/sound/soc/codecs/wm9712.c 2006-11-07 22:10:01.000000000 +0000
++++ git/sound/soc/codecs/wm9712.c 2006-11-07 22:11:50.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;
+
+- soc_ac97_ops.reset(codec->ac97);
+- if (ac97_read(codec, 0) & 0x8000)
+- goto err;
+- return 0;
++ 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)
++ continue;
++ else
++ return 0;
++
++ }
+
+-err:
+ printk(KERN_ERR "WM9712 AC97 reset failed\n");
+ return -EIO;
+ }