[PATCH 13/20] ASoC: S3C2412: I2S: Return correct source clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Until now, s3c2412_get_iisclk would return NULL since iis_clk was never
initialized.
Return appropriate pointer as per the selection made for source clock.

Signed-off-by: Jassi Brar <jassi.brar@xxxxxxxxxxx>
---
 sound/soc/s3c24xx/s3c2412-i2s.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index e6871f7..4996843 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -94,7 +94,13 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
 
 struct clk *s3c2412_get_iisclk(void)
 {
-	return s3c2412_i2s.iis_clk;
+	struct s3c_i2sv2_info *i2s = &s3c2412_i2s;
+	u32 iismod = readl(i2s->regs + S3C2412_IISMOD);
+
+	if (iismod & S3C2412_IISMOD_IMS_SYSMUX)
+		return i2s->iis_cclk;
+	else
+		return i2s->iis_pclk;
 }
 EXPORT_SYMBOL_GPL(s3c2412_get_iisclk);
 
-- 
1.6.2.5

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux