]> Pileus Git - ~andy/linux/blobdiff - include/sound/soc.h
ASoC: Add bit clock rate calculator utility functions
[~andy/linux] / include / sound / soc.h
index 7f3a4c5028daf9b89f5942f1a2506ef8f0455aa6..310a21949a3ede902c9402428f0707097bc14d13 100644 (file)
@@ -227,6 +227,11 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
 void snd_soc_free_pcms(struct snd_soc_device *socdev);
 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_params_to_bclk(struct snd_pcm_hw_params *parms);
+
 /* set runtime hw params */
 int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
        const struct snd_pcm_hardware *hw);