diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-12-06 00:36:03 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2006-12-06 00:36:03 +0000 |
commit | 84e2aa1a4f97429ee837fc59b7772bf7a2dfffd1 (patch) | |
tree | 9c41808587b50977c346294773ad64449e53b4aa /packages/linux/linux-rp-2.6.17 | |
parent | fd0ccc8e567812ea18d4fbde8a2749bc814d8e4d (diff) |
linux-rp: Fix tosa 2.6.17/18 patches (thanks for hints from CyrilRomain)
Diffstat (limited to 'packages/linux/linux-rp-2.6.17')
-rw-r--r-- | packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch | 44 | ||||
-rw-r--r-- | packages/linux/linux-rp-2.6.17/wm9712-suspend-cold-res-r2.patch | 16 |
2 files changed, 60 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; + } diff --git a/packages/linux/linux-rp-2.6.17/wm9712-suspend-cold-res-r2.patch b/packages/linux/linux-rp-2.6.17/wm9712-suspend-cold-res-r2.patch new file mode 100644 index 0000000000..e91e54f963 --- /dev/null +++ b/packages/linux/linux-rp-2.6.17/wm9712-suspend-cold-res-r2.patch @@ -0,0 +1,16 @@ + sound/soc/codecs/wm9712.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: linux-2.6.18/sound/soc/codecs/wm9712.c +=================================================================== +--- linux-2.6.18.orig/sound/soc/codecs/wm9712.c 2006-12-05 23:19:53.000000000 +0000 ++++ linux-2.6.18/sound/soc/codecs/wm9712.c 2006-12-05 23:22:04.000000000 +0000 +@@ -651,7 +651,7 @@ static int wm9712_soc_resume(struct plat + int i, ret; + u16 *cache = codec->reg_cache; + +- ret = wm9712_reset(codec, 1); ++ ret = wm9712_reset(codec, 0); + if (ret < 0){ + printk(KERN_ERR "could not reset AC97 codec\n"); + return ret; |