Skip to content

Commit

Permalink
ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
Browse files Browse the repository at this point in the history
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
a5a5687 (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>
  • Loading branch information
Padmavathi Venna authored and Mark Brown committed Nov 21, 2014
1 parent a5a5687 commit b2de1d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
if (dir == SND_SOC_CLOCK_IN)
mod |= 1 << i2s_regs->cdclkcon_off;
else
mod &= 0 << i2s_regs->cdclkcon_off;
mod &= ~(1 << i2s_regs->cdclkcon_off);

i2s->rfs = rfs;
break;
Expand Down Expand Up @@ -551,10 +551,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
}

if (clk_id == 0)
mod &= 0 << i2s_regs->rclksrc_off;
mod &= ~(1 << i2s_regs->rclksrc_off);
else
mod |= 1 << i2s_regs->rclksrc_off;

break;
default:
dev_err(&i2s->pdev->dev, "We don't serve that!\n");
return -EINVAL;
Expand Down

0 comments on commit b2de1d2

Please sign in to comment.