diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-12-23 19:13:51 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-12-24 06:41:21 -0500 |
commit | b3172f222ab5afdc91ea058bd11c42cf169728f3 (patch) | |
tree | 56b74872ac36bed4fb51a26210b82dee9461f2ec /sound/soc/codecs/wm8940.c | |
parent | 18f98ab54735f66ea84bf679b70fcec5e8b3df66 (diff) |
ASoC: fix params_rate() macro use in several codecs
Sevelar ASoC codec drivers wrongly assume, that the params_rate() macro
returns one of SNDRV_PCM_RATE_* defines instead of the actual numerical
sampling rate. Fix them.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Diffstat (limited to 'sound/soc/codecs/wm8940.c')
-rw-r--r-- | sound/soc/codecs/wm8940.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 3d850b97037a..31e39ffd1d8e 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -378,23 +378,23 @@ static int wm8940_i2s_hw_params(struct snd_pcm_substream *substream, | |||
378 | iface |= (1 << 9); | 378 | iface |= (1 << 9); |
379 | 379 | ||
380 | switch (params_rate(params)) { | 380 | switch (params_rate(params)) { |
381 | case SNDRV_PCM_RATE_8000: | 381 | case 8000: |
382 | addcntrl |= (0x5 << 1); | 382 | addcntrl |= (0x5 << 1); |
383 | break; | 383 | break; |
384 | case SNDRV_PCM_RATE_11025: | 384 | case 11025: |
385 | addcntrl |= (0x4 << 1); | 385 | addcntrl |= (0x4 << 1); |
386 | break; | 386 | break; |
387 | case SNDRV_PCM_RATE_16000: | 387 | case 16000: |
388 | addcntrl |= (0x3 << 1); | 388 | addcntrl |= (0x3 << 1); |
389 | break; | 389 | break; |
390 | case SNDRV_PCM_RATE_22050: | 390 | case 22050: |
391 | addcntrl |= (0x2 << 1); | 391 | addcntrl |= (0x2 << 1); |
392 | break; | 392 | break; |
393 | case SNDRV_PCM_RATE_32000: | 393 | case 32000: |
394 | addcntrl |= (0x1 << 1); | 394 | addcntrl |= (0x1 << 1); |
395 | break; | 395 | break; |
396 | case SNDRV_PCM_RATE_44100: | 396 | case 44100: |
397 | case SNDRV_PCM_RATE_48000: | 397 | case 48000: |
398 | break; | 398 | break; |
399 | } | 399 | } |
400 | ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); | 400 | ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); |