From: Peter Ujfalusi Date: Fri, 9 May 2025 08:59:51 +0000 (+0300) Subject: ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction X-Git-Tag: v6.15~20^2~3^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98db16f314b3a0d6e5acd94708ea69751436467f;p=thirdparty%2Flinux.git 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 Reviewed-by: Bard Liao Reviewed-by: Liam Girdwood Link: https://patch.msgid.link/20250509085951.15696-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c index 1a2841899ff5a..c09b424ab863d 100644 --- a/sound/soc/sof/ipc4-pcm.c +++ b/sound/soc/sof/ipc4-pcm.c @@ -798,7 +798,8 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm spcm->stream[stream].private = stream_priv; - if (!support_info) + /* Delay reporting is only supported on playback */ + if (!support_info || stream == SNDRV_PCM_STREAM_CAPTURE) continue; time_info = kzalloc(sizeof(*time_info), GFP_KERNEL);