• Mark Brown's avatar
    ASoC: Check progress when reporting periods from i.MX FIQ handler · b4e82b5b
    Mark Brown authored
    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>
    b4e82b5b
imx-pcm-fiq.c 7.15 KB