aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@gmail.com>2009-05-14 04:25:42 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-14 15:34:40 -0400
commitb243b77c708665d7af8c5e42611c27c89f918788 (patch)
tree3fcaf03e04ea5f454afe6cea9b34734a8fb4f3b5 /sound/soc/pxa
parent13e2c86c20f5d07b20d5a6dee24bcdd2b30b859f (diff)
ASoC: pxa2xx-i2s: Proper hw initialization
Make sure we are in a know good state at end of probe : Reset FIFO logic and registers, and make sure REC and RPL functions along with FIFO service are disabled (SACR0_RST enables REC and RPL). Resetting loses current settings so remove reset from stream startup. Now reset occurs only at probe. 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.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 60145770aeba..bb8630b6dc8d 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -106,10 +106,8 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
106 if (IS_ERR(clk_i2s)) 106 if (IS_ERR(clk_i2s))
107 return PTR_ERR(clk_i2s); 107 return PTR_ERR(clk_i2s);
108 108
109 if (!cpu_dai->active) { 109 if (!cpu_dai->active)
110 SACR0 |= SACR0_RST;
111 SACR0 = 0; 110 SACR0 = 0;
112 }
113 111
114 return 0; 112 return 0;
115} 113}
@@ -347,6 +345,19 @@ static int pxa2xx_i2s_probe(struct platform_device *dev)
347 if (ret != 0) 345 if (ret != 0)
348 clk_put(clk_i2s); 346 clk_put(clk_i2s);
349 347
348 /*
349 * PXA Developer's Manual:
350 * If SACR0[ENB] is toggled in the middle of a normal operation,
351 * the SACR0[RST] bit must also be set and cleared to reset all
352 * I2S controller registers.
353 */
354 SACR0 = SACR0_RST;
355 SACR0 = 0;
356 /* Make sure RPL and REC are disabled */
357 SACR1 = SACR1_DRPL | SACR1_DREC;
358 /* Along with FIFO servicing */
359 SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
360
350 return ret; 361 return ret;
351} 362}
352 363