Skip to content

[BUG] Pipelines with SRC component work only when converting from lower to higher sampling rates #1632

Closed

Description

@zrombel

Describe the bug
Pipelines with SRC component work only when converting from lower to higher sampling rates. For example if playback pipeline with SRC component is created, host side sampling rate is 16kHz and DAI side sampling rate is 48kHz pipeline works as expected. When host side sampling rate is 48kHz and DAI side sampling rate is 16kHz pipe line fail to copy data.

This bug is caused of incorrect propagation of frames_per_sched parameter trough components in pipelines.

PR 842 #842 is resolving this issue and should be included on master branch.

To Reproduce
Create playback pipeline containing SRC component with source sampling rate = 48000 and sink sampling rage 16000.

Reproduction Rate
Always

Found
SOF FW branch: master, commit: 09b416b and earlier.

Activity

  1. added
    bugSomething isn't working as expected
    on Jul 12, 2019
  2. tlauda commented on Oct 2, 2019

    @tlauda
    Contributor

    @zrombel Please verify with master.

  3. singalsu commented on Oct 7, 2019

    @singalsu
    Collaborator

    @zrombel @lgirdwood Thanks for reporting, I'll check this.

  4. tlauda commented on Oct 10, 2019

    @tlauda
    Contributor

    @singalsu I think it is fixed. There is #842 mentioned in bug description and it's already merged, so I think we're good.

  5. singalsu commented on Oct 14, 2019

    @singalsu
    Collaborator

    @tlauda I'm having problems to replicate this. I've set up for testing capture SRC pipelines for both 48 kHz and 16 kHz DMIC DAI. Capture 48 -> 48 kHz via SRC works but e.g. 48 -> 16 kHz doesn't. It's maybe the reported issue. Capture for 16 ->16 kHz, 16 -> 32 kHz, works OK.

    In module src.c line 589 "params->rate = cd->source_rate;" looks suspicious. I think it should be instead "params->rate = cd->sink_rate;" for any topology. But changing it does not fix the FW crash that I get.

    The stack dump suggests that the crash happens at dma_single_chan_domain_set().

  6. tlauda commented on Oct 14, 2019

    @tlauda
    Contributor

    @singalsu What is the pipeline and FW commit you are using and getting crash?

  7. singalsu commented on Oct 14, 2019

    @singalsu
    Collaborator

    I'm using git master fetched today with a custom topology. We don't have in git any capture SRC topologies.

  8. tlauda commented on Oct 14, 2019

    @tlauda
    Contributor

    @singalsu Can you describe how does the pipeline look like and what are the params? I would like to reproduce it on my end.

  9. singalsu commented on Oct 14, 2019

    @singalsu
    Collaborator

    I need to clean up for you a topology to test with. I'll email it tomorrow.

    I'm currently using patched bxt pcm512x machine driver to introduce the DMIC BEs. The topology contains one playback SRC and two capture SRCs. To avoid the complexity I'll make a simple nocodec machine driver topology with single SRC capture pipe.

  10. tlauda commented on Oct 16, 2019

    @tlauda
    Contributor

    Should be fixed with #1947 and #1952.

  11. singalsu commented on Oct 16, 2019

    @singalsu
    Collaborator

    @tlauda Thanks! I'll test the combination of those.

  12. singalsu commented on Oct 16, 2019

    @singalsu
    Collaborator

    Should be fixed with #1947 and #1952.

    Yep, I'm happy to confirm that these both applied fix the SRC related problems!

  13. jdrzaszcz commented on Oct 18, 2019

    @jdrzaszcz

    Checked on slim driver with master commit (81cc31b) and src component works on playback and capture pipeline. With both conversion from lower to higher sampling rates and higher to lower.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions