summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@st.com>2019-02-26 14:51:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 15:38:33 +0100
commit8eccb17132c587a0b98301d79cdc52930516d689 (patch)
treea0b5dfd4b6006c9b30e009b9f77381cb53ecfea8 /sound/soc
parent704a74eb0c0729be77fb36ac8759f2f66f2589ec (diff)
ASoC: stm32: i2s: fix 16 bit format support
commit 0c4c68d6fa1bae74d450e50823c24fcc3cd0b171 upstream. I2S supports 16 bits data in 32 channel length. However the expected driver behavior, is to set channel length to 16 bits when data format is 16 bits. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/stm/stm32_i2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 449bb7049a28..004d83091505 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -501,7 +501,7 @@ static int stm32_i2s_configure(struct snd_soc_dai *cpu_dai,
switch (format) {
case 16:
cfgr = I2S_CGFR_DATLEN_SET(I2S_I2SMOD_DATLEN_16);
- cfgr_mask = I2S_CGFR_DATLEN_MASK;
+ cfgr_mask = I2S_CGFR_DATLEN_MASK | I2S_CGFR_CHLEN;
break;
case 32:
cfgr = I2S_CGFR_DATLEN_SET(I2S_I2SMOD_DATLEN_32) |