ASoC: mediatek: Use current HW pointer for pointer callback
authorKoro Chen <koro.chen@mediatek.com>
Thu, 3 Dec 2015 07:53:28 +0000 (15:53 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 8 Dec 2015 17:06:45 +0000 (17:06 +0000)
commit8d6f88ce961cf62137696627448cfd6038f07f41
treeba8aca5a3f6ad907cea24811bfe0515860ebef51
parentb45e68df065a9babc43b4b7cd223c412d34b6658
ASoC: mediatek: Use current HW pointer for pointer callback

Previously we recorded "last interrupt position" and used it in
pointer callback. This is not correct implementation, and it causes
underruns when user space monitors buffer level to decide when to
send next data chunk in low latency application.

Remove position recording in IRQ handler and also hw_ptr in
struct mtk_afe_memif used to record that, and let pointer callback
reports current HW pointer instead.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mtk-afe-common.h
sound/soc/mediatek/mtk-afe-pcm.c