Skip to content

[BUG][playback] Underrun after pause-release on HDA Link pipelines #1160

Closed

Description

@tlauda

There is a random underrun after pause-release sequence done on HDA Link pipelines. Repro rate is under 5%. It shows up during CI tests. It looks like Link DMA doesn't copy anything after release, so DSP has no free space for copying data from buffer.
There are two possibilities that we could check:

  1. See if the right Link DMA is started by kernel after release. I remember that we've already had such problem before.
  2. Fix sequence of pausing/stopping the pipelines. Kernel should first send pause/stop ipc to the FW and only then deassert stream RUN bit. Doing it other way around can potentially lead to incrementing Gateway FPI by the DSP, when RUN bit is already 0 and such behavior can have undefined consequences.

Activity

  1. added
    CNLApplies to Cannonlake
    APLApplies to ApolloLake platform
    on Aug 26, 2019
  2. tlauda commented on Aug 27, 2019

    @tlauda
    Author

    @mengdonglin @wenqingfu Could you assign someone to this issue? It's randomly failing CI.

  3. mengdonglin commented on Sep 9, 2019

    @mengdonglin

    Xiuli is fixing PCM STOP sequence in #1169

    But we still need to fix PCM PAUSE sequence for the rendering pipeline here , please see comment: #1169 (comment)

  4. changed the title [-][BUG] Underrun after pause-release on HDA Link pipelines[/-] [+][BUG][playback] Underrun after pause-release on HDA Link pipelines[/+] on Sep 9, 2019
  5. mengdonglin commented on Sep 9, 2019

    @mengdonglin

    Pause/release problem on capture is a different issue and tracked by thesofproject/sof#1760

  6. ranj063 commented on Sep 16, 2019

    @ranj063
    Collaborator

    But we still need to fix PCM PAUSE sequence for the rendering pipeline here , please see comment: #1169 (comment)

    @mengdonglin PR #1169 addresses both the STOP and the PAUSE sequence. And I am having a very hard time reproducing this issue with that PR. Could we have a stress test run with this PR to make sure this is still reproducible?

  7. 12 remaining items

  8. ranj063 commented on Oct 2, 2019

    @ranj063
    Collaborator

    @tlauda there's no changes in my kernel. What I meant was that I am able to hit this issue on APL with or without the kernel PR #1169 which switches the order in which the IPC is sent and the DMA is stopped/started.

    I just tried the FW PR 1891 and still hit the issue as well.

  9. ranj063 commented on Oct 3, 2019

    @ranj063
    Collaborator

    @tlauda I am in the process of implementing the nocodec support for link DMA and I had a couple of questions for you:

    1. Just like we have the nocodec support for SSP, does it make sense to do the same for Link DMA?
    2. If so, the idea is to not initialize the i915 and probe the codecs. Is it just enough if I have pick a Link DMA stream tag and start the stream for such a mode to work?
  10. tlauda commented on Oct 3, 2019

    @tlauda
    Author

    @ranj063 Change in stop sequence was also needed, but it doesn't fix this particular problem. We also have a problem with start sequence. You cannot start pipeline in FW and start Link DMA after that. It needs to be the other way around. Could you try to make such change in kernel and see if you still see the issue?
    As for nocodec mode, I don't think it's going to work. There needs to be something, that will consume the data from the link. Without the codec I think that DSP will see full buffer gateway all the time and it'll end up in overrun.

  11. ranj063 commented on Oct 3, 2019

    @ranj063
    Collaborator

    @ranj063 Change in stop sequence was also needed, but it doesn't fix this particular problem. We also have a problem with start sequence. You cannot start pipeline in FW and start Link DMA after that. It needs to be the other way around. Could you try to make such change in kernel and see if you still see the issue?
    As for nocodec mode, I don't think it's going to work. There needs to be something, that will consume the data from the link. Without the codec I think that DSP will see full buffer gateway all the time and it'll end up in overrun.

    @ranj063 Change in stop sequence was also needed, but it doesn't fix this particular problem. We also have a problem with start sequence. You cannot start pipeline in FW and start Link DMA after that. It needs to be the other way around. Could you try to make such change in kernel and see if you still see the issue?

    @tlauda the START/RELEASE sequence in the kernel already does start Link DMA and then send the START IPC.

  12. ranj063 commented on Oct 3, 2019

    @ranj063
    Collaborator

    As for nocodec mode, I don't think it's going to work. There needs to be something, that will consume the data from the link. Without the codec I think that DSP will see full buffer gateway all the time and it'll end up in overrun.

    @tlauda are you sure about this? @plbossart suggested that this should work even if there is no codec to consume the data.

  13. plbossart commented on Oct 4, 2019

    @plbossart
    Member
  14. added
    P2Critical bugs or normal features
    on Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APLApplies to ApolloLake platformCNLApplies to CannonlakeP2Critical bugs or normal featuresbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions