Skip to contentSkip to conversation

S3C64XX I2S: Return correct codec clock

PATCH Applied jassi brar 2 participants 2 messages Sep 18, 2009

Subsystems (3)
lore
Share & tools
lore

jassi brar

author
#0 lore raw

PATCH 1/1 S3C64XX I2S: Return correct codec clock

From: Jassi <[email protected]>

Instead of always returnig pointer to the 'audio-bus' clock, check which clock is used to generate internal clocks and then return it's pointer.

---
 sound/soc/s3c24xx/s3c64xx-i2s.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/s3c64xx-i2s.c +5 -1
index 62a7fce..66f4ded 100644
@@ -133,8 +133,12 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
 struct clk *s3c64xx_i2s_get_clock(struct snd_soc_dai *dai)
 {
 	struct s3c_i2sv2_info *i2s = to_info(dai);
+	u32 iismod = readl(i2s->regs + S3C2412_IISMOD);
 
-	return i2s->iis_cclk;
+	if (iismod & S3C64XX_IISMOD_IMS_SYSMUX)
+		return i2s->iis_cclk;
+	else
+		return i2s->iis_pclk;
 }
 EXPORT_SYMBOL_GPL(s3c64xx_i2s_get_clock);
 
Signature · 1 line
1.6.2.5
Applied
#1 lore raw
Quoted 7 lines · jassi brar

From: Jassi <[email protected]>

Instead of always returnig pointer to the 'audio-bus' clock, check which clock is used to generate internal clocks and then return it's pointer.

Applied, thanks.