Skip to content

Commit

Permalink
ASoC: max9850: Use params_width() rather than memory format
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Jan 13, 2014
1 parent 580ce08 commit 0058e45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/codecs/max9850.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_LSB, lrclk_div & 0xff);

switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
switch (params_width(params)) {
case 16:
da = 0;
break;
case SNDRV_PCM_FORMAT_S20_3LE:
case 20:
da = 0x2;
break;
case SNDRV_PCM_FORMAT_S24_LE:
case 24:
da = 0x3;
break;
default:
Expand Down

0 comments on commit 0058e45

Please sign in to comment.