Skip to content

Commit

Permalink
ASoC: rockchip-i2s: fix master mode set bit error
Browse files Browse the repository at this point in the history
Fix error format set to I2S master or slave mode.
Test on RK3288 board with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jianqun authored and Mark Brown committed Sep 13, 2014
1 parent 7d1311b commit 07833d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sound/soc/rockchip/rockchip_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
struct rk_i2s_dev *i2s = to_info(cpu_dai);
unsigned int mask = 0, val = 0;

mask = I2S_CKR_MSS_SLAVE;
mask = I2S_CKR_MSS_MASK;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS:
val = I2S_CKR_MSS_SLAVE;
/* Set source clock in Master mode */
val = I2S_CKR_MSS_MASTER;
break;
case SND_SOC_DAIFMT_CBM_CFM:
val = I2S_CKR_MSS_MASTER;
val = I2S_CKR_MSS_SLAVE;
break;
default:
return -EINVAL;
Expand Down

0 comments on commit 07833d8

Please sign in to comment.