Repository navigation
[BUG] Huge distortion - Demux tests with ch.mapping #1820
Copy link
Copy link
Closed
Labels
CMLApplies to Comet Lake platformApplies to Comet Lake platformP2Critical bugs or normal featuresCritical bugs or normal featuresWHLApplies to WhiskeyLake platformApplies to WhiskeyLake platformbugSomething isn't working as expectedSomething isn't working as expected
Description
Describe the bug
Distortion occurs on whole recording wave in tests with Demux based on channel mapping.
To Reproduce
Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)
Reproduction Rate
2% from 50 executions.
Expected behavior
clean recording wave without distortion
Environment
Windows python tests
Platform WHL-RVP - I2S mode.
Firmware from branch:
abonislawski/sof@8dfdfe1
pipe_cap
+-------------------------------+
| +------+ +------+ +-----+ | +------+
| | Host |<--| Buff |<--| Dai |<----| SSPx |<--------------------------<
| +------+ +------+ +-----+ | +------+ |
+-------------------------------+ |
pipe_plb |
+---------------------+ |
| +------+ +------+ | +------+
+--->| Buff |-->| Dai1 |------>| SSPx |
| | +------+ +------+ | +------+
pipe_plb | +---------------------+
+---------------------------------+ |
| +------+ +------+ +-------+>---+
| | Host |-->| Buff |-->| DeMux | |
| +------+ +------+ +------+>----+
+---------------------------------+ | pipe_plb
| +---------------------+
| | +------+ +------+ | +--------+
+--->| Buff |-->| Dai2 |------>| SSPx+1 |
| +------+ +------+ | +--------+
+---------------------+ |
pipe_cap |
+-------------------------------+ |
| +------+ +------+ +-----+ | +--------+ |
| | Host |<--| Buff |<--| Dai |<----| SSPx+1 |<------------------------<
| +------+ +------+ +-----+ | +--------+
+-------------------------------+
Attachments
dma_trace_1.log
Metadata
Metadata
Assignees
Labels
CMLApplies to Comet Lake platformApplies to Comet Lake platformP2Critical bugs or normal featuresCritical bugs or normal featuresWHLApplies to WhiskeyLake platformApplies to WhiskeyLake platformbugSomething isn't working as expectedSomething isn't working as expected

Activity
lgirdwood commentedon Sep 11, 2019
@emilchudzik looks like clipping. Can you try and lower the volume on the CODEC. @singalsu do you agree ?
singalsu commentedon Sep 12, 2019
Yes you can try to lower gain but to find what amplitude relative to full scale just passes cleanly but still there's an overflow happening somewhere. In a properly working system the peaks of sine wave should flatten but never change polarity to opposite that happens now. If the overflow happens in FW it must be treated as bug. If it's in codec we need to change default gains.
It's not clear to me where in pipeline the overflow happens. Please explain with more details what was tested.
emilchudzik commentedon Oct 28, 2019
@lgirdwood @singalsu this test didn't used the codec. I made loopback on SSP using quirk:
/* ssc1: LBM */
#define SOF_DAI_INTEL_SSP_QUIRK_LBM (1 << 6)
There is 1 playback pipeline Host-Buffer-Demux, after it there is 2 playback pipelines where demux redirect audio signal like a mirror. It should be the same signal on both Dai's.
Then on SSP there is a internal loopback.
Reproduce is very rare.
plbossart commentedon Oct 28, 2019
you should use a saw-tooth pattern with a fixed increment for each sample, so that we can see what the distorsion really is. From the waveform it's likely a buffer copied from the wrong location or a DMA setup issue.
lgirdwood commentedon Oct 28, 2019
@emilchudzik chan0 above looks like R/W pointer sync issues, could be demux to DAI buffer. One other thing to you hear the distorion on the output or just on the capture. This could point to issue on capture DAI buffer.
slawblauciak commentedon Jan 28, 2020
@emilchudzik is the issue still relevant?
emilchudzik commentedon Feb 3, 2020
This issue doesn't occur on: #2212