Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction

The firmware does not provide any information for capture streams via the
shared pipeline registers.

To avoid reporting invalid delay value for capture streams to user space
we need to disable it.

Fixes: af74dbd0dbcf ("ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature")
Cc: stable@vger.kernel.org
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>
Link: https://patch.msgid.link/20250509085951.15696-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Peter Ujfalusi and committed by
Mark Brown
98db16f3 4d14b106

+2 -1
+2 -1
sound/soc/sof/ipc4-pcm.c
··· 798 798 799 799 spcm->stream[stream].private = stream_priv; 800 800 801 - if (!support_info) 801 + /* Delay reporting is only supported on playback */ 802 + if (!support_info || stream == SNDRV_PCM_STREAM_CAPTURE) 802 803 continue; 803 804 804 805 time_info = kzalloc(sizeof(*time_info), GFP_KERNEL);