提交 794f33d2 编写于 作者: M Mark Brown

ASoC: rt5651: Convert to params_width()

The CODEC doesn't care how data is laid out in memory.
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 e6777ead
...@@ -1366,16 +1366,16 @@ static int rt5651_hw_params(struct snd_pcm_substream *substream, ...@@ -1366,16 +1366,16 @@ static int rt5651_hw_params(struct snd_pcm_substream *substream,
dev_dbg(dai->dev, "bclk_ms is %d and pre_div is %d for iis %d\n", dev_dbg(dai->dev, "bclk_ms is %d and pre_div is %d for iis %d\n",
bclk_ms, pre_div, dai->id); bclk_ms, pre_div, dai->id);
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
val_len |= RT5651_I2S_DL_20; val_len |= RT5651_I2S_DL_20;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
val_len |= RT5651_I2S_DL_24; val_len |= RT5651_I2S_DL_24;
break; break;
case SNDRV_PCM_FORMAT_S8: case 8:
val_len |= RT5651_I2S_DL_8; val_len |= RT5651_I2S_DL_8;
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册