ASoC: meson: axg-fifo: fix fifo threshold setup
authorJerome Brunet <jbrunet@baylibre.com>
Wed, 18 Dec 2019 17:24:17 +0000 (18:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:44 +0000 (04:35 -0800)
commit05dceb5a62ce5b8b6fe466d92101a0bef13e275e
treed65d9d68bda763d0f79b05b4c7f5ab7ace41594c
parent7c662f69fa0530c45afa100ab4aaf0d9c8d92199
ASoC: meson: axg-fifo: fix fifo threshold setup

commit 864cee90d4bd870e5d5e5a0b1a6f055f4f951350 upstream.

On TODDR sm1, the fifo threshold register field is slightly different
compared to the other SoCs. This leads to the fifo A being flushed to
memory every 8kB. If the period is smaller than that, several periods
are pushed to memory and notified at once. This is not ideal.

Fix the register field update. With this, the fifos are flushed every
128B. We could still do better, like adapt the threshold depending on
the period size, but at least it consistent across the different
SoC/fifos

Fixes: 5ac825c3d85e ("ASoC: meson: axg-toddr: add sm1 support")
Reported-by: Alden DSouza <aldend@google.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20191218172420.1199117-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/meson/axg-fifo.c
sound/soc/meson/axg-fifo.h
sound/soc/meson/axg-frddr.c
sound/soc/meson/axg-toddr.c