diff options
author | Andy Green <agreen@octopus.localdomain> | 2009-02-15 12:31:10 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-15 12:31:10 +0000 |
commit | d6deb02387ac71384ab469044f40b576c94e4445 (patch) | |
tree | c65e9aa3a31dd80a95ddff9bee1758777a7d6829 /sound | |
parent | d82debf2629689a241c0a0b1fbae9784c9fc323d (diff) |
Add s3c64xx_i2s_get_clockrate() so that the link
drivers can find the IIS bus clock rate.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.c | 13 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.h | 2 |
2 files changed, 15 insertions, 0 deletions
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 */ |