ASoC: tegra20: i2s: Filter out unsupported rates
authorDmitry Osipenko <digetx@gmail.com>
Sat, 4 Dec 2021 14:37:16 +0000 (17:37 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 17 Dec 2021 11:14:01 +0000 (11:14 +0000)
commitbfa4671db1effe315cade5bddd6cf025e1c403d0
tree2b4f9ab4ea79c1ec4759a96eecdf227ff46417bf
parent9d8f51cd1fa993939db02a014d4f4b6e252c2a18
ASoC: tegra20: i2s: Filter out unsupported rates

Support new nvidia,fixed-parent-rate device-tree property which instructs
I2S that board wants parent clock rate to stay at a fixed rate. This allows
to play audio over S/PDIF and I2S simultaneously. The root of the problem
is that audio components on Tegra share the same audio PLL, and thus, only
a subset of rates can be supported if we want to play audio simultaneously.
Filter out audio rates that don't match parent clock rate if device-tree
has the nvidia,fixed-parent-rate property.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20211204143725.31646-14-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra20_i2s.c