[alsa-devel] [PATCH 4/5] ASoC: atmel_ssc_dai: split TX/RX FS constants

Michał Mirosław mirq-linux at rere.qmqm.pl
Mon Jul 22 20:27:21 CEST 2019


The constants are the same, but the names are misleading when used for
TCMR configuration. Use names from SAMA5D2 datasheet.

Signed-off-by: Michał Mirosław <mirq-linux at rere.qmqm.pl>
---
 sound/soc/atmel/atmel_ssc_dai.c | 6 +++---
 sound/soc/atmel/atmel_ssc_dai.h | 9 ++++++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 04541d7c33fe..cf2cfc345676 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -572,7 +572,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
 			| SSC_BF(RCMR_START, SSC_START_RISING_RF);
 
 		tcmr =	  SSC_BF(TCMR_STTDLY, 0)
-			| SSC_BF(TCMR_START, SSC_START_RISING_RF);
+			| SSC_BF(TCMR_START, SSC_START_RISING_TF);
 
 		break;
 
@@ -584,7 +584,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
 			| SSC_BF(RCMR_START, SSC_START_FALLING_RF);
 
 		tcmr =	  SSC_BF(TCMR_STTDLY, 1)
-			| SSC_BF(TCMR_START, SSC_START_FALLING_RF);
+			| SSC_BF(TCMR_START, SSC_START_FALLING_TF);
 
 		break;
 
@@ -603,7 +603,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
 			| SSC_BF(RCMR_START, SSC_START_RISING_RF);
 
 		tcmr =	  SSC_BF(TCMR_STTDLY, 1)
-			| SSC_BF(TCMR_START, SSC_START_RISING_RF);
+			| SSC_BF(TCMR_START, SSC_START_RISING_TF);
 
 		break;
 
diff --git a/sound/soc/atmel/atmel_ssc_dai.h b/sound/soc/atmel/atmel_ssc_dai.h
index ae764cb541c7..efb458b6d187 100644
--- a/sound/soc/atmel/atmel_ssc_dai.h
+++ b/sound/soc/atmel/atmel_ssc_dai.h
@@ -42,13 +42,20 @@
  */
 /* START bit field values */
 #define SSC_START_CONTINUOUS	0
-#define SSC_START_TX_RX		1
+#define SSC_START_TRANSMIT	1
+#define SSC_START_RECEIVE	1
 #define SSC_START_LOW_RF	2
+#define SSC_START_LOW_TF	2
 #define SSC_START_HIGH_RF	3
+#define SSC_START_HIGH_TF	3
 #define SSC_START_FALLING_RF	4
+#define SSC_START_FALLING_TF	4
 #define SSC_START_RISING_RF	5
+#define SSC_START_RISING_TF	5
 #define SSC_START_LEVEL_RF	6
+#define SSC_START_LEVEL_TF	6
 #define SSC_START_EDGE_RF	7
+#define SSC_START_EDGE_TF	7
 #define SSS_START_COMPARE_0	8
 
 /* CKI bit field values */
-- 
2.20.1



More information about the Alsa-devel mailing list