From d6deb02387ac71384ab469044f40b576c94e4445 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 15 Feb 2009 12:31:10 +0000 Subject: Add s3c64xx_i2s_get_clockrate() so that the link drivers can find the IIS bus clock rate. Signed-off-by: Ben Dooks --- sound/soc/s3c24xx/s3c64xx-i2s.c | 13 +++++++++++++ sound/soc/s3c24xx/s3c64xx-i2s.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'sound') diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index bf7c3d73739..2109b21ef9f 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c @@ -82,6 +82,19 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, return 0; } +static inline struct s3c_i2sv2_info *to_info(struct snd_soc_dai *cpu_dai) +{ + return cpu_dai->private_data; +} + +unsigned long s3c64xx_i2s_get_clockrate(struct snd_soc_dai *dai) +{ + struct s3c_i2sv2_info *i2s = to_info(dai); + + return clk_get_rate(i2s->iis_cclk); +} +EXPORT_SYMBOL_GPL(s3c64xx_i2s_get_clockrate); + static int s3c64xx_i2s_probe(struct platform_device *pdev, struct snd_soc_dai *dai) { diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.h b/sound/soc/s3c24xx/s3c64xx-i2s.h index 288b0affe14..add574607ce 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.h +++ b/sound/soc/s3c24xx/s3c64xx-i2s.h @@ -25,4 +25,6 @@ extern struct snd_soc_dai s3c64xx_i2s_dai; +extern unsigned long s3c64xx_i2s_get_clockrate(struct snd_soc_dai *cpu_dai); + #endif /* __SND_SOC_S3C24XX_S3C64XX_I2S_H */ -- cgit v1.2.3