ASoC: fsl_ssi: Fix channel slipping on capture (or playback) restart in full duplex.
authorArnaud Mouiche <arnaud.mouiche@invoxia.com>
Tue, 3 May 2016 12:14:00 +0000 (14:14 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 13 May 2016 11:15:31 +0000 (12:15 +0100)
commit027db2e122db81b055a2b569d72f2f1d29c4d007
tree924ec6c33029c17eebbc19a562613a6975846dbe
parent61fcf10a0ee44763e0347b297a377137f8950772
ASoC: fsl_ssi: Fix channel slipping on capture (or playback) restart in full duplex.

Happened when the Playback (or Capture) is running continuously
and Capture (or Playback) is restarted (xrun, manual stop/start...)

Since the RX (or TX) FIFO are only reset when the whole SSI is disabled,
pending samples from previous capture (or playback) session may still
be present. They must be erased to not introduce channel slipping.

FIFO Clear register fields are documented in IMX51, IMX35 reference manual.
They are not documented in IMX50 or IMX6 RM, despite they are
working as expected on IMX6SL and IMX6solo.

Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Caleb Crome <caleb@crome.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c