Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bccae73 authored by Oder Chiou's avatar Oder Chiou Committed by Mark Brown
Browse files

ASoC: rt5640: Correct the judgement of data length



The patch corrects the judgement of data length.

Signed-off-by: default avatarOder Chiou <oder_chiou@realtek.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 4c9185be
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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",
				bclk_ms, pre_div, dai->id);

	switch (params_format(params)) {
	case SNDRV_PCM_FORMAT_S16_LE:
	switch (params_width(params)) {
	case 16:
		break;
	case SNDRV_PCM_FORMAT_S20_3LE:
	case 20:
		val_len |= RT5640_I2S_DL_20;
		break;
	case SNDRV_PCM_FORMAT_S24_LE:
	case 24:
		val_len |= RT5640_I2S_DL_24;
		break;
	case SNDRV_PCM_FORMAT_S8:
	case 8:
		val_len |= RT5640_I2S_DL_8;
		break;
	default: