summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch b/meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch
new file mode 100644
index 0000000000..78e81ea83a
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch
@@ -0,0 +1,44 @@
1 sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
2 1 file changed, 18 insertions(+), 10 deletions(-)
3
4Index: git/sound/soc/codecs/wm9712.c
5===================================================================
6--- git.orig/sound/soc/codecs/wm9712.c 2006-11-07 22:10:01.000000000 +0000
7+++ git/sound/soc/codecs/wm9712.c 2006-11-07 22:11:50.000000000 +0000
8@@ -618,18 +618,26 @@ static int wm9712_dapm_event(struct snd_
9
10 static int wm9712_reset(struct snd_soc_codec *codec, int try_warm)
11 {
12- if (try_warm && soc_ac97_ops.warm_reset) {
13- soc_ac97_ops.warm_reset(codec->ac97);
14- if (!(ac97_read(codec, 0) & 0x8000))
15- return 1;
16- }
17+ int retry = 3;
18
19- soc_ac97_ops.reset(codec->ac97);
20- if (ac97_read(codec, 0) & 0x8000)
21- goto err;
22- return 0;
23+ while (retry--)
24+ {
25+ if(try_warm && soc_ac97_ops.warm_reset) {
26+ soc_ac97_ops.warm_reset(codec->ac97);
27+ if(ac97_read(codec, 0) & 0x8000)
28+ continue;
29+ else
30+ return 1;
31+ }
32+
33+ soc_ac97_ops.reset(codec->ac97);
34+ if(ac97_read(codec, 0) & 0x8000)
35+ continue;
36+ else
37+ return 0;
38+
39+ }
40
41-err:
42 printk(KERN_ERR "WM9712 AC97 reset failed\n");
43 return -EIO;
44 }