summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-07-31 12:49:12 +0100
committerMark Brown <broonie@linaro.org>2014-07-31 14:37:20 +0100
commit04f630d845d1deb2e1d6f39f7788ff30b686a389 (patch)
tree12539c9568e00a163b75a1f2d035df851a422825 /sound
parentc60f23cb0a4b12091d92c24d365234968025a08e (diff)
ASoC: twl4030: 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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/twl4030.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 69e12a311ba2..6164a7e43896 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -1764,16 +1764,16 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
old_format = twl4030_read(codec, TWL4030_REG_AUDIO_IF);
format = old_format;
format &= ~TWL4030_DATA_WIDTH;
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_S16_LE:
+ switch (params_width(params)) {
+ case 16:
format |= TWL4030_DATA_WIDTH_16S_16W;
break;
- case SNDRV_PCM_FORMAT_S32_LE:
+ case 32:
format |= TWL4030_DATA_WIDTH_32S_24W;
break;
default:
- dev_err(codec->dev, "%s: unknown format %d\n", __func__,
- params_format(params));
+ dev_err(codec->dev, "%s: unsupported bits/sample %d\n",
+ __func__, params_width(params));
return -EINVAL;
}