Skip to content

ASoC: SOF: ipc4/Intel: Fix delay reporting (for 6.9 / 6.8)

Peter Ujfalusi linux-sound stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17ASoC: SOF: Add dsp_max_burst_size_in_ms member to snd_sof_pcm_streamsound/soc/sof/sof-audio.h+1 -00 replies
2/17ASoC: SOF: ipc4-topology: Save the DMA maximum burst size for PCMssound/soc/sof/ipc4-topology.c+21 -10 replies
3/17ASoC: SOF: Intel: hda-pcm: Use dsp_max_burst_size_in_ms to place constraintsound/soc/sof/intel/hda-pcm.c+21 -00 replies
4/17ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link Position)sound/soc/sof/intel/hda-common-ops.c sound/soc/sof/intel/hda-stream.c sound/soc/sof/intel/hda.h+37 -00 replies
5/17ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position callbacksound/soc/sof/intel/lnl.c sound/soc/sof/intel/mtl.c sound/soc/sof/intel/mtl.h+0 -260 replies
6/17ASoC: SOF: Introduce a new callback pair to be used for PCM delay reportingsound/soc/sof/ops.h sound/soc/sof/sof-priv.h+45 -00 replies
7/17ASoC: SOF: Intel: Set the dai/host get frame/byte counter callbackssound/soc/sof/intel/hda-common-ops.c sound/soc/sof/intel/hda-stream.c sound/soc/sof/intel/hda.h+36 -00 replies
8/17ASoC: SOF: ipc4-pcm: Use the snd_sof_pcm_get_dai_frame_counter() for pcm_delaysound/soc/sof/ipc4-pcm.c+4 -30 replies
9/17ASoC: SOF: Intel: hda-common-ops: Do not set the get_stream_position callbacksound/soc/sof/intel/hda-common-ops.c+0 -10 replies
10/17ASoC: SOF: Remove the get_stream_position callbacksound/soc/sof/ops.h sound/soc/sof/sof-priv.h+0 -190 replies
11/17ASoC: SOF: ipc4-pcm: Move struct sof_ipc4_timestamp_info definition locallysound/soc/sof/ipc4-pcm.c sound/soc/sof/ipc4-priv.h+14 -140 replies
12/17ASoC: SOF: ipc4-pcm: Combine the SOF_IPC4_PIPE_PAUSED cases in pcm_triggersound/soc/sof/ipc4-pcm.c+1 -30 replies
13/17ASoC: SOF: ipc4-pcm: Invalidate the stream_start_offset in PAUSED statesound/soc/sof/ipc4-pcm.c+12 -10 replies
14/17ASoC: SOF: sof-pcm: Add pointer callback to sof_ipc_pcm_opssound/soc/sof/pcm.c sound/soc/sof/sof-audio.h+15 -10 replies
15/17ASoC: SOF: ipc4-pcm: Correct the delay calculationsound/soc/sof/ipc4-pcm.c+127 -320 replies
16/17ALSA: hda: Add pplcllpl/u members to hdac_ext_streaminclude/sound/hdaudio_ext.h+3 -00 replies
17/17ASoC: SOF: Intel: hda: Compensate LLP in case it is not resetsound/soc/sof/intel/hda-dai-ops.c sound/soc/sof/intel/hda-pcm.c sound/soc/sof/intel/hda-stream.c+27 -10 replies

Reviews trailers per patch

All 17 patches have a Reviewed-by or Acked-by.

PatchKai VehmanenPierre-Louis BossartRander Wang
1/17R-b R-b
2/17R-b R-b
3/17R-b R-b
4/17R-b R-b
5/17R-b R-b
6/17R-b R-b
7/17R-b R-b
8/17R-b R-b
9/17R-b R-b
10/17R-b R-b
11/17R-b R-b
12/17R-b R-b
13/17R-b R-b
14/17R-b R-b
15/17R-b R-b
16/17R-b R-b
17/17R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/17] ASoC: SOF: ipc4/Intel: Fix delay reporting (for 6.9 / 6.8)

Hi,

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.

Mark, can you pick these patches for the 6.9 cycle as fixes?

Regards,
Peter
---
Peter Ujfalusi (17):
ASoC: SOF: Add dsp_max_burst_size_in_ms member to snd_sof_pcm_stream
ASoC: SOF: ipc4-topology: Save the DMA maximum burst size for PCMs
ASoC: SOF: Intel: hda-pcm: Use dsp_max_burst_size_in_ms to place
constraint
ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link
Position)
ASoC: SOF: Intel: mtl/lnl: Use the generic get_stream_position
callback
ASoC: SOF: Introduce a new callback pair to be used for PCM delay
reporting
ASoC: SOF: Intel: Set the dai/host get frame/byte counter callbacks
ASoC: SOF: ipc4-pcm: Use the snd_sof_pcm_get_dai_frame_counter() for
pcm_delay
ASoC: SOF: Intel: hda-common-ops: Do not set the get_stream_position
callback
ASoC: SOF: Remove the get_stream_position callback
ASoC: SOF: ipc4-pcm: Move struct sof_ipc4_timestamp_info definition
locally
ASoC: SOF: ipc4-pcm: Combine the SOF_IPC4_PIPE_PAUSED cases in
pcm_trigger
ASoC: SOF: ipc4-pcm: Invalidate the stream_start_offset in PAUSED
state
ASoC: SOF: sof-pcm: Add pointer callback to sof_ipc_pcm_ops
ASoC: SOF: ipc4-pcm: Correct the delay calculation
ALSA: hda: Add pplcllpl/u members to hdac_ext_stream
ASoC: SOF: Intel: hda: Compensate LLP in case it is not reset

 include/sound/hdaudio_ext.h          |   3 +
 sound/soc/sof/intel/hda-common-ops.c |   3 +
 sound/soc/sof/intel/hda-dai-ops.c    |  11 ++
 sound/soc/sof/intel/hda-pcm.c        |  29 ++++
 sound/soc/sof/intel/hda-stream.c     |  70 ++++++++++
 sound/soc/sof/intel/hda.h            |   6 +
 sound/soc/sof/intel/lnl.c            |   2 -
 sound/soc/sof/intel/mtl.c            |  14 --
 sound/soc/sof/intel/mtl.h            |  10 --
 sound/soc/sof/ipc4-pcm.c             | 191 ++++++++++++++++++++++-----
 sound/soc/sof/ipc4-priv.h            |  14 --
 sound/soc/sof/ipc4-topology.c        |  22 ++-
 sound/soc/sof/ops.h                  |  24 +++-
 sound/soc/sof/pcm.c                  |   8 ++
 sound/soc/sof/sof-audio.h            |   9 +-
 sound/soc/sof/sof-priv.h             |  24 +++-
 16 files changed, 351 insertions(+), 89 deletions(-)
Signature · 1 line
2.44.0