diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-10-30 15:21:19 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-10-30 15:21:19 +0000 |
commit | a43e2b53a23bbd6955209a01a8388508f9205857 (patch) | |
tree | d9c5818b83a56f33baf0cb5d5a3bb34c49365845 /packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch | |
parent | 18f5c86801714259eaaa1e1a81565984f58ecd14 (diff) |
linux-rp: update Tosa patchset in 2.6.22 and 2.6.23 - close #3233
USB Host patches are not updated
Diffstat (limited to 'packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch')
-rw-r--r-- | packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch b/packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch new file mode 100644 index 0000000000..0e32a62ea6 --- /dev/null +++ b/packages/linux/linux-rp-2.6.23/wm9712-reset-loop-r2.patch @@ -0,0 +1,88 @@ + 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; + } + 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; + } |