diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-06-13 11:24:04 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-06-16 03:32:27 -0400 |
commit | abb68c26ba15f8e84e580a40c0b1bc349cb534b0 (patch) | |
tree | 25afa44a648a8e11cd26a657d694eacc345075df /sound/soc/codecs/wm9713.c | |
parent | aafc4412be31306e5c38bd4e4581066507503adc (diff) |
ALSA: ASoC: Check for exact register match in wm97xx_reset()
To provide added robustness in case an AC97 controller reads back all
zeros in error cases check for an exact match when testing to see if
resets have brought the codec back.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/wm9713.c')
-rw-r--r-- | sound/soc/codecs/wm9713.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index aba330118784..0db963747369 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -1076,12 +1076,12 @@ int wm9713_reset(struct snd_soc_codec *codec, int try_warm) | |||
1076 | { | 1076 | { |
1077 | if (try_warm && soc_ac97_ops.warm_reset) { | 1077 | if (try_warm && soc_ac97_ops.warm_reset) { |
1078 | soc_ac97_ops.warm_reset(codec->ac97); | 1078 | soc_ac97_ops.warm_reset(codec->ac97); |
1079 | if (!(ac97_read(codec, 0) & 0x8000)) | 1079 | if (ac97_read(codec, 0) == wm9713_reg[0]) |
1080 | return 1; | 1080 | return 1; |
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | soc_ac97_ops.reset(codec->ac97); | 1083 | soc_ac97_ops.reset(codec->ac97); |
1084 | if (ac97_read(codec, 0) & 0x8000) | 1084 | if (ac97_read(codec, 0) != wm9713_reg[0]) |
1085 | return -EIO; | 1085 | return -EIO; |
1086 | return 0; | 1086 | return 0; |
1087 | } | 1087 | } |