]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode
authorClément Péron <peron.clem@gmail.com>
Fri, 30 Oct 2020 14:46:34 +0000 (15:46 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:25:36 +0000 (14:25 +0100)
commit524c211e8004c6e863257454aa22e5ed112aa73a
treea57b27b0299aefe6140f79c18fed94f69597b10d
parentfe19dc9e25e078a093089d374fdc7e0407035df6
ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode

BugLink: https://bugs.launchpad.net/bugs/1910822
[ Upstream commit 93c0210671d8f3ec2262da703fab93a1497158a8 ]

Left and Right justified mode are computed using the same formula
as DSP_A and DSP_B mode.
Which is wrong and the user manual explicitly says:

LRCK_PERDIOD:
PCM Mode: Number of BCLKs within (Left + Right) channel width.
I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each
individual channel width(Left or Right)

Fix this by using the same formula as the I2S mode.

Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats")
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
sound/soc/sunxi/sun4i-i2s.c