aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorZidan Wang <zidan.wang@freescale.com>2015-05-12 14:58:21 +0800
committerMark Brown <broonie@kernel.org>2015-05-12 20:05:30 +0100
commit7a8c78675f3c81760cde8ef31a9fcb0cb9ace231 (patch)
tree01b5407c6f90f280b9456d2aaca74dfae8f3d9f5 /sound
parent0e50b51aa22fea0b6762f9d932541ec6f922928f (diff)
ASoC: wm8960: add 32 bit word length support
According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8960.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index c02ed1f1959a..56bb88da9f8e 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
case 24:
iface |= 0x0008;
break;
+ case 32:
+ /* right justify mode does not support 32 word length */
+ if ((iface & 0x3) != 0) {
+ iface |= 0x000c;
+ break;
+ }
default:
dev_err(codec->dev, "unsupported width %d\n",
params_width(params));
@@ -1054,7 +1060,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
#define WM8960_FORMATS \
(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)
static const struct snd_soc_dai_ops wm8960_dai_ops = {
.hw_params = wm8960_hw_params,