Title: [6700] trunk/sound/soc/blackfin/bf5xx-i2s.c: task[#2424]Adding a flag to ensure that SPORT is allowed to be configured again,if there is no active stream
Revision
6700
Author
cliff
Date
2009-06-14 21:48:07 -0500 (Sun, 14 Jun 2009)

Log Message

task[#2424]Adding a flag to ensure that SPORT is allowed to be configured again,if there is no active stream

Modified Paths

Diff

Modified: trunk/sound/soc/blackfin/bf5xx-i2s.c (6699 => 6700)


--- trunk/sound/soc/blackfin/bf5xx-i2s.c	2009-06-13 11:16:08 UTC (rev 6699)
+++ trunk/sound/soc/blackfin/bf5xx-i2s.c	2009-06-15 02:48:07 UTC (rev 6700)
@@ -50,6 +50,7 @@
 	u16 tcr2;
 	u16 rcr2;
 	int counter;
+	int configured;
 };
 
 static struct bf5xx_i2s_port bf5xx_i2s;
@@ -168,7 +169,7 @@
 		break;
 	}
 
-	if (bf5xx_i2s.counter == 1) {
+	if (!bf5xx_i2s.configured) {
 		/*
 		 * TX and RX are not independent,they are enabled at the
 		 * same time, even if only one side is running. So, we
@@ -177,6 +178,7 @@
 		 *
 		 * CPU DAI:slave mode.
 		 */
+		bf5xx_i2s.configured = 1;
 		ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
 				      bf5xx_i2s.rcr2, 0, 0);
 		if (ret) {
@@ -200,6 +202,9 @@
 {
 	pr_debug("%s enter\n", __func__);
 	bf5xx_i2s.counter--;
+	/* No active stream, SPORT is allowed to be configured again. */
+	if (!bf5xx_i2s.counter)
+		bf5xx_i2s.configured = 0;
 }
 
 static int bf5xx_i2s_probe(struct platform_device *pdev,
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to