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
@mengdonglin
Not sure whether we can do xrun injection on Yorp. For doing xrun injection, we need to enable the CONFIG_SND_PCM_XRUN_DEBUG in kernel config, but chrome is using the different way to build the kernel, I will give it a try tomorrow to see if we can enable XRUN_DEBUG in chrome kernel config.
Thanks @lgirdwood
Today I checked the chrome kernel config, but there's no CONFIG_SND_PCM_XRUN_DEBUG item, so there may be some dependencies that need to be selected first. @cujomalainey Can you help on this, since "make menuconfig" doesn't work.
Apologies for the delay, I was flying back yesterday.
To do menu config on chrome run the following ./chromeos/scripts/kernelconfig editconfig from the root of the kernel repo.
@lgirdwood No, it doesn't always play correctly after the XRUN. I record the output by my cell phone and attach it for your reference. I hit the keyboard at around 2.8 sec in the recorded file, and XRUN happens after that. 2018-11-21_08-54-36_8690.zip
@bardliao can you capture this will a line in cable on a PC/laptop (quality is bad from a phone). There are also guidelines for reporting audio quality issues that @mengdonglin recently updated. Please follow these on the website.
@lgirdwood Thanks @keqiaozhang The recording file is attached. The file is done by loopback on GLK. We do xrun_injection in every 5 sec and there is a short pop when we do xrun_injection. Ideally, playback will recover after the short pop but sometimes it doesn't. We can see the spectrogram has changed after XRUN. I think we can invite firmware folks to check it. noise.zip
#!/bin/bash
file=$(find /proc/asound/card0/ -name "*injection*")
int=0
while [ $int -lt 100000 ]
do
for i in $file
do
echo 0 > $i
done
sleep 5
echo $int
let int++
done
@ranj063@keyonjie@lgirdwood
One hint from scheduler refine:
For the pipeline_task, the pipeline_xrun_recover will schedule a task from pipeline_trigger COMP_TRIGGER_START that will be ignored since the xrun recovery is called from pipeline_task.
Following is the workaround added by @tlaudaf396500#125 (discussion about the fix is here)
/* for playback copy it here, because scheduling won't work * on this interrupt level */if (p->sched_comp->params.direction==SOF_IPC_STREAM_PLAYBACK) {
ret=pipeline_copy(p->sched_comp);
if (ret<0) {
trace_pipe_error_with_ids(p, "pipeline_xrun_recover() ""error: pipeline_copy() ""failed, ret = %d", ret);
returnret;
}
}
So if the task is going to accepted running task to be added. You need to remove the above code or add more check in the pipeline_trigger
This is a duplicate of issue reported by Google: #752
It seems we may need a similar workaround of @tlauda to fix FW XRUN recovery or avoid XRUN on STOP/START.
Summary:
This issue cannot be reproduced on APL with PCM512x.
Test steps:
1. enable XRUN debug in .config:
+CONFIG_SND_DEBUG=y
+CONFIG_SND_DEBUG_VERBOSE=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
2. build and update kernel
3. aplay -Dhw:0,0 -c2 -fS32_LE -vv -i audio.wav
4. sudo su switch to root # in a new terminal
5. inject xrun during the playback:
echo 1 > /proc/asound/card0/pcm0p/sub0/xrun_injection
Test env:
sof master: da9ab07
kernel sof-dev: cac0c10
tplg: sof-apl-pcm512x.tplg
Activity
mengdonglin commentedon Oct 24, 2018
@keqiaozhang Does GLK also have this issue?
keqiaozhang commentedon Oct 24, 2018
@mengdonglin
Not sure whether we can do xrun injection on Yorp. For doing xrun injection, we need to enable the CONFIG_SND_PCM_XRUN_DEBUG in kernel config, but chrome is using the different way to build the kernel, I will give it a try tomorrow to see if we can enable XRUN_DEBUG in chrome kernel config.
lgirdwood commentedon Oct 25, 2018
@keqiaozhang please ask @cujomalainey if you get stuck enabling this on Chrome.
keqiaozhang commentedon Oct 25, 2018
Thanks @lgirdwood
Today I checked the chrome kernel config, but there's no CONFIG_SND_PCM_XRUN_DEBUG item, so there may be some dependencies that need to be selected first.
@cujomalainey Can you help on this, since "make menuconfig" doesn't work.
cujomalainey commentedon Oct 26, 2018
Apologies for the delay, I was flying back yesterday.
To do menu config on chrome run the following
./chromeos/scripts/kernelconfig editconfigfrom the root of the kernel repo.ZhendanYang commentedon Oct 29, 2018
On CNL with nocodec has the similar error log:
Test env:
sof-master: e101263
soft-master: b5eb15
kernel sof-dev: 03cadf8
tplg: test-ssp0-mclk-0-I2S-volume-s16le-s16le-48k-24000k-nocodec.tplg
logger.txt
logger-t.txt
lgirdwood commentedon Oct 29, 2018
Looks like the volume component has had an overrun in each case (i.e. there is no space in the buffer)
10 remaining items
bardliao commentedon Nov 21, 2018
@lgirdwood No, it doesn't always play correctly after the XRUN. I record the output by my cell phone and attach it for your reference. I hit the keyboard at around 2.8 sec in the recorded file, and XRUN happens after that.
2018-11-21_08-54-36_8690.zip
lgirdwood commentedon Nov 21, 2018
@bardliao can you capture this will a line in cable on a PC/laptop (quality is bad from a phone). There are also guidelines for reporting audio quality issues that @mengdonglin recently updated. Please follow these on the website.
bardliao commentedon Nov 22, 2018
@lgirdwood Thanks @keqiaozhang The recording file is attached. The file is done by loopback on GLK. We do xrun_injection in every 5 sec and there is a short pop when we do xrun_injection. Ideally, playback will recover after the short pop but sometimes it doesn't. We can see the spectrogram has changed after XRUN. I think we can invite firmware folks to check it.
noise.zip
markyang commentedon Dec 3, 2018
The content of xrun_injection.sh:
mengdonglin commentedon Dec 3, 2018
@slawblauciak Here are the steps used by Bard to reproduce this issue:
+CONFIG_SND_DEBUG=y
+CONFIG_SND_DEBUG_VERBOSE=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
@bardliao Thanks for sharing
xiulipan commentedon Dec 19, 2018
@ranj063 @keyonjie @lgirdwood
One hint from scheduler refine:
For the pipeline_task, the pipeline_xrun_recover will schedule a task from pipeline_trigger COMP_TRIGGER_START that will be ignored since the xrun recovery is called from pipeline_task.
Following is the workaround added by @tlauda f396500 #125 (discussion about the fix is here)
So if the task is going to accepted running task to be added. You need to remove the above code or add more check in the pipeline_trigger
mengdonglin commentedon Dec 19, 2018
This is a duplicate of issue reported by Google: #752
It seems we may need a similar workaround of @tlauda to fix FW XRUN recovery or avoid XRUN on STOP/START.
keqiaozhang commentedon Dec 20, 2018
Verified that this issue is fixed on glk-005-drop-stable branch.
Tested with: glk-005-drop-stable/4d7904d.
@markyang
Please help to confirm it on other platforms.
markyang commentedon Dec 20, 2018
Summary:
This issue cannot be reproduced on APL with PCM512x.
Test steps:
Test env:
sof master: da9ab07
kernel sof-dev: cac0c10
tplg: sof-apl-pcm512x.tplg