summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-07-31 12:48:04 +0100
committerMark Brown <broonie@linaro.org>2014-07-31 13:30:15 +0100
commit93d0ad8f374c59aa9f72493b8c5fcae303ca09ca (patch)
treee5dd014724fd64e02a66dbb5737c3f3799ed8c18 /sound
parentc665330c1951618d824b7789434b4de843681f07 (diff)
downloadblackbird-op-linux-93d0ad8f374c59aa9f72493b8c5fcae303ca09ca.tar.gz
blackbird-op-linux-93d0ad8f374c59aa9f72493b8c5fcae303ca09ca.zip
ASoC: tlv320aic26: 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/tlv320aic26.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 43069de3d56a..620ab9ea1ef0 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -71,8 +71,8 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
dev_dbg(&aic26->spi->dev, "aic26_hw_params(substream=%p, params=%p)\n",
substream, params);
- dev_dbg(&aic26->spi->dev, "rate=%i format=%i\n", params_rate(params),
- params_format(params));
+ dev_dbg(&aic26->spi->dev, "rate=%i width=%d\n", params_rate(params),
+ params_width(params));
switch (params_rate(params)) {
case 8000: fsref = 48000; divisor = AIC26_DIV_6; break;
@@ -89,11 +89,11 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
}
/* select data word length */
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_S8: wlen = AIC26_WLEN_16; break;
- case SNDRV_PCM_FORMAT_S16_BE: wlen = AIC26_WLEN_16; break;
- case SNDRV_PCM_FORMAT_S24_BE: wlen = AIC26_WLEN_24; break;
- case SNDRV_PCM_FORMAT_S32_BE: wlen = AIC26_WLEN_32; break;
+ switch (params_width(params)) {
+ case 8: wlen = AIC26_WLEN_16; break;
+ case 16: wlen = AIC26_WLEN_16; break;
+ case 24: wlen = AIC26_WLEN_24; break;
+ case 32: wlen = AIC26_WLEN_32; break;
default:
dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL;
}
OpenPOWER on IntegriCloud