]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: atmel_ssc_dai: implement left-justified data mode
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sat, 24 Aug 2019 20:26:54 +0000 (22:26 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 27 Aug 2019 19:40:53 +0000 (20:40 +0100)
Enable support for left-justified data mode for SSC-codec link.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/44fa6b700421e80778f20ff9ead2b148cf6d2e92.1566677788.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/atmel/atmel_ssc_dai.c

index 7dc6ec9b8c7a8e8f162ddb1b335575e13e16548f..48e9eef34c0fead794794ed987597d2bb37ba83a 100644 (file)
@@ -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;