[Sound-open-firmware] [PATCH] BDW: refine ssp start function

Rander Wang rander.wang at linux.intel.com
Mon Jun 4 10:21:04 CEST 2018


Set Tx|Rx Enable for starting playback|capture

Signed-off-by: Rander Wang <rander.wang at linux.intel.com>

---
test it on Broadwell, no need to test other platforms

SOF: master 131a1887631621
kernel: v4.14 d09db67c5a9d6d
SOF-tools: master 13b56fa6047c566a
---
 src/drivers/hsw-ssp.c | 2 ++
 src/include/sof/ssp.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/drivers/hsw-ssp.c b/src/drivers/hsw-ssp.c
index 43024a4..a68898e 100644
--- a/src/drivers/hsw-ssp.c
+++ b/src/drivers/hsw-ssp.c
@@ -439,11 +439,13 @@ static void ssp_start(struct dai *dai, int direction)
 				SSCR1_TSRE | SSCR1_EBCEI);
 		ssp_update_bits(dai, SSCR0, SSCR0_SSE, SSCR0_SSE);
 		ssp_update_bits(dai, SSCR0, SSCR0_TIM, 0);
+		ssp_update_bits(dai, SSTSA, SSTSA_TSEN, SSTSA_TSEN);
 	} else {
 		ssp_update_bits(dai, SSCR1, SSCR1_RSRE | SSCR1_EBCEI,
 				SSCR1_RSRE | SSCR1_EBCEI);
 		ssp_update_bits(dai, SSCR0, SSCR0_SSE, SSCR0_SSE);
 		ssp_update_bits(dai, SSCR0, SSCR0_RIM, 0);
+		ssp_update_bits(dai, SSRSA, SSRSA_RSEN, SSRSA_RSEN);
 	}
 
 	/* enable port */
diff --git a/src/include/sof/ssp.h b/src/include/sof/ssp.h
index 3a1f6ed..fdcfcac 100644
--- a/src/include/sof/ssp.h
+++ b/src/include/sof/ssp.h
@@ -198,7 +198,8 @@ extern const struct dai_ops ssp_ops;
 #define SFIFOTT_TX(x)		((x) - 1)
 #define SFIFOTT_RX(x)		(((x) - 1) << 16)
 
-#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE
+#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE ||\
+	defined CONFIG_HASWELL || defined CONFIG_BROADWELL
 #define SSTSA_TSEN			BIT(8)
 #define SSRSA_RSEN			BIT(8)
 
-- 
2.14.1



More information about the Sound-open-firmware mailing list