[alsa-devel] [PATCH 3/4] pxa-ssp: don't touch ssp registers when stream is running

Daniel Mack daniel at caiaq.de
Wed Mar 4 21:16:59 CET 2009


In pxa_ssp_set_dai_fmt(), don't modify the SSP registers in case the
stream is already running. With that patch applied, loop-thru tests like
'acrecord -f cd | aplay -f cd' succeed.

Signed-off-by: Daniel Mack <daniel at caiaq.de>
Cc: Mark Brown <broonie at opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg at kernel.org>
Cc: Philipp Zabel <philipp.zabel at gmail.com>
Cc: Tim Ruetz <tim at caiaq.de>
---
 sound/soc/pxa/pxa-ssp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 7fc13f0..45fb600 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -521,6 +521,10 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
 	u32 sscr0;
 	u32 sscr1;
 	u32 sspsp;
+	
+	/* we can only change the settings if the port is not in use */
+	if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE)
+		return 0;
 
 	/* reset port settings */
 	sscr0 = ssp_read_reg(ssp, SSCR0) &
-- 
1.6.1.3



More information about the Alsa-devel mailing list