提交 7c2aff6a 编写于 作者: M Mark Brown

ASoC: adau1373: Use params_width() rather than memory format

Signed-off-by: NMark Brown <broonie@linaro.org>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
上级 d4dd1fdf
...@@ -1078,17 +1078,17 @@ static int adau1373_hw_params(struct snd_pcm_substream *substream, ...@@ -1078,17 +1078,17 @@ static int adau1373_hw_params(struct snd_pcm_substream *substream,
ADAU1373_BCLKDIV_SR_MASK | ADAU1373_BCLKDIV_BCLK_MASK, ADAU1373_BCLKDIV_SR_MASK | ADAU1373_BCLKDIV_BCLK_MASK,
(div << 2) | ADAU1373_BCLKDIV_64); (div << 2) | ADAU1373_BCLKDIV_64);
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
ctrl = ADAU1373_DAI_WLEN_16; ctrl = ADAU1373_DAI_WLEN_16;
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
ctrl = ADAU1373_DAI_WLEN_20; ctrl = ADAU1373_DAI_WLEN_20;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
ctrl = ADAU1373_DAI_WLEN_24; ctrl = ADAU1373_DAI_WLEN_24;
break; break;
case SNDRV_PCM_FORMAT_S32_LE: case 32:
ctrl = ADAU1373_DAI_WLEN_32; ctrl = ADAU1373_DAI_WLEN_32;
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册