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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Cc: Liam Girdwood <lrg@xxxxxxxxxx>
Cc: Philipp Zabel <philipp.zabel@xxxxxxxxx>
Cc: Tim Ruetz <tim@xxxxxxxx>
---
 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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux