aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPadmavathi Venna <padma.v@samsung.com>2014-11-20 05:03:17 -0500
committerMark Brown <broonie@kernel.org>2014-11-21 13:08:13 -0500
commitb2de1d20a05d8691cb1889c859de2ab56938b82a (patch)
treeb568a28703c49caf3c41bbe2311d29d92f3270f4
parenta5a56871f804edac93a53b5e871c0e9818fb9033 (diff)
ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
In the i2s_set_sysclk() callback we are currently clearing all bits of the IISMOD register in i2s_set_sysclk. It's due to an incorrect mask used for the AND operation which is introduced in commit a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung: add support for exynos7 I2S controller) and also adds the missing break statement. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/samsung/i2s.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 947352d00ddf..0d76bc15b785 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -494,7 +494,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
494 if (dir == SND_SOC_CLOCK_IN) 494 if (dir == SND_SOC_CLOCK_IN)
495 mod |= 1 << i2s_regs->cdclkcon_off; 495 mod |= 1 << i2s_regs->cdclkcon_off;
496 else 496 else
497 mod &= 0 << i2s_regs->cdclkcon_off; 497 mod &= ~(1 << i2s_regs->cdclkcon_off);
498 498
499 i2s->rfs = rfs; 499 i2s->rfs = rfs;
500 break; 500 break;
@@ -551,10 +551,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
551 } 551 }
552 552
553 if (clk_id == 0) 553 if (clk_id == 0)
554 mod &= 0 << i2s_regs->rclksrc_off; 554 mod &= ~(1 << i2s_regs->rclksrc_off);
555 else 555 else
556 mod |= 1 << i2s_regs->rclksrc_off; 556 mod |= 1 << i2s_regs->rclksrc_off;
557 557
558 break;
558 default: 559 default:
559 dev_err(&i2s->pdev->dev, "We don't serve that!\n"); 560 dev_err(&i2s->pdev->dev, "We don't serve that!\n");
560 return -EINVAL; 561 return -EINVAL;