ASoC: rockchip: i2s-tdm: Fix trcm mode by setting clock on right mclk
authorAlibek Omarov <a1ba.omarov@gmail.com>
Tue, 4 Jun 2024 18:47:52 +0000 (21:47 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 5 Jun 2024 12:03:11 +0000 (13:03 +0100)
commitccd8d753f0fe8f16745fa2b6be5946349731d901
tree1fcaca683290f4783c44491b81606df7d4a2fda4
parent4d46b699cd0c82e55c031ab515a6267ad17b7164
ASoC: rockchip: i2s-tdm: Fix trcm mode by setting clock on right mclk

When TRCM mode is enabled, I2S RX and TX clocks are synchronized through
selected clock source. Without this fix BCLK and LRCK might get parented
to an uninitialized MCLK and the DAI will receive data at wrong pace.

However, unlike in original i2s-tdm driver, there is no need to manually
synchronize mclk_rx and mclk_tx, as only one gets used anyway.

Tested on a board with RK3568 SoC and Silergy SY24145S codec with enabled and
disabled TRCM mode.

Fixes: 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates")
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://msgid.link/r/20240604184752.697313-1-a1ba.omarov@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s_tdm.c