[alsa-devel] [PATCH 02/11] ASoC: Intel: Skylake: Fix delay wrap condition

Vinod Koul vinod.koul at intel.com
Wed Feb 3 13:29:45 CET 2016


From: Guneshwor Singh <guneshwor.o.singh at intel.com>

When delay reported by HW is equal to buffersize, it means the
value is wrapped so we should report as 0. So add the condition
to check this while reporting the delay from LPIB.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh at intel.com>
Signed-off-by: Dharageswari.R <dharageswari.r at intel.com>
Signed-off-by: Vinod Koul <vinod.koul at intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index f3553258091a..b6e6b61d10ec 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -863,6 +863,7 @@ static int skl_get_delay_from_lpib(struct hdac_ext_bus *ebus,
 		else
 			delay += hstream->bufsize;
 	}
+	delay = (hstream->bufsize == delay) ? 0 : delay;
 
 	if (delay >= hstream->period_bytes) {
 		dev_info(bus->dev,
-- 
1.9.1



More information about the Alsa-devel mailing list