diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-19 12:36:10 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-25 20:55:46 +0100 |
commit | c0fa59df7214e546f8a37bc677867ac7b67b5c93 (patch) | |
tree | 80d1e2e8861f5b84d61d195bf880933c0ace727d /sound/soc/soc-utils.c | |
parent | Merge branch 'twl4030-mfd' into for-2.6.33 (diff) | |
download | linux-c0fa59df7214e546f8a37bc677867ac7b67b5c93.tar.xz linux-c0fa59df7214e546f8a37bc677867ac7b67b5c93.zip |
ASoC: Add BCLK calculation utility for TDM mode too
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r-- | sound/soc/soc-utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index b16aaaeb0aab..1d07b931f3d8 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -54,6 +54,12 @@ int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params) } EXPORT_SYMBOL_GPL(snd_soc_params_to_frame_size); +int snd_soc_calc_bclk(int fs, int sample_size, int channels, int tdm_slots) +{ + return fs * snd_soc_calc_frame_size(sample_size, channels, tdm_slots); +} +EXPORT_SYMBOL_GPL(snd_soc_calc_bclk); + int snd_soc_params_to_bclk(struct snd_pcm_hw_params *params) { int ret; |