ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
authorPadmavathi Venna <padma.v@samsung.com>
Thu, 20 Nov 2014 10:03:17 +0000 (15:33 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 21 Nov 2014 18:08:13 +0000 (18:08 +0000)
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>
sound/soc/samsung/i2s.c

index 947352d00ddf5774bc10ca82111b8ec626a4c6dd..0d76bc15b7854c86bbbe1cdbbbfd009d4322ea9f 100644 (file)
@@ -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;
@@ -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;
This page took 0.025823 seconds and 5 git commands to generate.