diff mbox

ASoC: rt5640: Correct the judgement of data length

Message ID 1395920091-3278-1-git-send-email-oder_chiou@realtek.com (mailing list archive)
State Accepted
Commit 9bccae733b8d0e281729464267191103c09b3d13
Headers show

Commit Message

Oder Chiou March 27, 2014, 11:34 a.m. UTC
The patch corrects the judgement of data length.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5640.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Mark Brown March 27, 2014, 1:17 p.m. UTC | #1
On Thu, Mar 27, 2014 at 07:34:51PM +0800, Oder Chiou wrote:
> The patch corrects the judgement of data length.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 0883c8a..bcd6513 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -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: