ASoC: ti: davinci-i2s: Add S32_LE as support format
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 30 Aug 2019 10:38:38 +0000 (13:38 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 30 Aug 2019 11:22:28 +0000 (12:22 +0100)
ASP/McBSP can support 8/16/20/24/32 bits word in theory. I have only tested
S16_LE and S32_LE, the other formats might not work so only extend the
supported formats with S32_LE for now.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190830103841.25128-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-i2s.c

index 92c1bdc69086090f8d07ee390dd615dee21ec063..f04d9fb5130f1b9c295e8a79c40c6bc7a538fab8 100644 (file)
@@ -612,6 +612,8 @@ static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
 }
 
 #define DAVINCI_I2S_RATES      SNDRV_PCM_RATE_8000_96000
+#define DAVINCI_I2S_FORMATS    (SNDRV_PCM_FMTBIT_S16_LE | \
+                                SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops davinci_i2s_dai_ops = {
        .shutdown       = davinci_i2s_shutdown,
@@ -639,12 +641,14 @@ static struct snd_soc_dai_driver davinci_i2s_dai = {
                .channels_min = 2,
                .channels_max = 2,
                .rates = DAVINCI_I2S_RATES,
-               .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+               .formats = DAVINCI_I2S_FORMATS,
+       },
        .capture = {
                .channels_min = 2,
                .channels_max = 2,
                .rates = DAVINCI_I2S_RATES,
-               .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+               .formats = DAVINCI_I2S_FORMATS,
+       },
        .ops = &davinci_i2s_dai_ops,
 
 };