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
[CNL] It takes more than 1 sec from aplay cmd to sound comes out #900
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
Wait until DSP is in runtime suspended.
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
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
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."
plug in headset but don’t select Audio device on the pop up menu.
run alsamixer and make sure the Input Source is Headset Mic
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.
@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.
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.
Activity
bardliao commentedon May 6, 2019
The root cause is alc269_resume takes too much time.
bardliao commentedon May 7, 2019
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
mengdonglin commentedon May 7, 2019
@jason77-wang, please report this issue to codec vendor Realtek and ask Realtek to fix it. Thanks!
mengdonglin commentedon May 10, 2019
@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."
KailangYang commentedon May 10, 2019
@mengdonglin @bardliao
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.
KailangYang commentedon May 16, 2019
@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.
jason77-wang commentedon May 16, 2019
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.
KailangYang commentedon May 16, 2019
@mengdonglin
This issue was same as issue #953.
The reproduce rate was high than legacy HDA driver.
bardliao commentedon May 17, 2019
Let's move the discussion to #953 and let #900 focus on headset detection issue
wenqingfu commentedon May 21, 2019
headset detection issue is dup of #908 which has been fixed , see #908 (comment)
mengdonglin commentedon May 21, 2019
Further track playback latency on issue #953
sfc: fix channel allocation with brute force
ACPICA: Attempt 1 to fix issue thesofproject#900
ACPICA: Clean up the fix for Issue thesofproject#900
ACPICA: Fix spelling and typos
Merge branch 'acpica'