From 33e179114b5dab125c7aea55356ff8e337d7916b Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 19 Nov 2009 11:36:10 +0000 Subject: [PATCH] --- yaml --- r: 170252 b: refs/heads/master c: c0fa59df7214e546f8a37bc677867ac7b67b5c93 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/sound/soc.h | 1 + trunk/sound/soc/soc-utils.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a06dcffcede8..5d66359ff345 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2449ae85e3c88ef27853aef0d19772149e269ae7 +refs/heads/master: c0fa59df7214e546f8a37bc677867ac7b67b5c93 diff --git a/trunk/include/sound/soc.h b/trunk/include/sound/soc.h index 13b117aac5d9..0d7718f9280d 100644 --- a/trunk/include/sound/soc.h +++ b/trunk/include/sound/soc.h @@ -230,6 +230,7 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); /* 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/trunk/sound/soc/soc-utils.c b/trunk/sound/soc/soc-utils.c index b16aaaeb0aab..1d07b931f3d8 100644 --- a/trunk/sound/soc/soc-utils.c +++ b/trunk/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;