You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] No update in sound-setting upon headset hotplug after long time idle #909
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
Reboot system.
Open sound setting of laptop
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
@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.
@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.
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
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.
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
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.
@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?
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
Activity
RanderWang commentedon May 7, 2019
In this case, codec driver doesn't update jack status. Please dispatch it to codec vendor for help.
wenqingfu commentedon May 8, 2019
likely a jack update bug from codec driver. @mengdonglin to follow up
mengdonglin commentedon May 9, 2019
I will request Realtek to fix this codec issue on jack detection failure.
KailangYang commentedon May 10, 2019
@bardliao
Could I test it on legacy HDA driver?
@mengdonglin
Could Hui Wang join this github?
bardliao commentedon May 13, 2019
@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_saveas root before testing.KailangYang commentedon May 16, 2019
@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.
[-][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. [/+]KailangYang commentedon May 17, 2019
@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
19 remaining items
RanderWang commentedon May 25, 2019
yes, I find it:torvalds@7d4f606
ALSA: hda - WAKEEN feature enabling for runtime pm
RanderWang commentedon May 25, 2019
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.
[-][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[/+]YvonneYang2 commentedon May 28, 2019
Issue not reproduced after long time idle with scenario below:
Issue still reproduced with the scenario below:
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
RanderWang commentedon May 29, 2019
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.
ranj063 commentedon Jun 6, 2019
@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?
libinyang commentedon Jun 6, 2019
@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 :)
ClarexZhou commentedon Jun 6, 2019
@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
ClarexZhou commentedon Jun 12, 2019
Reopen for original issue isn't fully fixed #983 ,still waiting other PRs.
@RanderWang please add all PRs
RanderWang commentedon Jun 14, 2019
only #1003 is not merged
YvonneYang2 commentedon Jun 17, 2019
Issue not reproduced though #1003 is now merged by https://github.com/thesofproject/linux/tree/release/sof-v5.0. So close the bug.
Hao-Sheng commentedon Jun 19, 2019
dmesg.log
Found external mic cannot record sound