Skip to content

[BUG][CML][UCM2]Speaker and headset has sound output at the same time after suspend-resume #2014

Closed

Description

@Liviali155

Describe the bug
Speaker and headset has sound output at the same time after suspend-resume
Ctrl +c to stop paplay then paplay Right now again can not recovery,
Ctrl +c to stop paplay,wait about 20s,paplay again can recovery

To Reproduce
1.sudo reboot with headset connected
2.open sound settings
3.set Output Device as " Speaker-sof-hda-dsp"
4.set Input Device as "Headset Mono Microphone-sof-hda-dsp" or"Digital Microphone-sof-hda-dsp"
5.paplay wav/48California_Dreaming.wav -vv
6."sudo rtcwake -m mem -s 10" to suspend
7.wait device to wake up
8.repeat step 6~7 2 times

Reproduction Rate
Reproduction Rate >90% issues can be reproduced when repeating suspend and wakeup 3 times.

Expected behavior
Only speaker has sound output

Actual result
Speaker and headset has sound output at the same time

Amixer contents is below,there is no difference between them
amixer_faile.txt
amixer_pass.log

Platform: CML laptop with onboard codec ALC3204 in HDA mode
Firmware: 5f7d4e2 https://github.com/thesofproject/sof/releases/tag/v1.5-rc1
Kernel: stable linux 5.5.9 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=v5.5.9, commit 81b6e04
Topology: file: tools/topology/sof-hda-generic-2ch.tplg same as firmware
UCM2:UCM2:https://github.com/thesofproject/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp

dmesg0415.log
sof-logger0415.log

Activity

  1. added
    bugSomething isn't working
    P1Blocker bugs or important features
    on Apr 15, 2020
  2. Liviali155 commented on Apr 15, 2020

    @Liviali155
    Author

    Issue can be reproduced on sof/dev(commit:73187435)
    Issue can be reproduced on 5.5.8 Kernel: [97453d9] (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=v5.5.8)
    Issue can be reproduced on 5.6.3 kernel:commit f9fb857

  3. juimonen commented on Apr 15, 2020

    @juimonen

    yeah I can reproduce this. Can't think anything else that this has to be something in quite low level as we have alsamixer headphones muted, but still the sound is going there... so the actual codec and alsa mute are out of sync.

  4. added
    HDAApplies to HD-Audio bus for codec connection
    on Apr 15, 2020
  5. juimonen commented on Apr 15, 2020

    @juimonen

    @mengdonglin @Liviali155 After debugging this I see that when waking up from suspend, snd_hda_codec_realtek is syncing the register 0x21b8000 to value 0x80. Per my debugging this should be the headphone path mute and the value 0x80 should mean muted.

    Why this is not muting the actual codec is a mystery to me. I see the same sequence with the forced "rtcwake" call and with just letting the codec go itself to suspend/wake. The difference is that user space pulseaudio doesn't go to its normal "suspend", the process is just frozen (I guess). So when pulseaudio process wakes up it doesn't do any twiddling of alsa parameters. And for some reason the register sync is not enough by itself.

    I think we need to ask from realtek some info/clues about this.

  6. added
    P2Critical bugs or normal features
    and removed
    P1Blocker bugs or important features
    on Apr 16, 2020
  7. Liviali155 commented on Apr 16, 2020

    @Liviali155
    Author

    Issue can be reproduced after revert PR #1983

  8. juimonen commented on Apr 16, 2020

    @juimonen

    @bardliao can you point out this issue for realtek folks also for some comments? I'm little bit lost how to advance with this...

  9. ClarexZhou commented on Apr 16, 2020

    @ClarexZhou

    Error not seen on Lenovo Yoga x1 ALC285 in HDA mode, with 1.4.2 fw. Tried withe 5.5.9 and 5.6.3 kernel.

  10. bardliao commented on Apr 16, 2020

    @bardliao
    Collaborator

    @bardliao can you point out this issue for realtek folks also for some comments? I'm little bit lost how to advance with this...

    Sent email to @KailangYang.

  11. juimonen commented on Apr 16, 2020

    @juimonen

    @bardliao thank you!

  12. bardliao commented on Apr 16, 2020

    @bardliao
    Collaborator

    @ClarexZhou @Liviali155 Can you check if below experiments can mute the headphone when you meet the issue?

    1. amixer cset name='Headphone Playback Switch' 1 and amixer cset name='Headphone Playback Switch' 0
    2. unplug and plug the headphone.
      Please do the 2 experiment separately.

    Thanks

  13. 15 remaining items

  14. added
    codec ALC3204ALC3204 needs SW assistance on jack detection
    codec ALC3254ALC3204 needs SW assistance on jack detection
    on Apr 26, 2020
  15. juimonen commented on Apr 29, 2020

    @juimonen

    @KailangYang ping. sorry to bother you with this also, would there be someone in realtek, who could see the best way to fix this. Seems there needs to be delay when syncing the codec register values in resume... this is the mantis hw.

  16. KailangYang commented on Apr 30, 2020

    @KailangYang

    Please test it with legacy hda driver.
    I think this issue didn't happen in legacy hda driver.
    This maybe the integration issue with hda bus.

  17. juimonen commented on Apr 30, 2020

    @juimonen

    @Liviali155 so if testing with legacy, disable the pop-up. That will make the use case different as it sends the switch command again when selecting the device.

  18. Liviali155 commented on Apr 30, 2020

    @Liviali155
    Author

    @Liviali155 so if testing with legacy, disable the pop-up. That will make the use case different as it sends the switch command again when selecting the device.

    This comment should add in https://github.com/thesofproject/linux/issues/2025?
    How to disable pop-up?

  19. juimonen commented on Apr 30, 2020

    @juimonen

    @Liviali155 hmm yeah I don't no that myself either.... @jason77-wang you have any simple trick how to prevent the pop-up from appearing? I think this is stock 20.04 ubuntu...

  20. Liviali155 commented on Apr 30, 2020

    @Liviali155
    Author

    Please test it with legacy hda driver.
    I think this issue didn't happen in legacy hda driver.
    This maybe the integration issue with hda bus.

    On matins changed to legacy HDA,runtime_status is always active
    Tested 40 times, error not seen
    after used “echo 1 > /sys/module/snd_hda_intel/parameters/power_save“ to enable pm runtime_status,it can enter susupend,then tested 30 times,error also not seen

  21. added
    won't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
    on Aug 5, 2020
  22. mengdonglin commented on Aug 5, 2020

    @mengdonglin

    It seems to be a codec issues, it need some delay before processing the verb correctly. Won't fix

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

Metadata

Metadata

Labels

CFLApplies to Coffee Lake platformCMLApplies to Comet Lake platformHDAApplies to HD-Audio bus for codec connectionP2Critical bugs or normal featuresUCM2bugSomething isn't workingcodecCodec HW or driver restrictioncodec ALC3204ALC3204 needs SW assistance on jack detectioncodec ALC3254ALC3204 needs SW assistance on jack detectionsuspend resumeIssues related to suspend resume (e.g. rtcwake)won'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