ASoC: ad1836: Use params_width() rather than explicit memory format

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Mark Brown 2014-01-08 18:37:22 +00:00
parent 8c5178fca4
commit fa69b0f93e
1 changed files with 5 additions and 5 deletions

View File

@ -168,15 +168,15 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
int word_len = 0; int word_len = 0;
/* bit size */ /* bit size */
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
word_len = AD1836_WORD_LEN_16; word_len = AD1836_WORD_LEN_16;
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
word_len = AD1836_WORD_LEN_20; word_len = AD1836_WORD_LEN_20;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
case SNDRV_PCM_FORMAT_S32_LE: case 32:
word_len = AD1836_WORD_LEN_24; word_len = AD1836_WORD_LEN_24;
break; break;
} }