]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs
authorJerome Brunet <jbrunet@baylibre.com>
Fri, 23 Feb 2024 17:51:07 +0000 (18:51 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:52 +0000 (18:19 -0400)
commit923d95bae79aeb1a3b6b9d1d18ad6527a8ff5dec
treec65c44d474e492a14a3aae5f3bce480649f53bf7
parent8529c215360ba076590e7d4f03cb6636e401587a
ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs

[ Upstream commit e3741a8d28a1137f8b19ae6f3d6e3be69a454a0a ]

By default, when mclk-fs is not provided, the tdm-interface driver
requests an MCLK that is 4x the bit clock, SCLK.

However there is no justification for this:

* If the codec needs MCLK for its operation, mclk-fs is expected to be set
  according to the codec requirements.
* If the codec does not need MCLK the minimum is 2 * SCLK, because this is
  minimum the divider between SCLK and MCLK can do.

Multiplying by 4 may cause problems because the PLL limit may be reached
sooner than it should, so use 2x instead.

Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://msgid.link/r/20240223175116.2005407-2-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