]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Intel: Skylake: Fix delay wrap condition
authorGuneshwor Singh <guneshwor.o.singh@intel.com>
Wed, 3 Feb 2016 12:29:45 +0000 (17:59 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 4 Feb 2016 11:36:14 +0000 (11:36 +0000)
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@intel.com>
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-pcm.c

index b89ae6f7c096125b92f1170f0e557b8df7f6ad35..f9297dc4b25f2106ffff4f9707384fea4489d240 100644 (file)
@@ -829,6 +829,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,