Skip to content

[BUG]xrun and ipc timeout in multiple-pause-resume on ADLP_RVP_NOCODEC #4372

Closed

Description

@XiaoyunWu6666

Describe the bug
xrun happens and ipc timed out when PCM_PARAMS
in inner daily ADL 4679

To Reproduce
TPLG=sof-tgl-nocodec-ci.tplg ~/sof-test/test-case/multiple-pause-resume.sh -r 25

Reproduction Rate
almost 100% with inner daily ADL 4679 recipe

Environment
Kernel Branch: topic/sof-dev
Kernel Commit: 56ab165b
SOF Branch: main
SOF Commit:fdcf636530f5
Topology:sof-tgl-nocodec-ci.tplg
Platform:8 ADLP_RVP_NOCODEC

Screenshots or console output
[console]

aplay: pcm_write:2061: write error: Input/output error

#+                                                 | 00%
=== PAUSE ===                                                            
(6/25) pcm'DMIC16kHz' cmd'arecord' id'7': Wait for 111 ms before pause

(6/25) pcm'DMIC16kHz' cmd'arecord' id'7': Wait for 179 ms before resume
  error: in logger_read(), fread(..., /sys/kernel/debug/sof/trace) failed: Operation not permitted(-1)
arecord: do_pause:1545: pause push error: Connection timed out

[etrace]

[   395301920.229613] (     3884852.000000) c3 dw-dma                 src/drivers/dw/dma.c:1102 ERROR dw_dma_get_data_size(): xrun detected
[   395301937.990029] (          17.760416) c3 dai          3.16           src/audio/dai.c:886  ERROR dai_report_xrun(): underrun due to no data available
[   395301955.125445] (          17.135416) c3 dai          3.16           src/audio/dai.c:661  ERROR comp_underrun(): dev->comp.id = 16, source->avail = 192, copy_bytes = 0
[   395302070.281690] (         115.156242) c3 pipe         3.17  ....../pipeline-stream.c:168  ERROR pipeline_copy(): ret = -61, start->comp.id = 16, dir = 1
[   395302089.396273] (          19.114582) c3 pipe         3.17  ..../pipeline-schedule.c:63   ERROR pipeline_task(): xrun recover failed! pipeline will be stopped!
[   395313177.156249] (       11087.759766) c2 dmic-dai     2.0   src/drivers/intel/dmic.c:1557 ERROR dmic_irq_handler(): full fifo B or PDM overrun

Activity

  1. added
    ADLApplies to Alder Lake platform
    I2SApplies to I2S bus for codec connection
    on Jun 22, 2021
  2. added
    P1Blocker bugs or important features
    TGLApplies to Tiger Lake
    on Jun 22, 2021
  3. keyonjie commented on Jun 22, 2021

    @keyonjie
    Contributor

    This happens on TGL also, according to today's daily 4778

  4. keyonjie commented on Jun 22, 2021

    @keyonjie
    Contributor

    It works with 1.8, looks like a regression.

  5. changed the title [-][BUG][ADL]xrun and ipc timeout in multiple-pause-resume on ADLP_RVP_NOCODEC[/-] [+][BUG]xrun and ipc timeout in multiple-pause-resume on TGLU_RVP_NOCODEC / ADLP_RVP_NOCODEC[/+] on Jun 24, 2021
  6. added
    TGLApplies to Tiger Lake
    and removed
    TGLApplies to Tiger Lake
    on Jun 24, 2021
  7. lgirdwood commented on Jun 30, 2021

    @lgirdwood
    Member
    [   395302089.396273] (          19.114582) c3 pipe         3.17  ..../pipeline-schedule.c:63   ERROR pipeline_task(): xrun recover failed! pipeline will be stopped!
    [   395313177.156249] (       11087.759766) c2 dmic-dai     2.0   src/drivers/intel/dmic.c:1557 ERROR dmic_irq_handler(): full fifo B or PDM overrun

    @keyonjie @kv2019i Are we sure we are masking/clearing the DMIC IRQ ? as we are getting an IPC timout here and AFAICT not a crash (i.e. are we spinning in DMIC IRQ) ?

  8. kv2019i commented on Jun 30, 2021

    @kv2019i
    Collaborator

    @keyonjie @lgirdwood Given this does not happen on 1.8 and happens on multicore tplg, I wonder if it's related to this dmic commit "Drivers: Intel: DMIC: Run dmic_work() in the same core as other driver". The fix this does seems correct and I'd actually expect the reverse result, but given the results, this could be related. I could not reproduce this locally yet. Bisect is probably the best option here and this dmic patch is a good starting point.

    @lgirdwood we do stop the fifo packers in the IRQ, so we should not be getting floods anymore (and even if we did, this should show up in the log).

  9. lgirdwood commented on Jul 6, 2021

    @lgirdwood
    Member

    @singalsu any comment here ? Can the DMIC work be "EDF" work ?

  10. changed the title [-][BUG]xrun and ipc timeout in multiple-pause-resume on TGLU_RVP_NOCODEC / ADLP_RVP_NOCODEC[/-] [+][BUG]xrun and ipc timeout in multiple-pause-resume on ADLP_RVP_NOCODEC[/+] on Jul 7, 2021
  11. XiaoyunWu6666 commented on Jul 7, 2021

    @XiaoyunWu6666
    ContributorAuthor

    I guess this is related to multicore and we only test multicore with sof-tgl-nocodec-ci.tplg on ADLP_RVP_NOCODEC ,right , so I remove TGL from the title and the label @keyonjie @keqiaozhang thanks

  12. singalsu commented on Jul 21, 2021

    @singalsu
    Collaborator

    @singalsu any comment here ? Can the DMIC work be "EDF" work ?

    @lgirdwood Sorry for slow response, I missed this. The scheduling of dmic work is not critical. The execution of HW gain updates do not need to be in exact grid, some jitter is allowed. I don't think it would make the zipper noise from gain updates audible. Also if a 200 ms ramp is 200 +/- 5 ms something or maybe even +/- 10 ms it does not impact use cases. I can test this, how is the work type changed?

  13. singalsu commented on Jul 21, 2021

    @singalsu
    Collaborator

    @lgirdwood @RanderWang We could eliminate HW gain ramping in dmic driver if we could ensure there's always volume component in the capture pipeline that could do the unmute ramp. The logaritmic ramp type would need to be added to volume. In DMIC NHLT patch I've replaced the topology defined ramp duration with hard-coded sample rate dependent ramp. It's not nice but currently there's no other way since IPC4 for DMIC does not contain unmute ramp information. So, combined this issue and IPC4 could be a justification to implement the unmute ramp in volume with pipeline like DMIC -> volume -> IIR -> host. The DMIC umute sequence without ramp would take only 3 dmic_work() calls. It could also be scheduled at lower rate.

  14. lgirdwood commented on Jul 21, 2021

    @lgirdwood
    Member

    @singalsu can the unmute ramp steps be part of the copy() callback. e.g. every copy() increment the volume ?

  15. added
    P2Critical bugs or normal features
    and removed
    P1Blocker bugs or important features
    on Aug 3, 2021
  16. XiaoyunWu6666 commented on Aug 3, 2021

    @XiaoyunWu6666
    ContributorAuthor

    did not see this in CI daily tests , was there any possible solutions that has solved it?
    I lower the priority , shall we close it?

  17. lgirdwood commented on Aug 3, 2021

    @lgirdwood
    Member

    Lets monitor and close if not reproducing over next few days.

  18. keqiaozhang commented on Dec 13, 2021

    @keqiaozhang
    Collaborator

    Confirmed that this issue is fixed with latest main and stable v2.0 branch.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ADLApplies to Alder Lake platformI2SApplies to I2S bus for codec connectionP2Critical bugs or normal featuresTGLApplies to Tiger LakebugSomething isn't working as expectedmulticoreIssues observed when not only core#0 is used.stress CI multicore tplgUsing stressful multicore CI topology sof-tgl-nocodec-ci.m4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions