Commit 56927eb0 authored by Mark Brown's avatar Mark Brown

ASoC: Set AIF word length for WM8904

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent b35a28af
...@@ -1503,6 +1503,23 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream, ...@@ -1503,6 +1503,23 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream,
wm8904->bclk = snd_soc_params_to_bclk(params); wm8904->bclk = snd_soc_params_to_bclk(params);
} }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
break;
case SNDRV_PCM_FORMAT_S20_3LE:
aif1 |= 0x40;
break;
case SNDRV_PCM_FORMAT_S24_LE:
aif1 |= 0x80;
break;
case SNDRV_PCM_FORMAT_S32_LE:
aif1 |= 0xc0;
break;
default:
return -EINVAL;
}
dev_dbg(codec->dev, "Target BCLK is %dHz\n", wm8904->bclk); dev_dbg(codec->dev, "Target BCLK is %dHz\n", wm8904->bclk);
ret = wm8904_configure_clocking(codec); ret = wm8904_configure_clocking(codec);
......
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