Skip to content

[BUG] Huge distortion - Demux tests with ch.mapping #1820

Closed

Description

@emilchudzik

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 |<------------------------<
    | +------+   +------+   +-----+ |   +--------+
    +-------------------------------+

Screenshots or console output
image

Attachments
dma_trace_1.log

Activity

  1. added
    bugSomething isn't working as expected
    P2Critical bugs or normal features
    WHLApplies to WhiskeyLake platform
    CMLApplies to Comet Lake platform
    on Sep 11, 2019
  2. lgirdwood commented on Sep 11, 2019

    @lgirdwood
    Member

    @emilchudzik looks like clipping. Can you try and lower the volume on the CODEC. @singalsu do you agree ?

  3. singalsu commented on Sep 12, 2019

    @singalsu
    Collaborator

    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.

  4. emilchudzik commented on Oct 28, 2019

    @emilchudzik
    ContributorAuthor

    @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.

  5. plbossart commented on Oct 28, 2019

    @plbossart
    Member

    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.

  6. lgirdwood commented on Oct 28, 2019

    @lgirdwood
    Member

    @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.

  7. slawblauciak commented on Jan 28, 2020

    @slawblauciak
    Collaborator

    @emilchudzik is the issue still relevant?

  8. emilchudzik commented on Feb 3, 2020

    @emilchudzik
    ContributorAuthor

    This issue doesn't occur on: #2212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

CMLApplies to Comet Lake platformP2Critical bugs or normal featuresWHLApplies to WhiskeyLake platformbugSomething isn't working as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions