Skip to content

[BUG][alsabat] glitches happened on MTL-HDA when testing headset recording #7298

Description

@keqiaozhang

Describe the bug
I'm enabling alsabat test for headset recording and found some glitches on MTL-HDA. The reproduction rate is about 50% with all three test frequencies(599,821 and 997).

image

To Reproduce
~/sof-test/test-case/check-alsabat.sh -c hw:sofhdadsp,0 -p hw:CODEC,0 -C 2 -F 599
Need PR thesofproject/sof-test#1012

Reproduction Rate
50%

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: tip sof-dev
    • SOF: tip main
  2. Name of the topology file
    • Topology: sof-ace-tplg/sof-hda-generic-4ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: MTLP_RVP_HDA

Activity

  1. added
    bugSomething isn't working as expected
    HDAApplies to HD-Audio bus for codec connection
    MTLApplies to Meteor Lake platform
    on Mar 17, 2023
  2. lgirdwood commented on Mar 17, 2023

    @lgirdwood
    Member

    @keqiaozhang periodic issue with stream or just happens once in stream ? (if once when ?)

  3. added this to the v2.6 milestone on Mar 17, 2023
  4. keqiaozhang commented on Mar 20, 2023

    @keqiaozhang
    CollaboratorAuthor

    @keqiaozhang periodic issue with stream or just happens once in stream ? (if once when ?)

    From my observation, this is not a periodic issue, it only occurs at the beginning.

  5. lgirdwood commented on Mar 21, 2023

    @lgirdwood
    Member

    @keqiaozhang periodic issue with stream or just happens once in stream ? (if once when ?)

    From my observation, this is not a periodic issue, it only occurs at the beginning.

    @keqiaozhang Is the timing of the glitch from beginning always consistent ? @btian1 is copier clearing buffer at start ?

  6. keqiaozhang commented on Mar 22, 2023

    @keqiaozhang
    CollaboratorAuthor

    Is the timing of the glitch from beginning always consistent ?

    Yes, it's consistent and occurs within the first 1-2 milliseconds.
    image

  7. added
    P1Blocker bugs or important features
    on Mar 28, 2023
  8. juimonen commented on Mar 28, 2023

    @juimonen

    @keqiaozhang could you attach the mtrace also?

  9. lgirdwood commented on Mar 29, 2023

    @lgirdwood
    Member

    @singalsu fyi - your glitch dtetector should be able to emit output if glitch is in initial periods (i.e. trigger start/release) errors.

  10. singalsu commented on Mar 29, 2023

    @singalsu
    Collaborator

    @singalsu fyi - your glitch dtetector should be able to emit output if glitch is in initial periods (i.e. trigger start/release) errors.

    Currently it starts detect after stable signal level (waiting for ramp to complete) and analyze the FFTs after that. I would need to add a time domain glitch detector for the beginning part during ramp. The time domain is not as sensitive as FFT but it should work for glitches like this. I will try in next version for thesofproject/sof-test#1016

  11. lgirdwood commented on Mar 29, 2023

    @lgirdwood
    Member

    @singalsu fyi - your glitch dtetector should be able to emit output if glitch is in initial periods (i.e. trigger start/release) errors.

    Currently it starts detect after stable signal level (waiting for ramp to complete) and analyze the FFTs after that. I would need to add a time domain glitch detector for the beginning part during ramp. The time domain is not as sensitive as FFT but it should work for glitches like this. I will try in next version for thesofproject/sof-test#1016

    Thanks - this will save some triage time as these are two quite different bugs with different solutions when they occur.

  12. wszypelt commented on Mar 31, 2023

    @wszypelt

    @keqiaozhang can you share the logs with payloads IPC logs.

  13. 3 remaining items

  14. fredoh9 commented on Apr 13, 2023

    @fredoh9
    Contributor

    For today's daily test(planresultdetail/23512), sh-mtlp-rvp-hda-02 was used.

    • check-alsabat-headset-capture-599.sh : failed
    • check-alsabat-headset-capture-821.sh : pass
    • check-alsabat-headset-capture-997.sh : pass
  15. fredoh9 commented on Apr 14, 2023

    @fredoh9
    Contributor

    daily test(planresultdetail/23549), jf-mtlp-rvp-hda-2 was used,
    all 3 alsabat capture was passed

    • check-alsabat-headset-capture-599.sh : pass
    • check-alsabat-headset-capture-821.sh : pass
    • check-alsabat-headset-capture-997.sh : pass

    First of all, it might be possibly device specific now.
    2nd, do we have any fix for this merged already?

  16. fredoh9 commented on Apr 14, 2023

    @fredoh9
    Contributor

    today's daily test failed on sh-mtlp-rvp-hda-03.

    tested on sh-mtlp-rvp-hda-03 with same alsa settings with jf-mtlp-rvp-hda-2
    check-alsabat-headset-capture-599.sh failed 3 out of 5. not 100% failure. At least it's not alsa settings issue.

    Screenshot from 2023-04-14 13-24-39
    Screenshot from 2023-04-14 13-25-13
    bat_failed_sh-hda03.wav.gz

  17. fredoh9 commented on Apr 17, 2023

    @fredoh9
    Contributor

    For today's daily test(planresultdetail/23660), device is sh-mtlp-rvp-hda-04, 599Hz pass, 821/998Hz failed

  18. fredoh9 commented on Apr 18, 2023

    @fredoh9
    Contributor

    Yesterday @keqiaozhang checked on the device,

    It’s not a device configuration issue, there’re some distortions in the waveform. This issue also can be reproduced on other devices, the reproduction rate is about ~20%.

    mtlp_rvp_hda_alsabat_capture

  19. removed
    P1Blocker bugs or important features
    on Apr 20, 2023
  20. fredoh9 commented on Apr 20, 2023

    @fredoh9
    Contributor

    Removed P1 as some of devices have not reported the issue recently. The other devices (multiple) have ~20% failure rate though.

  21. fredoh9 commented on Apr 21, 2023

    @fredoh9
    Contributor

    After compiling test results of +1 week, we have 5 devices for this model.

    These two devices are solid pass for all,

    • jf-mtlp-rvp-hda-2.jf.intel.com
    • jf-mtlp-rvp-hda-3.jf.intel.com

    Below 3 has ~20% failure, I don't see any failure pattern,

    • sh-mtlp-rvp-hda-04.sh.intel.com
    • sh-mtlp-rvp-hda-02.sh.intel.com
    • sh-mtlp-rvp-hda-03.sh.intel.com
  22. keqiaozhang commented on Apr 24, 2023

    @keqiaozhang
    CollaboratorAuthor

    After compiling test results of +1 week, we have 5 devices for this model.

    Thanks Fred for debugging, I will try to figure it out.

  23. lgirdwood commented on Apr 25, 2023

    @lgirdwood
    Member

    @keqiaozhang @fredoh9 I wonder if it's the capture HW that has the glitch ? i.e. as the 2 DUTs that pass are a similar config to the DUTs that fail. Have you tried swapping capture/testing HW between DUTs ?

  24. modified the milestones: v2.6, v2.7 on May 10, 2023
  25. keqiaozhang commented on May 15, 2023

    @keqiaozhang
    CollaboratorAuthor

    Confirmed that this is a Hardware specific issue and only happens on SH DUTs. I'm debugging it.

  26. keqiaozhang commented on May 16, 2023

    @keqiaozhang
    CollaboratorAuthor

    Issue fixed after connecting the stereo USB sound card to other USB port on MB. It seems that using USB HUB to power up the stereo sound card is not very stable.

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

    HDAApplies to HD-Audio bus for codec connectionMTLApplies to Meteor Lake platformarea:alsa-batbugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions