diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-31 07:48:36 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-01 11:57:20 -0400 |
commit | 3e3e2922c12f29b177b18acc15655186466a92f2 (patch) | |
tree | 25b8f916a34a8d7e6aa13df7a719fb81a390c0f2 /sound | |
parent | 2a11a10abe1b88b86e44480511262c72da97e55a (diff) |
ASoC: tlv320aic3x: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index d275890a6827..00b127fe2b77 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -873,17 +873,16 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream, | |||
873 | 873 | ||
874 | /* select data word length */ | 874 | /* select data word length */ |
875 | data = snd_soc_read(codec, AIC3X_ASD_INTF_CTRLB) & (~(0x3 << 4)); | 875 | data = snd_soc_read(codec, AIC3X_ASD_INTF_CTRLB) & (~(0x3 << 4)); |
876 | switch (params_format(params)) { | 876 | switch (params_width(params)) { |
877 | case SNDRV_PCM_FORMAT_S16_LE: | 877 | case 16: |
878 | break; | 878 | break; |
879 | case SNDRV_PCM_FORMAT_S20_3LE: | 879 | case 20: |
880 | data |= (0x01 << 4); | 880 | data |= (0x01 << 4); |
881 | break; | 881 | break; |
882 | case SNDRV_PCM_FORMAT_S24_3LE: | 882 | case 24: |
883 | case SNDRV_PCM_FORMAT_S24_LE: | ||
884 | data |= (0x02 << 4); | 883 | data |= (0x02 << 4); |
885 | break; | 884 | break; |
886 | case SNDRV_PCM_FORMAT_S32_LE: | 885 | case 32: |
887 | data |= (0x03 << 4); | 886 | data |= (0x03 << 4); |
888 | break; | 887 | break; |
889 | } | 888 | } |