summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-07-31 12:48:36 +0100
committerMark Brown <broonie@linaro.org>2014-08-01 16:57:20 +0100
commit3e3e2922c12f29b177b18acc15655186466a92f2 (patch)
tree25b8f916a34a8d7e6aa13df7a719fb81a390c0f2 /sound/soc
parent2a11a10abe1b88b86e44480511262c72da97e55a (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/soc')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c11
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,
/* select data word length */
data = snd_soc_read(codec, AIC3X_ASD_INTF_CTRLB) & (~(0x3 << 4));
- 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:
data |= (0x01 << 4);
break;
- case SNDRV_PCM_FORMAT_S24_3LE:
- case SNDRV_PCM_FORMAT_S24_LE:
+ case 24:
data |= (0x02 << 4);
break;
- case SNDRV_PCM_FORMAT_S32_LE:
+ case 32:
data |= (0x03 << 4);
break;
}