diff options
author | Karl Beldan <karl.beldan@gmail.com> | 2009-05-13 22:16:59 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-14 20:35:32 +0100 |
commit | 916465a841937a60baac6144ae3f41b0d1560f3b (patch) | |
tree | f5259ffac963b9517dbc878d41ad63d756439868 /sound/soc/pxa | |
parent | 9bc04fd1677a956fdd7c5645a09de34ca9a8f1a6 (diff) | |
download | kernel_goldelico_gta04-916465a841937a60baac6144ae3f41b0d1560f3b.zip kernel_goldelico_gta04-916465a841937a60baac6144ae3f41b0d1560f3b.tar.gz kernel_goldelico_gta04-916465a841937a60baac6144ae3f41b0d1560f3b.tar.bz2 |
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 bc12a09..4743e26 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, #ifdef CONFIG_PM static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai) { - if (!dai->active) - return 0; - /* store registers */ pxa_i2s.sacr0 = SACR0; pxa_i2s.sacr1 = SACR1; @@ -279,16 +276,14 @@ static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai) static int pxa2xx_i2s_resume(struct snd_soc_dai *dai) { - if (!dai->active) - return 0; - pxa_i2s_wait(); - SACR0 = pxa_i2s.sacr0 &= ~SACR0_ENB; + SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB; SACR1 = pxa_i2s.sacr1; SAIMR = pxa_i2s.saimr; SADIV = pxa_i2s.sadiv; - SACR0 |= SACR0_ENB; + + SACR0 = pxa_i2s.sacr0; return 0; } |