mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 05:20:53 +07:00
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>
This commit is contained in:
parent
2449ae85e3
commit
c0fa59df72
@ -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 */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user