Skip to content

[BUG] Audio playback gets heavily distorted after rapid pause/release on HDA analog output  #7478

Closed

Description

@ujfalusi

Describe the bug
While testing audio playback on hw:0,0 on UPX-i11 board I have checked pause/resume with aplay -i (holding key to rapid pause/resume) and after few seconds the audio playback got corrupted.
The playback continued normally, firmware reported no issues, but the audio is completely distorted, high pitched and garbled.

To Reproduce

aplay -iv -Dhw:0,0 file.wav (48K 16bit)

Sounds good, no distortion.
Now, press and HOLD the <SPACE> key to rapid pause/resume aplay.
After few seconds you can hear that the sound starts to be up-shifted pitched, now release and if it is paused, press it again to resume.
Audio is pitched up, distorted, garbled
Not affecting HDMI (ChainDMA).

The same issue present on DeepBuffer PCM (-Dhw:0,31)

Reproduction Rate
10/10

Expected behavior
audio is not distorted

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: topic/sof-dev or upstream linux-next
    • SOF: ebaa142
  2. Name of the topology file
    • Topology: sof-hda-generic.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: TGL (UPX-i11)

Screenshots or console output
nothing out of ordinary in logs, all looks error free.

Activity

  1. added
    bugSomething isn't working as expected
    TGLApplies to Tiger Lake
    IPC4Issues observed with IPC4 (same IPC as Windows)
    on Apr 20, 2023
  2. plbossart commented on Apr 20, 2023

    @plbossart
    Member

    Someone was talking about finding something to keep themselves busy yesterday @ujfalusi.

    Humm, wish granted, eh? wow, nice bug, this will be a tough one to crack.

  3. changed the title [-][BUG] Audio playback gets heavily distorted after rapid pause/resume on HDA analog output [/-] [+][BUG] Audio playback gets heavily distorted after rapid pause/release on HDA analog output [/+] on Apr 20, 2023
  4. ujfalusi commented on Apr 21, 2023

    @ujfalusi
    ContributorAuthor

    Update: it is not the rapid pause/resume, it can be a slow, pasue/resume, small wait, pause/resume.
    After the 10th or so iteration the audio starts to be distorted.

  5. ujfalusi commented on Apr 24, 2023

    @ujfalusi
    ContributorAuthor

    Update: it is not reproducible with the reference firmware.

  6. ujfalusi commented on Apr 24, 2023

    @ujfalusi
    ContributorAuthor

    this is the original tplg path:
    image
    I have tried with these variations:
    image image image
    all of them exhibiting the same issue, the last one (without gains) interestingly will reproduce it much faster (4th pause/resume sequence)

    With a bit of fiddling, with this topology it is working without issue:
    image image

    Pointing to mixin-mixout?

  7. abonislawski commented on Apr 25, 2023

    @abonislawski
    Member

    Pointing to mixin-mixout?

    Could be connected with mixin-out regression?
    #7072

  8. ujfalusi commented on Apr 25, 2023

    @ujfalusi
    ContributorAuthor

    I'm using GCC to build the firmware, I got an XCC built binary and that works OK, I cannot reproduce the issue

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

    IPC4Issues observed with IPC4 (same IPC as Windows)P2Critical bugs or normal featuresTGLApplies to Tiger LakebugSomething isn't working as expectedgccGCC build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions