]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: xilinx: xlnx_formatter_pcm: Handle sysclk setting
authorRobert Hancock <robert.hancock@calian.com>
Thu, 20 Jan 2022 19:58:27 +0000 (13:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:42 +0000 (13:57 +0200)
commit2091de10a1ffc3b76a527e90d5399d15fca0a8ce
tree343d72e7cba28dda1c0b03dec2e5c94ddd50286a
parent0e46a690428925ec7daf946891f0becd4d178e35
ASoC: xilinx: xlnx_formatter_pcm: Handle sysclk setting

[ Upstream commit 1c5091fbe7e0d0804158200b7feac5123f7b4fbd ]

This driver did not set the MM2S Fs Multiplier Register to the proper
value for playback streams. This needs to be set to the sample rate to
MCLK multiplier, or random stream underflows can occur on the downstream
I2S transmitter.

Store the sysclk value provided via the set_sysclk callback and use that
in conjunction with the sample rate in the hw_params callback to calculate
the proper value to set for this register.

Fixes: 6f6c3c36f091 ("ASoC: xlnx: add pcm formatter platform driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20220120195832.1742271-2-robert.hancock@calian.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/xilinx/xlnx_formatter_pcm.c