OSDN Git Service

ASoC: xilinx: xlnx_i2s: Handle sysclk setting
authorRobert Hancock <robert.hancock@calian.com>
Thu, 20 Jan 2022 19:58:29 +0000 (13:58 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 24 Jan 2022 19:45:38 +0000 (19:45 +0000)
commitc47aef899c1bb0cbda48808356e7c040d95ca612
treeb77703935e75c38696283c079c382a6f4147f638
parent5e46c63ca22278fe363dfd9f5360c2e2ad082087
ASoC: xilinx: xlnx_i2s: Handle sysclk setting

This driver previously only handled the set_clkdiv divider callback when
setting the SCLK Out Divider field in the I2S Timing Control register.
However, when using the simple-audio-card driver, the set_sysclk function
is called but not set_clkdiv. This caused the divider not to be set,
leaving it at an invalid value of 0 and resulting in a very low SCLK
output rate.

Handle set_clkdiv and store the sysclk (MCLK) value for later use in
hw_params to set the SCLK Out Divider such that:
MCLK/SCLK = divider * 2

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20220120195832.1742271-4-robert.hancock@calian.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/xilinx/xlnx_i2s.c