Skip to content

[CNL] It takes more than 1 sec from aplay cmd to sound comes out #900

Closed

Description

@bardliao

Describe the bug
When we start to a playback from runtime suspended, the sound will come out after more than 1 sec. It can be 100% reproduced with headphone playback, but it is < 10% with speaker playback.

To Reproduce

  1. Wait until DSP is in runtime suspended.
  2. run aplay

Expected behavior
Sound comes out immediately after aplay cmd is executed.

Environment
sof-master: de5bba4
topic/soc-dev: 1071743
platform: CML laptop with ALC3204 codec, and CFL laptop with ALC3254 codec
Reproducibility Rate: 100% on headphone playback

dmesg
[ 24.648422] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 24.648460] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 25.148765] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 25.148793] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 26.942076] sof-audio-pci 0000:00:1f.3: pcm: open stream 0 dir 0
dmesg_latency_debug.txt

Activity

  1. added
    bugSomething isn't working
    CNLApplies to Cannonlake
    on May 6, 2019
  2. self-assigned this
    on May 6, 2019
  3. bardliao commented on May 6, 2019

    @bardliao
    CollaboratorAuthor

    The root cause is alc269_resume takes too much time.

  4. added
    CMLApplies to Comet Lake platform
    HDAApplies to HD-Audio bus for codec connection
    on May 7, 2019
  5. bardliao commented on May 7, 2019

    @bardliao
    CollaboratorAuthor

    We can see exactly the same issue on legacy HDA driver. It does headset type detection before playback and it takes time. So close it since it is not a SOF issue

  6. added
    won't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
    CFLApplies to Coffee Lake platform
    and removed
    CNLApplies to Cannonlake
    on May 7, 2019
  7. mengdonglin commented on May 7, 2019

    @mengdonglin

    @jason77-wang, please report this issue to codec vendor Realtek and ask Realtek to fix it. Thanks!

  8. mengdonglin commented on May 10, 2019

    @mengdonglin

    @KailangYang @jason77-wang

    I backup your conclusion here:
    "This issue was headset check type delay.
    Headset, resume init delay 217ms and headset check type delay for 960ms.
    So, 1.5s delay was make sense."

    "It is not a new issue, and it is not specific to SOF driver."

  9. KailangYang commented on May 10, 2019

    @KailangYang

    @mengdonglin @bardliao

    The reproduce steps are:

    1.  plug in headset but don’t select Audio device on the pop up menu.
      
    2.  run alsamixer and make sure the Input Source is Headset Mic
      
    3.  play a sound from headset
      

    The sound will come out about 1.5 sec latter and it is 100% reproduced.

    I say it's make sense was upper. It was post by @bardliao.
    Play a sound. it will trigger runtime resume.
    It will run resume init then do headset check type.
    It's 217ms+960ms for ALC3254(ALC295).
    But if this hidden issue doesn't fix. This delay will higher than 3s for random.

  10. KailangYang commented on May 16, 2019

    @KailangYang

    @mengdonglin @bardliao @jason77-wang
    I put chip->polling_mode = 1 with whisky lake ID in legacy HDA driver(hda_intel.c).
    This random sound delay issue will be solved.
    Hui Wang and I test it which issue was gone with option chip->polling_mode = 1.
    But It's just workarround. it's not a real solution for major fixed.

  11. jason77-wang commented on May 16, 2019

    @jason77-wang

    On my machine, it had playback delay and jack detection delay when using legacy HD-Audio driver, after setting polling_mode=1, the playback delay disappears, and the jack detection delay isn't that long, it is acceptable since it needs to run some jack checking routines.

    The hda controller is 8086:9dc8.

    I can confirm kailangyang's finding can work well on my machine.

  12. KailangYang commented on May 16, 2019

    @KailangYang

    @mengdonglin
    This issue was same as issue #953.
    The reproduce rate was high than legacy HDA driver.

  13. bardliao commented on May 17, 2019

    @bardliao
    CollaboratorAuthor

    Let's move the discussion to #953 and let #900 focus on headset detection issue

  14. wenqingfu commented on May 21, 2019

    @wenqingfu

    headset detection issue is dup of #908 which has been fixed , see #908 (comment)

  15. mengdonglin commented on May 21, 2019

    @mengdonglin

    Further track playback latency on issue #953

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

Metadata

Metadata

Assignees

Labels

CFLApplies to Coffee Lake platformCMLApplies to Comet Lake platformHDAApplies to HD-Audio bus for codec connectionbugSomething isn't workingcodecCodec HW or driver restrictionwon't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions