UPSTREAM: ASoC: rockchip: i2s: Add SNDRV_PCM_FMTBIT_S32_LE support
authorMichael Trimarchi <michael@amarulasolutions.com>
Sat, 9 Jan 2016 22:47:58 +0000 (23:47 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 30 Mar 2016 10:10:08 +0000 (18:10 +0800)
Change-Id: I9b769b160410cdf0a06c2d6b3b77d563d3672beb
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 4ab936d1aca69978dc738592a00e34f836bda1c3)

sound/soc/rockchip/rockchip_i2s.c

index 9b173b4d3396b4030c699627747d80188f91342a..2a76de2e27434d9e13c7a4f56de04b348502e84b 100644 (file)
@@ -265,6 +265,9 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
        case SNDRV_PCM_FORMAT_S24_LE:
                val |= I2S_TXCR_VDW(24);
                break;
+       case SNDRV_PCM_FORMAT_S32_LE:
+               val |= I2S_TXCR_VDW(32);
+               break;
        default:
                return -EINVAL;
        }
@@ -383,7 +386,8 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
                .formats = (SNDRV_PCM_FMTBIT_S8 |
                            SNDRV_PCM_FMTBIT_S16_LE |
                            SNDRV_PCM_FMTBIT_S20_3LE |
-                           SNDRV_PCM_FMTBIT_S24_LE),
+                           SNDRV_PCM_FMTBIT_S24_LE |
+                           SNDRV_PCM_FMTBIT_S32_LE),
        },
        .capture = {
                .stream_name = "Capture",
@@ -393,7 +397,8 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
                .formats = (SNDRV_PCM_FMTBIT_S8 |
                            SNDRV_PCM_FMTBIT_S16_LE |
                            SNDRV_PCM_FMTBIT_S20_3LE |
-                           SNDRV_PCM_FMTBIT_S24_LE),
+                           SNDRV_PCM_FMTBIT_S24_LE |
+                           SNDRV_PCM_FMTBIT_S32_LE),
        },
        .ops = &rockchip_i2s_dai_ops,
        .symmetric_rates = 1,