]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit09d68d5bd5be7b7576995ec90713c6a6a7180bb1
treeb77703935e75c38696283c079c382a6f4147f638
parent74f47ad99f7b292f641d7eb90e05d6d9e1e8809c
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