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>
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 13b117a..0d7718f9 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -230,6 +230,7 @@
 /* Utility functions to get clock rates from various things */
 int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
 int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params);
+int snd_soc_calc_bclk(int fs, int sample_size, int channels, int tdm_slots);
 int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms);
 
 /* set runtime hw params */
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index b16aaae..1d07b93 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -54,6 +54,12 @@
 }
 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;