aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/Kconfig
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2022-04-05 14:54:16 +0100
committerMark Brown <broonie@kernel.org>2022-04-05 18:27:55 +0100
commit1ef34dd2b90d78a9830398441801658ef86eee9d (patch)
treed327accd528797d0f770ebc3924ec978182334ad /sound/soc/Kconfig
parentASoC: soc.h: Add SOC_SINGLE_S_TLV() macro (diff)
downloadlinux-dev-1ef34dd2b90d78a9830398441801658ef86eee9d.tar.xz
linux-dev-1ef34dd2b90d78a9830398441801658ef86eee9d.zip
ASoC: soc-utils: Add helper to calculate BCLK from TDM info
Add a helper function snd_soc_tdm_params_to_bclk() to calculate the bclk from params info and the tdm sots configuration. When using a TDM frame of N slots of width W bits: bclk = sample_rate * N * W As a convenience to simplify calling code, if the slot count or slot width are 0 a value will be obtained from the params. This allows calling code to use this one function to handle cases of TDM where only one parameter is fixed, or I2S where the slot width is fixed (for example to set a 32-bit slot for 24-bit samples). Also as a convenience the slot count can optionally be rounded up to a multiple. This is mainly useful for I2S systems, since I2S has two phases of LRCLK the number of slots is always a multiple of 2. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220405135419.1230088-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/Kconfig')
0 files changed, 0 insertions, 0 deletions