From: Jassi Date: Fri, 18 Sep 2009 06:22:27 +0000 (+0900) Subject: ASoC: Return correct codec clock in s3c64xx-i2s X-Git-Tag: v2.6.33-rc3~4^2~124 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b1cd6b9ec7c749ddfad628c8c12659591ae195e6;p=~shefty%2Frdma-dev.git ASoC: Return correct codec clock in s3c64xx-i2s 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. Signed-off-by: Jassi Signed-off-by: Mark Brown --- diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index aaf452096be..43fb253a342 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c @@ -124,8 +124,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);