Closed zrombel closed 4 years ago
@singalsu any inputs ?
@lgirdwood DMIC starts with filters muted but there's possibility the FIFOs could contain old samples when started. I'll do some checks with my APL board.
Also to be safe the KPB should reject any positive detections for the first 500 ms or so after start. As seen in HDA capture many codecs output some noise in the beginning.
@singalsu I was suspecting the same about DMIC containing some old data but in my opinion is not the issue. First of all detection is triggered in right moment - after 3s of playback, if there was some data in DMIC FIFO detection would happen at the very beginning of playback. Second I've modified test so the sine signal fade over time, but data at the beginning still have full amplitude just like data from detection moment. So i my opinion this is a short mismatch between realtime and drain data somewhere in KPB.
@singalsu @zrombel are we sure we have cleared all buffers prior to DMIC trigger start ? @singalsu how big is the DMIC FIFO ? does it need cleared prior to start ?
@lgirdwood is there a way to explicitly clear buffers? This issue can be reproduced on first iteration, right after ADSP power on and in that case i thing that buffers are empty.
@zrombel pipeline should clear buffer before trigger start. If in doubt check with @tlauda
@zrombel, can you please retest with this patch https://github.com/thesofproject/sof/pull/2329
Thanks
PR #2329 does not fix this bug, Further more I found that this bug is also reproducible with SSP interface, so it's not only DMIC bug.
@zrombel, ok we know what happens. Can you in test change history_depth (the amount of data host requested from history buffer) from 2,1 seconds to 2 seconds? It looks like we have a delay on FW side and new data overwrite oldest data in history buffer.
After validating with PR https://github.com/thesofproject/sof/pull/2343 on APL platform bug no longer can be found. PR https://github.com/thesofproject/sof/pull/2343 is fixing it.
@mrajwa any update on the Prs ? Is this blocking on @lbetlej returning ?
@lgirdwood yes it's my responsibility, I will submit PR for soon.
@mrajwa any updates on this issue?
@slawblauciak @zrombel the fix should be covered by this PR https://github.com/thesofproject/sof/pull/2688
Problem no longer reproducible after PR #2688, therefore I am closing this issue.
Describe the bug BUG found on APL platform in Keyword Detection test incorporating DMIC interface. Test plays 6 second wave file on dmic injector where 3 s is silent and 3 s contain sine signal. When Dummy component detects sine signal on DMIC interface it triggers KPB component to drain history buffer and continue playing realtime data. Recorded wave file should contain ~2.1 s of silence and 3 s of sine signal but at the begging of file there is a short sine signal of exactly 20 ms length (320 samples).
Topology
To Reproduce On APL platform run python test: 07_04_TestKdDmic16000Hz16b16b2ch with --playback-iterations > 100
Reproduction Rate ~1%
Environment 1) SOF master branch hash 79d6ea654cd8403eaf21e7d69e466d3fb73e4d87 and earlier 2) Python tests master branch hash 5b92681e5d967d13f89b67cc11730b64fc465816
Logs 07_04_TestKdDmic16000Hz16b16b2ch_APL_KD_BUG.zip