ASoC: SOF: ipc4-pcm: Enable delay reporting for ChainDMA streams
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 19 Jun 2025 10:28:48 +0000 (13:28 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 19 Jun 2025 23:21:19 +0000 (00:21 +0100)
commita1d203d390e04798ccc1c3c06019cd4411885d6d
tree5e21fc0ede7c344d38093f764933849b1eeb4e90
parentce4b269c26ac3216da44ef7699ee61791e6fcbc7
ASoC: SOF: ipc4-pcm: Enable delay reporting for ChainDMA streams

All streams (currently) which is configured to use ChainDMA can only work
on Link/host DMA pairs where the link side position can be access via host
registers (like HDA on CAVS 2.5 platforms).

Since the firmware does not provide time_info for ChainDMA, unlike for HDA
stream, the kernel should calculate the start and end offsets that is
needed for the delay calculation.

With this small change we can report accurate delays when the stream is
configured to use ChainDMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619102848.12389-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-pcm.c
sound/soc/sof/ipc4-topology.c
sound/soc/sof/ipc4-topology.h