]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SOF: ipc4-pcm: fix delay calculation when DSP resamples
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Thu, 2 Oct 2025 07:47:15 +0000 (10:47 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 2 Oct 2025 12:31:43 +0000 (13:31 +0100)
commitbcd1383516bb5a6f72b2d1e7f7ad42c4a14837d1
tree65a3e179726712cce793a8a5e186136d96fc57bc
parent59abe7bc7e7c70e9066b3e46874d1b7e6a13de14
ASoC: SOF: ipc4-pcm: fix delay calculation when DSP resamples

When the sampling rates going in (host) and out (dai) from the DSP
are different, the IPC4 delay reporting does not work correctly.
Add support for this case by scaling the all raw position values to
a common timebase before calculating real-time delay for the PCM.

Cc: stable@vger.kernel.org
Fixes: 0ea06680dfcb ("ASoC: SOF: ipc4-pcm: Correct the delay calculation")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251002074719.2084-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-pcm.c