mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ASoC: Add bit clock rate calculator utility functions
Many devices need to calculate the bit clock rate desired to work out the clock configuration required for the device. Provide utility functions to do this using both hw_params structures and raw numbers. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
This commit is contained in:
parent
a68cc8daeb
commit
7aae816dae
3 changed files with 74 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue