diff options
Diffstat (limited to 'meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch')
-rw-r--r-- | meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch b/meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch new file mode 100644 index 0000000000..96919b6b02 --- /dev/null +++ b/meta/packages/linux/linux-rp-2.6.17/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 | |||
4 | Index: linux-2.6.18/sound/soc/codecs/wm9712.c | ||
5 | =================================================================== | ||
6 | --- linux-2.6.18.orig/sound/soc/codecs/wm9712.c 2006-12-05 23:25:33.000000000 +0000 | ||
7 | +++ linux-2.6.18/sound/soc/codecs/wm9712.c 2006-12-05 23:27:20.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 | + while (retry--) | ||
20 | + { | ||
21 | + if(try_warm && soc_ac97_ops.warm_reset) { | ||
22 | + soc_ac97_ops.warm_reset(codec->ac97); | ||
23 | + if(ac97_read(codec, 0) & 0x8000) | ||
24 | + continue; | ||
25 | + else | ||
26 | + return 1; | ||
27 | + } | ||
28 | |||
29 | - soc_ac97_ops.reset(codec->ac97); | ||
30 | - if (ac97_read(codec, 0) & 0x8000) | ||
31 | - goto err; | ||
32 | - return 0; | ||
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 | } | ||