diff options
author | Guneshwor Singh <guneshwor.o.singh@intel.com> | 2016-02-03 13:29:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-04 12:36:14 +0100 |
commit | ee564d489cc47b1b6043bbe7e95464306d112cf5 (patch) | |
tree | ba6a341b9bacc18b230fd35de7c42a9ba1c0e2ee /sound | |
parent | ASoC: Intel: Skylake: Fix the memory overwrite of tlv buffer (diff) | |
download | linux-ee564d489cc47b1b6043bbe7e95464306d112cf5.tar.xz linux-ee564d489cc47b1b6043bbe7e95464306d112cf5.zip |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index b89ae6f7c096..f9297dc4b25f 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -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, |