Skip to content

IPC4 delay reporting is not working if DSP pipelne has a SRC/resampler #5498

Closed

Description

@kv2019i

When DSP pipelines have a SRC (like the SOF nocodec topology since commit 2a7a94d238a117946acc25607ad0978ea4923d9e by @singalsu ), the IPC4 delay reporting is not working correctly in SOF Linux driver.

This was originally discovered by runnign alsa_conformance_test on SOF nocodec topology's PCM2 (that has the SRCs).

Alternatively, observing the PCM runtime status during e.g.

aplay -Dhw:0,2 -r 96000 -c 2 -f s16_le -traw /dev/zero -vv

... shows PCM delay to continuously increase.

Tested with SOF FW and Linux of 2025-07-30.

Activity

  1. self-assigned this
    on Jul 30, 2025
  2. kv2019i commented on Jul 30, 2025

    @kv2019i
    CollaboratorAuthor

    With current sof-dev mainline kernel+FW, running conformance test on sofnocodec,2 (the one with the SRCs in DSP pipeline)

    $ alsa_conformance_test.py -P hw:sofnocodec,2 --avail-delay

    gives lots of errors like this:

    INFO:root:Execute command: alsa_conformance_test -P hw:sofnocodec,2 -d 1 -r 8000 -B 40 -c 2 -f S16_LE -p 40 --avail-delay
    INFO:root:Set rate 8000
    INFO:root:fail - Expected rate is 8000, measure 8.443636901867766e+16, difference 8.443636901866966e+16 > threshold 0.8
    INFO:root:Execute command: alsa_conformance_test -P hw:sofnocodec,2 -d 1 -r 11025 -B 55 -c 2 -f S16_LE -p 55 --avail-delay
    INFO:root:Set rate 11025
    INFO:root:fail - Expected rate is 11025, measure 1.689902907257662e+17, difference 1.6899029072575517e+17 > threshold 1.1025
    INFO:root:Execute command: alsa_conformance_test -P hw:sofnocodec,2 -d 1 -r 16000 -B 80 -c 2 -f S16_LE -p 80 --avail-delay
    INFO:root:Set rate 16000
    INFO:root:fail - Expected rate is 16000, measure 2.5280888746798378e+17, difference 2.5280888746796778e+17 > threshold 1.6
    INFO:root:Execute command: alsa_conformance_test -P hw:sofnocodec,2 -d 1 -r 22050 -B 110 -c 2 -f S16_LE -p 110 --avail-delay

    With overall results:
    "21 passed, 44 failed"

    With #5499 , same test now passes all but one case. There is still an issue with the estimated playback position (estimated = combining pcm_avail with the reported PCM delay ) goes backwards by a few frames at times. This seems to only happen with the SRC pipelines, but I've not been able to rootcause this yet and thus #5499 is still as a draft.

  3. kv2019i commented on Aug 28, 2025

    @kv2019i
    CollaboratorAuthor

    Closed via #5499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions