linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface
@ 2014-05-19 17:30 Sylwester Nawrocki
  2014-05-20  5:14 ` Tushar Behera
  2014-05-20 22:21 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Sylwester Nawrocki @ 2014-05-19 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 sound/soc/samsung/i2s.c |    4 ++++
 sound/soc/samsung/i2s.h |    1 +
 2 files changed, 5 insertions(+)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 048ead9..ae02811 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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)
diff --git a/sound/soc/samsung/i2s.h b/sound/soc/samsung/i2s.h
index 7966afc..21ff24e 100644
--- a/sound/soc/samsung/i2s.h
+++ b/sound/soc/samsung/i2s.h
@@ -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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-20 22:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 17:30 [PATCH] ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface Sylwester Nawrocki
2014-05-20  5:14 ` Tushar Behera
2014-05-20  9:10   ` Sylwester Nawrocki
2014-05-20 10:01     ` Tushar Behera
2014-05-20 10:10     ` Mark Brown
2014-05-20 22:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).