]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: meson: axg-tdm-interface: add frame rate constraint
authorJerome Brunet <jbrunet@baylibre.com>
Fri, 23 Feb 2024 17:51:08 +0000 (18:51 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:52 +0000 (18:19 -0400)
commit05173ef70742026af8ddcf1d4c3df66cb4b9c0d9
treec3a1f96b3026c7bdc79a291d0e7897a3224a4c28
parent923d95bae79aeb1a3b6b9d1d18ad6527a8ff5dec
ASoC: meson: axg-tdm-interface: add frame rate constraint

[ Upstream commit 59c6a3a43b221cc2a211181b1298e43b2c2df782 ]

According to Amlogic datasheets for the SoCs supported by this driver, the
maximum bit clock rate is 100MHz.

The tdm interface allows the rates listed by the DAI driver, regardless of
the number slots or their width. However, these will impact the bit clock
rate.

Hitting the 100MHz limit is very unlikely for most use cases but it is
possible.

For example with 32 slots / 32 bits wide, the maximum rate is no longer
384kHz but ~96kHz.

Add the constraint accordingly if the component is not already active.
If it is active, the rate is already constrained by the first stream rate.

Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://msgid.link/r/20240223175116.2005407-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/meson/axg-tdm-interface.c