diff options
author | 2025-01-17 11:31:02 -0500 | |
---|---|---|
committer | 2025-01-21 15:21:49 +0000 | |
commit | 5323186e2e8d33c073fad51e24f18e2d6dbae2da (patch) | |
tree | b47415e7810b5f7ce8b7c38d6377a57bb40db6ed /scripts/generate_rust_analyzer.py | |
parent | ASoC: fsl: two fixes for asrc memory to memory (diff) | |
download | wireguard-linux-5323186e2e8d33c073fad51e24f18e2d6dbae2da.tar.xz wireguard-linux-5323186e2e8d33c073fad51e24f18e2d6dbae2da.zip |
ASoC: rockchip: i2s_tdm: Re-add the set_sysclk callback
In commit
9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates"),
the set_sysclk callback was removed as considered unused as the mclk rate
can be set in the hw_params callback.
The difference between hw_params and set_sysclk is that the former is
called with the audio sampling rate set in the params (e.g.: 48000 Hz)
while the latter is called with a clock rate already computed with
sampling_rate * mclk-fs (e.g.: 48000 * 256)
For HDMI audio using the Rockchip I2S TDM driver, the mclk-fs value must
be set to 128 instead of the default 256, and that value is set in the
device tree at the machine driver level (like a simple-audio-card
compatible node).
Therefore, the i2s_tdm driver has no idea that another mclk-fs value can
be configured and simply computes the mclk rate in the hw_params callback
with DEFAULT_MCLK_FS * params_rate(params), which is wrong for HDMI
audio.
Re-add the set_sysclk callback so that the mclk rate is computed by the
machine driver which has the correct mclk-fs value set in its device tree
node.
Fixes: 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates")
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Link: https://patch.msgid.link/20250117163102.65807-1-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions