diff mbox series

[v2,3/6] ASoC: atmel_ssc_dai: implement left-justified data mode

Message ID 44fa6b700421e80778f20ff9ead2b148cf6d2e92.1566677788.git.mirq-linux@rere.qmqm.pl (mailing list archive)
State Accepted
Commit 376142b7bbc1edef2900ddc300a006f8c056b0d5
Headers show
Series ] ASoC: atmel: extend SSC support | expand

Commit Message

Michał Mirosław Aug. 24, 2019, 8:26 p.m. UTC
Enable support for left-justified data mode for SSC-codec link.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

---
 v2: rebased

---
 sound/soc/atmel/atmel_ssc_dai.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Codrin Ciubotariu Aug. 26, 2019, 2:10 p.m. UTC | #1
> Enable support for left-justified data mode for SSC-codec link.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> 
> ---
>   v2: rebased

I noticed you also added a description and you removed two comments from 
v1. Please include all the changes in the changelog.
I already added my 'Reviewed-by' in v1, but since there are some more 
changes from the previous version:

Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

Thanks and best regards,
Codrin

> 
> ---
>   sound/soc/atmel/atmel_ssc_dai.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> index 7dc6ec9b8c7a..48e9eef34c0f 100644
> --- a/sound/soc/atmel/atmel_ssc_dai.c
> +++ b/sound/soc/atmel/atmel_ssc_dai.c
> @@ -564,6 +564,15 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
>   
>   	switch (ssc_p->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) {
>   
> +	case SND_SOC_DAIFMT_LEFT_J:
> +		fs_osync = SSC_FSOS_POSITIVE;
> +		fs_edge = SSC_START_RISING_RF;
> +
> +		rcmr =	  SSC_BF(RCMR_STTDLY, 0);
> +		tcmr =	  SSC_BF(TCMR_STTDLY, 0);
> +
> +		break;
> +
>   	case SND_SOC_DAIFMT_I2S:
>   		fs_osync = SSC_FSOS_NEGATIVE;
>   		fs_edge = SSC_START_FALLING_RF;
>
diff mbox series

Patch

diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 7dc6ec9b8c7a..48e9eef34c0f 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -564,6 +564,15 @@  static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
 
 	switch (ssc_p->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) {
 
+	case SND_SOC_DAIFMT_LEFT_J:
+		fs_osync = SSC_FSOS_POSITIVE;
+		fs_edge = SSC_START_RISING_RF;
+
+		rcmr =	  SSC_BF(RCMR_STTDLY, 0);
+		tcmr =	  SSC_BF(TCMR_STTDLY, 0);
+
+		break;
+
 	case SND_SOC_DAIFMT_I2S:
 		fs_osync = SSC_FSOS_NEGATIVE;
 		fs_edge = SSC_START_FALLING_RF;