OSDN Git Service

ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 19 May 2014 17:30:38 +0000 (19:30 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 20 May 2014 22:20:57 +0000 (23:20 +0100)
This patch adds support for setting source clock of the "Core CLK"
of the IIS Multi Audio Interface.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/i2s.c
sound/soc/samsung/i2s.h

index 6e61db7..1e99071 100644 (file)
@@ -451,6 +451,10 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
        u32 mod = readl(i2s->addr + I2SMOD);
 
        switch (clk_id) {
+       case SAMSUNG_I2S_OPCLK:
+               mod &= ~MOD_OPCLK_MASK;
+               mod |= dir;
+               break;
        case SAMSUNG_I2S_CDCLK:
                /* Shouldn't matter in GATING(CLOCK_IN) mode */
                if (dir == SND_SOC_CLOCK_IN)
index 7966afc..21ff24e 100644 (file)
@@ -18,5 +18,6 @@
 #define SAMSUNG_I2S_RCLKSRC_0  0
 #define SAMSUNG_I2S_RCLKSRC_1  1
 #define SAMSUNG_I2S_CDCLK              2
+#define SAMSUNG_I2S_OPCLK              3
 
 #endif /* __SND_SOC_SAMSUNG_I2S_H */