浏览代码

ASoC: Intel: Skylake: Fix delay wrap condition

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>
Guneshwor Singh 9 年之前
父节点
当前提交
ee564d489c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/soc/intel/skylake/skl-pcm.c

+ 1 - 0
sound/soc/intel/skylake/skl-pcm.c

@@ -829,6 +829,7 @@ static int skl_get_delay_from_lpib(struct hdac_ext_bus *ebus,
 		else
 		else
 			delay += hstream->bufsize;
 			delay += hstream->bufsize;
 	}
 	}
+	delay = (hstream->bufsize == delay) ? 0 : delay;
 
 
 	if (delay >= hstream->period_bytes) {
 	if (delay >= hstream->period_bytes) {
 		dev_info(bus->dev,
 		dev_info(bus->dev,