Skip to content
Commit b4e82b5b authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Check progress when reporting periods from i.MX FIQ handler



Currently the i.MX FIQ handler is reporting periods as elapsed based
purely on a timer running in the CPU. This means that any clock
mismatch between the CPU and the audio subsystem can result in the
status reported to applications drifting away from the actual status
of the hardware. This is particularly likely at present since the
SSI driver is only capable of operating in slave mode so it's very
likely that the interface will be clocked from a different source.

Instead check the offset reported by the FIQ and only notify when we
have transferred at least one period, re-firing the timer if we didn't
do so. Also factor out the calculation of the timer expiry time for
make it a bit easier to experiment with.

Note that this only improves the situation, problems can still be
triggered.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 9e4a10d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment