diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2010-04-27 02:56:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-05-05 10:13:20 -0400 |
commit | 5728242789d3538abcfdcb28e01798801efd9988 (patch) | |
tree | e7610d08a85bd67da0dd82994a286a53e55e19e9 /sound/soc/s3c24xx/s3c-i2s-v2.c | |
parent | 21a7ad08e274ce7b669b165d65e0bab8391552a6 (diff) |
ASoC: S3C: I2Sv2: Unify i2s_get_clock callback
Now that we have two callbacks s3c2412_i2s_get_clock & s3c64xx_i2s_get_clock
doing exactly the same thing, we can define one generic s3c_i2sv2_get_clock
and discard other two copies. Also, switch the users to make calls to the
newly defined and generic s3c_i2sv2_get_clock
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx/s3c-i2s-v2.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index b8803a182cc1..ac153ca9c628 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -516,6 +516,18 @@ static snd_pcm_sframes_t s3c2412_i2s_delay(struct snd_pcm_substream *substream, | |||
516 | return delay; | 516 | return delay; |
517 | } | 517 | } |
518 | 518 | ||
519 | struct clk *s3c_i2sv2_get_clock(struct snd_soc_dai *cpu_dai) | ||
520 | { | ||
521 | struct s3c_i2sv2_info *i2s = to_info(cpu_dai); | ||
522 | u32 iismod = readl(i2s->regs + S3C2412_IISMOD); | ||
523 | |||
524 | if (iismod & S3C2412_IISMOD_IMS_SYSMUX) | ||
525 | return i2s->iis_cclk; | ||
526 | else | ||
527 | return i2s->iis_pclk; | ||
528 | } | ||
529 | EXPORT_SYMBOL_GPL(s3c_i2sv2_get_clock); | ||
530 | |||
519 | /* default table of all avaialable root fs divisors */ | 531 | /* default table of all avaialable root fs divisors */ |
520 | static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; | 532 | static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; |
521 | 533 | ||