ASoC: SOF: ipc4/Intel: Fix delay reporting
authorMark Brown <broonie@kernel.org>
Tue, 26 Mar 2024 13:03:19 +0000 (13:03 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 26 Mar 2024 13:03:19 +0000 (13:03 +0000)
commit3849c4d6c6b3da898d92edafd5e2b0e2baaabb61
treef9cb9a8237cee5377c4909b71bd89715b7e387fa
parent56ebbd19c2989f7450341f581e2724a149d0f08e
parent1abc2642588e06f6180b3fbb21968cf5d0ba9e5f
ASoC: SOF: ipc4/Intel: Fix delay reporting

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The current version of delay reporting code can report incorrect
values when paired with a firmware which enables this feature.

Unfortunately there are several smaller issues that needed to be addressed
to correct the behavior:

Wrong information was used for the host side of counter
For MTL/LNL used incorrect (in a sense that it was verified only on MTL)
link side counter function.
The link side counter needs compensation logic if pause/resume is used.
The offset values were not refreshed from firmware.
Finally, not strictly connected, but the ALSA buffer size needs to be
constrained to avoid constant xrun from media players (like mpv)

The series applies cleanly for 6.9 and 6.8.y stable, but older stable
would need manual backport, but it is questionable if it is needed as
MTL/LNL is missing features.