diff options
author | Karl Beldan <karl.beldan@gmail.com> | 2009-05-13 16:16:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-14 15:35:32 -0400 |
commit | 916465a841937a60baac6144ae3f41b0d1560f3b (patch) | |
tree | f5259ffac963b9517dbc878d41ad63d756439868 /sound/soc/pxa | |
parent | 9bc04fd1677a956fdd7c5645a09de34ca9a8f1a6 (diff) |
ASoC: pxa2xx-i2s: Fix suspend/resume
pxa2xx_i2s_resume is :
- unconditionnaly setting SACR0_ENB
- unsetting SACR0_ENB in saved SACR0 pxa_i2s.sacr0
fix these.
In pxa2xx_i2s_{resume,suspend}, save/restore registers even
when !dai->active.
Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index bc12a09527f3..4743e262895d 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -262,9 +262,6 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream, | |||
262 | #ifdef CONFIG_PM | 262 | #ifdef CONFIG_PM |
263 | static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai) | 263 | static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai) |
264 | { | 264 | { |
265 | if (!dai->active) | ||
266 | return 0; | ||
267 | |||
268 | /* store registers */ | 265 | /* store registers */ |
269 | pxa_i2s.sacr0 = SACR0; | 266 | pxa_i2s.sacr0 = SACR0; |
270 | pxa_i2s.sacr1 = SACR1; | 267 | pxa_i2s.sacr1 = SACR1; |
@@ -279,16 +276,14 @@ static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai) | |||
279 | 276 | ||
280 | static int pxa2xx_i2s_resume(struct snd_soc_dai *dai) | 277 | static int pxa2xx_i2s_resume(struct snd_soc_dai *dai) |
281 | { | 278 | { |
282 | if (!dai->active) | ||
283 | return 0; | ||
284 | |||
285 | pxa_i2s_wait(); | 279 | pxa_i2s_wait(); |
286 | 280 | ||
287 | SACR0 = pxa_i2s.sacr0 &= ~SACR0_ENB; | 281 | SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB; |
288 | SACR1 = pxa_i2s.sacr1; | 282 | SACR1 = pxa_i2s.sacr1; |
289 | SAIMR = pxa_i2s.saimr; | 283 | SAIMR = pxa_i2s.saimr; |
290 | SADIV = pxa_i2s.sadiv; | 284 | SADIV = pxa_i2s.sadiv; |
291 | SACR0 |= SACR0_ENB; | 285 | |
286 | SACR0 = pxa_i2s.sacr0; | ||
292 | 287 | ||
293 | return 0; | 288 | return 0; |
294 | } | 289 | } |