Skip to content

[BUG] distortion during playback on MTL-NOCODEC #6837

Closed

Description

@keqiaozhang

Describe the bug
we observed the waveform distortion on MTL-NOCODEC, we have a similar issue SOF#6727 on mtl-stable-002, but it has been fixed on 002 branch, so let's use this bug to track the distortion issue on main branch.

image

To Reproduce
~/sof-test/test-case/check-alsabat.sh -p hw:sofnocodec,0 -c hw:sofnocodec,0 -C 2

Reproduction Rate
100%

Environment
Kernel Branch: topic/sof-dev
Kernel Commit:
c41b1735d3da
SOF Branch: main
SOF Commit:
e6f72dee8289
Platform: MTL-NOCODEC

bat.wav.3Vbz0k.zip

Activity

  1. added
    bugSomething isn't working as expected
    P1Blocker bugs or important features
    MTLApplies to Meteor Lake platform
    on Dec 19, 2022
  2. lgirdwood commented on Dec 19, 2022

    @lgirdwood
    Member

    Looks like we are missing a fix from mtl-002 @mwasko ?

  3. juimonen commented on Jan 31, 2023

    @juimonen

    This is because of missing link clock setting in mtl/ace platforms in ssp driver.

    mtl 003 branch has a hard coded quick fix for "link clock", but that is not in sof main.

    "non hard coded" fix is coming from:
    zephyrproject-rtos/zephyr#53297

    after this, there also needs to be a topology change for mtl to configure/set the link clock.

  4. added this to the v2.5 milestone on Feb 1, 2023
  5. wszypelt commented on Feb 6, 2023

    @wszypelt

    Reproduction test under implementation

  6. keqiaozhang commented on Feb 22, 2023

    @keqiaozhang
    CollaboratorAuthor

    This issue still exists in CI.
    image

  7. lgirdwood commented on Feb 22, 2023

    @lgirdwood
    Member

    ok, looks like we could still be missing a MTL branch patch in main @mwasko fyi.

  8. juimonen commented on Mar 7, 2023

    @juimonen

    So we seem to have 2 overlapping bugs here:

    1. link clock setting in mtl (this should not cause choppiness, but will amplify it)
    1. even without anything link clock related we have the choppiness:
  9. fredoh9 commented on Mar 10, 2023

    @fredoh9
    Contributor

    I tested with mtl-004(2eec99b). alsabat test failed there also but waveforms are totally different. @abonislawski Do we miss any patch on main branch? Upper one is mtl-004, lower one is main branch(85367b7).

    alsabat_failure_mtl-0004 vs main

    alsabat_wav_capture.zip

  10. abonislawski commented on Mar 11, 2023

    @abonislawski
    Member

    @fredoh9 I assume you didnt use new topology patch from Jaska in main-branch test?

    On mtl-004 it will still work with old topology but this additional commit is not intended for main branch. On main-branch new topology (Jaska PR) is required, it should work the same but not sure if this solution is already fully verified

  11. fredoh9 commented on Mar 11, 2023

    @fredoh9
    Contributor

    You mean this one, #7060 ? I will take a look and check with it also.

  12. kv2019i commented on Mar 13, 2023

    @kv2019i
    Collaborator

    MTL only, moving to v2.6 milestone.

  13. modified the milestones: v2.5, v2.6 on Mar 13, 2023
  14. keqiaozhang commented on Mar 20, 2023

    @keqiaozhang
    CollaboratorAuthor

    You mean this one, #7060 ? I will take a look and check with it also.

    I tried PR#7060 on MTL-NOCODEC, but it doesn't help.
    @fredoh9 , please help to double confirm it.

  15. kv2019i commented on Mar 21, 2023

    @kv2019i
    Collaborator

    #7060 is expected to help with the issue. @juimonen tested this with ok results, but the resulting audio file still has gaps related to smart-amp pipeline (potentially the remaining issue seen is #7285). Test with #7060 and without smart-amp, has not been done.

  16. plbossart commented on Mar 21, 2023

    @plbossart
    Member

    We really need the ability to take the SmartAmp out of the nocodec topology.
    Adding more features needs to come with the ability to come back to a less complex part.

  17. juimonen commented on Mar 21, 2023

    @juimonen

    yeah, tested today with #7060 in "jf mtl nocodec 3" device - and ssp0 (smart amp pipe) has these very rare gaps in the right channel (loopback feedback) and ssp1 is clean. so this needs to be divided into 2 issues 1. link clock setting, that #7060 fixes 2. smart amp gaps

  18. keqiaozhang commented on Mar 23, 2023

    @keqiaozhang
    CollaboratorAuthor

    Confirmed with #7060.
    Waveform is distorted at the beginning of both SSP0 channels.
    image

    There're also a lot of glitches in right channel of SSP0.
    image
    I will file a new bug after #7060 merged.

    These 2 problems are not reproduced on SSP2.

  19. lrudyX commented on Mar 24, 2023

    @lrudyX

    Close as original issue has been resolved. @keqiaozhang please create new ticket and provide IPC logs with payloads for FW reproduction.

  20. keqiaozhang commented on Apr 3, 2023

    @keqiaozhang
    CollaboratorAuthor

    #7060 is still under review, reopening this bug.

  21. keqiaozhang commented on Apr 3, 2023

    @keqiaozhang
    CollaboratorAuthor

    Verified this issue again with PR #7060, the result is same as before.
    At beginning:
    image
    Some glitches in the right channel:
    image

  22. ranj063 commented on Apr 4, 2023

    @ranj063
    Collaborator

    These are the replacements for #7060

    1. To set the blob version and set link clock source: topology2: ssp: Add blob version #7363
    2. To ignore the link clock_source for TGL: drivers: ssp: Ignore link clock_source for non-ACE platforms zephyrproject-rtos/zephyr#56497. This is optional if the blob version is set to 0x100 for TGL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

MTLApplies to Meteor Lake platformP1Blocker bugs or important featuresbugSomething isn't working as expected

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions