提交 9bccae73 编写于 作者: O Oder Chiou 提交者: Mark Brown

ASoC: rt5640: Correct the judgement of data length

The patch corrects the judgement of data length.
Signed-off-by: NOder Chiou <oder_chiou@realtek.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 4c9185be
...@@ -1622,16 +1622,16 @@ static int rt5640_hw_params(struct snd_pcm_substream *substream, ...@@ -1622,16 +1622,16 @@ static int rt5640_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 |= RT5640_I2S_DL_20; val_len |= RT5640_I2S_DL_20;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
val_len |= RT5640_I2S_DL_24; val_len |= RT5640_I2S_DL_24;
break; break;
case SNDRV_PCM_FORMAT_S8: case 8:
val_len |= RT5640_I2S_DL_8; val_len |= RT5640_I2S_DL_8;
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册