Skip to content

[BUG] No update in sound-setting upon headset hotplug after long time idle #909

Closed

Description

@ClarexZhou

Describe the bug
Sound setting will always no update when Plug in/out headset after boot up/long time idle, however status can update as soon as music is played.

To Reproduce

  1. Reboot system.
  2. Open sound setting of laptop
  3. Plug in headset, then plug out, check.

Expected behavior
Status in sound setting should update as soon as plugged in/out

Actual result
Status won't update until music is play.
More info:
Headset plug status is also not update in amixer when error reproduce

test@test-Inspiron-5490:~$ amixer cget numid=34,iface=CARD,name='Headphone Mic Jack'
numid=34,iface=CARD,name='Headphone Mic Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off

Environment
platform: CML laptop with ALC3204 codec
Rander UCM https://github.com/RanderWang/intel-UCM  
Kernel repo:c99938c https://github.com/thesofproject/linux/tree/release/sof-v5.0
Firmware repo: 47fcac2 https://github.com/thesofproject/sof/commits/master |  
Topology: https://github.com/thesofproject/sof/commits/master . Same as above SOF repo
file: tools/topology/sof-hda-generic.m4, sof-hda-generic-2ch.tplg

plug2sDelay_dmesg.log
plug2sdelay_logger.log

Activity

  1. RanderWang commented on May 7, 2019

    @RanderWang

    In this case, codec driver doesn't update jack status. Please dispatch it to codec vendor for help.

  2. added
    bugSomething isn't working
    CMLApplies to Comet Lake platform
    HDAApplies to HD-Audio bus for codec connection
    on May 8, 2019
  3. wenqingfu commented on May 8, 2019

    @wenqingfu

    likely a jack update bug from codec driver. @mengdonglin to follow up

  4. added
    codecCodec HW or driver restriction
    won't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
    on May 9, 2019
  5. mengdonglin commented on May 9, 2019

    @mengdonglin

    I will request Realtek to fix this codec issue on jack detection failure.

  6. KailangYang commented on May 10, 2019

    @KailangYang

    @bardliao
    Could I test it on legacy HDA driver?

    @mengdonglin
    Could Hui Wang join this github?

  7. bardliao commented on May 13, 2019

    @bardliao
    Collaborator

    @KailangYang I don't see the issue on my laptop with ALC3254 codec. Neither SOF driver nor legacy HDA driver. @ClarexZhou Could you check it on your laptop with legacy HDA driver?
    Please run echo 1 > /sys/module/snd_hda_intel/parameters/power_save as root before testing.

  8. KailangYang commented on May 16, 2019

    @KailangYang

    @bardliao @mengdonglin
    I test it with Mantis(ALC3204) with Canonical OS with SOF. This issue will be reproduce.
    But I test it under legacy HDA driver. It's not has this issue.
    I think SOF was fail on handle unsolicited event.

  9. changed the title [-][UCM]Sound setting will always no update when Plug in/out headset after boot up/long time idle, status can update as soon as music is played. [/-] [+][BUG]Sound setting will always no update when Plug in/out headset after boot up/long time idle, status can update as soon as music is played. [/+] on May 17, 2019
  10. KailangYang commented on May 17, 2019

    @KailangYang

    @ClarexZhou
    Hi,
    You post a wrong message. below was the Headphone Mic Jack. It's not Headset Mic Jack.

    test@test-Inspiron-5490:~$ amixer cget numid=34,iface=CARD,name='Headphone Mic Jack'
    numid=34,iface=CARD,name='Headphone Mic Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off

  11. 19 remaining items

  12. RanderWang commented on May 25, 2019

    @RanderWang

    yes, I find it:torvalds@7d4f606
    ALSA: hda - WAKEEN feature enabling for runtime pm

  13. RanderWang commented on May 25, 2019

    @RanderWang

    On 5/24/19 4:56 AM, RanderWang wrote:
    Found resume function in legacy hda is invoked by acpi, but how to ?
    And we need to implement runtime pm for hdac_hda.c, now we miss this for
    jack detection.
    I also talked with kernel team about pm, but only found they can't help
    us for they didn't know more than us. So we have to fix it by our own
    Can we please try to have subject lines shorter than a line? How can you
    possibly expect people to care about such issues if you can't sum-up things?

    Thanks Pierre. In Chinese , I talked with kernel team smoothly. But In English, I may make thing in mess.
    I need to study from Pierre and I often heared someone in china team said Pierre introduced a new word in a email.

  14. changed the title [-][BUG]Sound setting will always no update when Plug in/out headset after boot up/long time idle, status can update as soon as music is played. [/-] [+][BUG] No update in sound-setting upon headset hotplug after long time idle[/+] on May 25, 2019
  15. YvonneYang2 commented on May 28, 2019

    @YvonneYang2

    Issue not reproduced after long time idle with scenario below:

    1. Make sure no headset is connected and sound setting is closed.
    2. Idle 5 mins
    3. Hot plug headset, then open sound setting to check.(result: headset hotplug status will update)

    Issue still reproduced with the scenario below:

    1. Make sure no headset is connected and sound setting is open.
    2. Idle 5 mins
    3. Hot plug headset and check the sound setting headset status.(result:headset hotplug status will not update)

    Environment
    Rander UCM https://github.com/RanderWang/intel-UCM/commits/hdmi
    Firmware: c916fd7 https://github.com/bardliao/sof/tree/dell-test
    Kernel: 0e0111f https://github.com/thesofproject/linux/tree/release/sof-v5.0
    Topology: file: tools/topology/sof-hda-generic.tplg, sof-hda-generic-2ch.tplg same as firmware
    platform :CML laptop

  16. RanderWang commented on May 29, 2019

    @RanderWang

    yes, I have an idea suggested by keyon to fix this issue now.
    But Kai wants to keep codec active when SOF is active and this idea also could fix this issue.

  17. ranj063 commented on Jun 6, 2019

    @ranj063
    Collaborator

    @ClarexZhou @mengdonglin
    I have just recently pushed a new PR to fix the IPC timeouts issues with MSI. This combined with Rander's PR #983, the canonical patch for jack detection in S3 and reverted commit to switch to legacy IRQ fixes this issue for me.
    My branch https://github.com/ranj063/linux/tree/release/5.0 has all the above changes. Can you please verify if this works?

  18. libinyang commented on Jun 6, 2019

    @libinyang

    @ranj063
    I made a patchset just now: https://github.com/libinyang/linux/tree/v5.0-ipc_timeout_2, which works on my machine. I have test my patchset for about one hour. The patchset is a little similar with yours :)

  19. ClarexZhou commented on Jun 6, 2019

    @ClarexZhou
    Author

    @ranj063
    Run stress test on https://github.com/ranj063/linux/tree/release/5.0.

    No ipc timed out occurred.

    Only reproduce system response very slow issue during playback (aplay –d 1) stress test: Response very slow from 709th time. Then headset selection query pops up. But no ipc timed out. After that it always take several minutes for aplay –d 1

    aplayResponseslow_709_dmesg.log
    aplayResponseslow_709_soflogger.log

  20. ClarexZhou commented on Jun 12, 2019

    @ClarexZhou
    Author

    Reopen for original issue isn't fully fixed #983 ,still waiting other PRs.
    @RanderWang please add all PRs

  21. RanderWang commented on Jun 14, 2019

    @RanderWang

    only #1003 is not merged

  22. YvonneYang2 commented on Jun 17, 2019

    @YvonneYang2

    Issue not reproduced though #1003 is now merged by https://github.com/thesofproject/linux/tree/release/sof-v5.0. So close the bug.

  23. Hao-Sheng commented on Jun 19, 2019

    @Hao-Sheng

    dmesg.log
    Found external mic cannot record sound

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

Metadata

Metadata

Assignees

Labels

CMLApplies 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