linux-stable/sound/soc/jz4740
Aidan MacDonald 9526c179b9 ASoC: jz4740-i2s: Handle independent FIFO flush bits
commit 8b3a9ad862 upstream.

On the JZ4740, there is a single bit that flushes (empties) both
the transmit and receive FIFO. Later SoCs have independent flush
bits for each FIFO.

Independent FIFOs can be flushed before the snd_soc_dai_active()
check because it won't disturb other active streams. This ensures
that the FIFO we're about to use is always flushed before starting
up. With shared FIFOs we can't do that because if another substream
is active, flushing its FIFO would cause underrun errors.

This also fixes a bug: since we were only setting the JZ4740's
flush bit, which corresponds to the TX FIFO flush bit on other
SoCs, other SoCs were not having their RX FIFO flushed at all.

Fixes: 967beb2e87 ("ASoC: jz4740: Add jz4780 support")
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cc: stable@vger.kernel.org
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20221023143328.160866-2-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-07 11:11:51 +01:00
..
jz4740-i2s.c ASoC: jz4740-i2s: Handle independent FIFO flush bits 2023-01-07 11:11:51 +01:00
jz4740-i2s.h ASoc: Fix unused define in jz4740-i2s.h 2021-05-10 13:05:36 +01:00
Kconfig ASoC: jz4740-i2s: Remove Open Firmware dependency 2022-07-07 12:23:42 +01:00
Makefile ASoC: jz4740: Drop lb60 board code 2019-07-30 10:41:53 -07:00