diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-31 12:51:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-31 18:47:07 +0100 |
commit | 34967ad2426257761cb158128f8e819d3fb0c713 (patch) | |
tree | ca5ad02a3fbda968be26e3739a0979a14b54bba6 /sound/soc/codecs/wm8741.c | |
parent | a5d0de23b203cc40df7196858b7a6ad546bb8408 (diff) | |
download | lwn-34967ad2426257761cb158128f8e819d3fb0c713.tar.gz lwn-34967ad2426257761cb158128f8e819d3fb0c713.zip |
ASoC: wm8741: 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/soc/codecs/wm8741.c')
-rw-r--r-- | sound/soc/codecs/wm8741.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index b33542a04607..a237f1627f61 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -241,26 +241,26 @@ static int wm8741_hw_params(struct snd_pcm_substream *substream, } /* bit size */ - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: + switch (params_width(params)) { + case 16: break; - case SNDRV_PCM_FORMAT_S20_3LE: + case 20: iface |= 0x0001; break; - case SNDRV_PCM_FORMAT_S24_LE: + case 24: iface |= 0x0002; break; - case SNDRV_PCM_FORMAT_S32_LE: + case 32: iface |= 0x0003; break; default: dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", - params_format(params)); + params_width(params)); return -EINVAL; } dev_dbg(codec->dev, "wm8741_hw_params: bit size param = %d", - params_format(params)); + params_width(params)); snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface); return 0; |