Commit 7a8c7867 authored by Zidan Wang's avatar Zidan Wang Committed by Mark Brown

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: default avatarZidan Wang <zidan.wang@freescale.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0e50b51a
...@@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, ...@@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
case 24: case 24:
iface |= 0x0008; iface |= 0x0008;
break; break;
case 32:
/* right justify mode does not support 32 word length */
if ((iface & 0x3) != 0) {
iface |= 0x000c;
break;
}
default: default:
dev_err(codec->dev, "unsupported width %d\n", dev_err(codec->dev, "unsupported width %d\n",
params_width(params)); params_width(params));
...@@ -1054,7 +1060,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, ...@@ -1054,7 +1060,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
#define WM8960_FORMATS \ #define WM8960_FORMATS \
(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ (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 = { static const struct snd_soc_dai_ops wm8960_dai_ops = {
.hw_params = wm8960_hw_params, .hw_params = wm8960_hw_params,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment