ASoC: wm8940: Convert to params_width()

The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2014-07-31 12:53:08 +01:00
parent 2f44b0437a
commit 74b24c3866
1 changed files with 6 additions and 6 deletions

View File

@ -430,19 +430,19 @@ static int wm8940_i2s_hw_params(struct snd_pcm_substream *substream,
if (ret) if (ret)
goto error_ret; goto error_ret;
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S8: case 8:
companding = companding | (1 << 5); companding = companding | (1 << 5);
break; break;
case SNDRV_PCM_FORMAT_S16_LE: case 16:
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
iface |= (1 << 5); iface |= (1 << 5);
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
iface |= (2 << 5); iface |= (2 << 5);
break; break;
case SNDRV_PCM_FORMAT_S32_LE: case 32:
iface |= (3 << 5); iface |= (3 << 5);
break; break;
} }