From 8689ce9ada86d66337dcd7dc54bc58e318912fac Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 26 Jun 2007 21:36:34 +0000 Subject: linux-rp-2.6.17: Sync with OE git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2013 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../linux-rp-2.6.17/wm9712-reset-loop-r2.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch (limited to 'meta/packages/linux/linux-rp-2.6.17/wm9712-reset-loop-r2.patch') 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 000000000..96919b6b0 --- /dev/null +++ b/meta/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; + } -- cgit v1.2.3