Repository navigation
DMIC test fail when audio could not play #800
Copy link
Copy link
Closed
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformP1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't working as expectedSomething isn't working as expectedduplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Codebase: ChromeOS-firmware-R72-11316.64.0
Topology - topology: https://github.com/ranj063/soft-1/tree/sof-v0.55
DSP Firmware - https://github.com/ranj063/sof/tree/sof-v0.55
The test item "SpeakerDMic" is to loop from speaker to digital microphone. You can refer to the factory test script as below.
https://chromium.googlesource.com/chromiumos/platform/factory/+/master/py/test/pytests/audio_loop.py
In this test, it will run the audiofuntest to test the function, something like below:
audiofuntest -r 48000 -i hw:0,0 -o hw:0,0 -l 5 -a 0
INFO kernel: [ 329.372343] sof-audio sof-audio: Firmware info: version 1.1-13be5 build 32 on Dec 24 2018:19:43:24
INFO kernel: [ 329.374091] sof-audio sof-audio: firmware boot complete
ERR kernel: [ 336.048321] sof-audio sof-audio: error: ipc timed out for 0x60040000 size 0xc
ERR kernel: [ 336.048355] sof-audio sof-audio: status: fw entered - code 00000005
ERR kernel: [ 336.048495] sof-audio sof-audio: error: unexpected fault 0x00000000 trace 0x00004000
ERR kernel: [ 336.048502] sof-audio sof-audio: error: waking up any trace sleepers
ERR kernel: [ 336.048539] Speakers: ASoC: trigger FE failed -110
ERR kernel: [ 336.048864] sof-audio sof-audio: error: rx list empty but received 0x0
ERR kernel: [ 336.048876] sof-audio sof-audio: error: can't find message header 0x60040000
ERR kernel: [ 336.048935] sof-audio sof-audio: XRUN for unknown stream, msg_id 0
ERR kernel: [ 336.051095] sof-audio sof-audio: XRUN for unknown stream, msg_id 0
ERR kernel: [ 336.051218] sof-audio sof-audio: XRUN for unknown stream, msg_id 0
INFO goofy[1236]: Test main_fleex:SMT.SpeakerDMicManual.SpeakerDMic_16 (03e10db4-ec6c-4fdf-8e85-e04c0fe8ce68) completed: FAILED (Under output volume 10; Failed to parse audiofuntest output#012Traceback (most recent call last):
Metadata
Metadata
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformP1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't working as expectedSomething isn't working as expectedduplicateThis issue or pull request already existsThis issue or pull request already exists
Activity
wenqingfu commentedon Jan 9, 2019
same error as #743 ?
xiulipan commentedon Jan 9, 2019
@keyonjie
It seems the IPC is handled, but not in time here.
@naveen-manohar
will try to reproduce it and have some feedback.
keyonjie commentedon Jan 9, 2019
we need to duplicate it on our side to root cause it, but simultaneous pipelines stress test fails in v0.55 is our known issue.
Shall we align on that we will focus on fixing it in PV release, but not v0.55?
keqiaozhang commentedon Jan 9, 2019
I used my test script to test dmic capture and speaker playback at same time, it passed 1000 iterations without errors.
CMD:
arecord -Dhw:0,99 -f dat -c 4 /dev/null & aplay -D hw:0,0 -f dat -c 2 /dev/zero & sleep 3; pkill aplay; pkill arecord
I also tried to test it with audiofuntest, but failed with "Failed to exec client: No such file or directory"
@naveen-manohar
What have I missed? Could you share same docs about how to setup the env and run audiofuntest on DUT?
dabekjakub commentedon Jan 9, 2019
I see that topology and FW are from @ranj063 repo.
Does this reproduce on FW master branch ?
@naveen-manohar
ranj063 commentedon Jan 9, 2019
@dabekjakub this bug was reported with R72
@naveen-manohar can you please check if this can be fixed in 1.0 and not for 0.55?
naveen-manohar commentedon Jan 10, 2019
@ranj063 Yes i'm tracking the same with ODMs
Shall update soon they give a positive nod
naveen-manohar commentedon Jan 10, 2019
Got customer's reply - "SOF v1.0 will not be backported to the factory branch. We need to make sure this gets fixed on the factory branch."
wenqingfu commentedon Jan 10, 2019
@dabekjakub @keqiaozhang , you need to talk with @keyonjie if it's the same problem he run into in this comment . Before that, he reported 1000+ successful iterations of a similar test scenario as well.
Good luck!
keqiaozhang commentedon Jan 11, 2019
@naveen-manohar
I can reproduce this issue with:
audiofuntest -P "aplay -D hw:0,0 -r 48000 -f s16 -t raw -c 2 -B 0 -" -R "arecord -D hw:0,99 -r 48000 -f s16 -t raw -c 4 -B 0 -" -r 48000 -T 5 -a 0 -m "0,1" -c 4 -g 100
Also, this is a known issue to us and track it in #743, we will fix it in PV release.
This issue is easier to reproduce if three pipelines are running at same time.
wenqingfu commentedon Jan 11, 2019
interesting finding, thanks! can you please put down the steps you used for creating "three pipelines"? What about more than three pipelines? Would it make the issue reproduction even easier?
wenqingfu commentedon Jan 11, 2019
scouted symptom report in #784 shows similar error pattern, too.
5 remaining items
keyonjie commentedon Jan 16, 2019
@naveen-manohar can you confirm if this noise issue is regression after apply my new fixes?
naveen-manohar commentedon Jan 16, 2019
@Keyon yes we did re-verify and bursting/crackling issue is reproduced only the firmware change.
Without the firmware change, default cpfe works fine.
keyonjie commentedon Jan 16, 2019
OK thanks for the information, I figured out the fixes in UP^2 with nocodec, so let me try to figure out which patch is the convict, I suspect this one at my first think:
pipeline: switch schedule_task_idle to schedule_task
can you do a quick try if removing this commit make difference?
I will do debugging here tomorrow.
keqiaozhang commentedon Jan 17, 2019
@naveen-manohar
I did not observe the bursting noise you mentioned, please share your test recipe or better provide us the noise wav file.
naveen-manohar commentedon Jan 17, 2019
@keqiaozhang Steps we tried:
keqiaozhang commentedon Jan 17, 2019
@naveen-manohar
Now I can reproduce this bursting noise issue, but this issue only happens with browser, no such noise with aplay.
After bisection, we found that this noise is caused by Keyon's new fix(debug: hda-dma: set timeout for preload). Now he is working on it.
keyonjie commentedon Jan 17, 2019
hi all, the noise issue is introduced by my try to workaround hda-dma preload timeout, it workaround the wait timeout issue, but noise happens at this DGCS_BF fail to become true cases.
I have just created a new issue #856 to track that.
@mmaka1 @slawblauciak can you please help on that?
wenqingfu commentedon Jan 29, 2019
Can this bug be closed because of c3111ec?
keqiaozhang commentedon Jan 30, 2019
I cannot reproduce this issue any more.
@naveen-manohar
Please help to close this issue if you are satisfied with it. Thanks!
naveen-manohar commentedon Jan 30, 2019
Thanks a Ton, fix has been validated & we can close this bug