ASoC: max9850: Use params_width() rather than memory format

Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Mark Brown 2014-01-08 20:39:44 +00:00
parent 580ce08d5c
commit 0058e45960
1 changed files with 4 additions and 4 deletions

View File

@ -149,14 +149,14 @@ static int max9850_hw_params(struct snd_pcm_substream *substream,
snd_soc_write(codec, MAX9850_LRCLK_MSB, (lrclk_div >> 8) & 0x7f); snd_soc_write(codec, MAX9850_LRCLK_MSB, (lrclk_div >> 8) & 0x7f);
snd_soc_write(codec, MAX9850_LRCLK_LSB, lrclk_div & 0xff); snd_soc_write(codec, MAX9850_LRCLK_LSB, lrclk_div & 0xff);
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
da = 0; da = 0;
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
da = 0x2; da = 0x2;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
da = 0x3; da = 0x3;
break; break;
default: default: