diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-31 07:54:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-31 13:48:29 -0400 |
commit | e29fe49699ddd9998dc46696331097941c1ae79b (patch) | |
tree | 71397e5b6c9f0ba0901d850ddff749e68d95fc18 /sound | |
parent | ae62ba67b39f9f6db3e85dde357540e87edfc45b (diff) |
ASoC: wm8994: 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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 247b39013fba..e7dcaf3645db 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2815,19 +2815,19 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream, | |||
2815 | } | 2815 | } |
2816 | 2816 | ||
2817 | bclk_rate = params_rate(params); | 2817 | bclk_rate = params_rate(params); |
2818 | switch (params_format(params)) { | 2818 | switch (params_width(params)) { |
2819 | case SNDRV_PCM_FORMAT_S16_LE: | 2819 | case 16: |
2820 | bclk_rate *= 16; | 2820 | bclk_rate *= 16; |
2821 | break; | 2821 | break; |
2822 | case SNDRV_PCM_FORMAT_S20_3LE: | 2822 | case 20: |
2823 | bclk_rate *= 20; | 2823 | bclk_rate *= 20; |
2824 | aif1 |= 0x20; | 2824 | aif1 |= 0x20; |
2825 | break; | 2825 | break; |
2826 | case SNDRV_PCM_FORMAT_S24_LE: | 2826 | case 24: |
2827 | bclk_rate *= 24; | 2827 | bclk_rate *= 24; |
2828 | aif1 |= 0x40; | 2828 | aif1 |= 0x40; |
2829 | break; | 2829 | break; |
2830 | case SNDRV_PCM_FORMAT_S32_LE: | 2830 | case 32: |
2831 | bclk_rate *= 32; | 2831 | bclk_rate *= 32; |
2832 | aif1 |= 0x60; | 2832 | aif1 |= 0x60; |
2833 | break; | 2833 | break; |
@@ -2966,16 +2966,16 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream, | |||
2966 | return 0; | 2966 | return 0; |
2967 | } | 2967 | } |
2968 | 2968 | ||
2969 | switch (params_format(params)) { | 2969 | switch (params_width(params)) { |
2970 | case SNDRV_PCM_FORMAT_S16_LE: | 2970 | case 16: |
2971 | break; | 2971 | break; |
2972 | case SNDRV_PCM_FORMAT_S20_3LE: | 2972 | case 20: |
2973 | aif1 |= 0x20; | 2973 | aif1 |= 0x20; |
2974 | break; | 2974 | break; |
2975 | case SNDRV_PCM_FORMAT_S24_LE: | 2975 | case 24: |
2976 | aif1 |= 0x40; | 2976 | aif1 |= 0x40; |
2977 | break; | 2977 | break; |
2978 | case SNDRV_PCM_FORMAT_S32_LE: | 2978 | case 32: |
2979 | aif1 |= 0x60; | 2979 | aif1 |= 0x60; |
2980 | break; | 2980 | break; |
2981 | default: | 2981 | default: |