Skip to content

[BUG][APL]dai_sg_alloc ERROR when multiple-pipeline on APL_UP2_NOCODEC #4526

Closed

Description

@XiaoyunWu6666

Describe the bug
inner daily 5401?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-all
(also inner daily 5449?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-all)
when multiple-pipeline ,dms_sg_alloc failed with err -12 in dai_capture_params. causing ipc error when PCM_PARMS

To Reproduce
TPLG=/lib/firmware/intel/sof-tplg/sof-apl-nocodec.tplg ~/sof-test/test-case/multiple-pipeline.sh -f p -c 20

Reproduction Rate
100%

Environment
Kernel Branch: topic/sof-dev
Kernel Commit: d54b7803
SOF Branch: main
SOF Commit: 1f4395f
Topology: sof-apl-nocodec.tplg
)Platform: APL_UP2_NOCODEC

Screenshots or console output
[sof-logger]

[       35139.998604] (         918.281189) c0 host         7.36  ....../pipeline-stream.c:205  INFO perf comp_copy peak plat 201 cpu 3352
[       38479.373471] (        3339.374756) c0 ipc                  src/ipc/ipc3/handler.c:536  INFO ipc: dai 1.5 -> config 
[       38488.071387] (           8.697916) c0 dai                           src/lib/dai.c:164  INFO dai_get type 1 index 5 new sref 3
[       38495.363054] (           7.291667) c0 ssp-dai      1.5   /drivers/intel/ssp/ssp.c:275  INFO ssp_set_config(): Already configured. Ignore config
[       38501.821387] (           6.458333) c0 dai                           src/lib/dai.c:188  INFO dai_put type 1 index 5 new sref 2
[       38507.863053] (           6.041667) c0 ipc                      src/ipc/ipc3/dai.c:159  INFO ipc_comp_dai_config() dai type = 1 index = 5
[       38517.863053] (          10.000000) c0 dai          5.26        src/ipc/ipc3/dai.c:223  INFO dai_config() dai type = 1 index = 5 dd 0xbe04fa80
[       38523.331803] (           5.468750) c0 dai          5.26        src/ipc/ipc3/dai.c:227  INFO dai_config(): Component is in active state. Ignore config
[       38529.998469] (           6.666667) c0 dai          6.34        src/ipc/ipc3/dai.c:223  INFO dai_config() dai type = 1 index = 5 dd 0xbe050180
[       38885.310955] (         355.312500) c0 pipe         6.35  ....../pipeline-params.c:215  INFO pipe params dir 1 frame_fmt 0 buffer_fmt 0 rate 48000
[       38892.238038] (           6.927083) c0 pipe         6.35  ....../pipeline-params.c:219  INFO pipe params stream_tag 6 channels 2 sample_valid_bytes 2 sample_container_bytes 2
[       38942.602619] (          50.364582) c0 dai          6.34        src/ipc/ipc3/dai.c:84   INFO dai_data_config() dai type = 1 index = 5 dd 0xbe050180
[       38970.363035] (          27.760416) c0 dai          6.34           src/audio/dai.c:413  INFO dai_capture_params() src_dev = 13 stream_id = 0 src_width = 4 dest_width = 4
[       38976.508868] (           6.145833) c0 dai          6.34           src/audio/dai.c:419  INFO dai_capture_params() fifo 0x8a10
[       38985.415118] (           8.906250) c0 dai          6.34           src/audio/dai.c:429  ERROR dai_capture_params(): dma_sg_alloc() for period_count 4 period_bytes 384 failed with err = -12
[       38991.717201] (           6.302083) c0 pipe         6.35  ....../pipeline-params.c:235  ERROR pipeline_params(): ret = -12, host->comp.id = 30
[       38997.863034] (           6.145833) c0 ipc                  src/ipc/ipc3/handler.c:271  ERROR ipc: pipe 6 comp 30 params failed -12
[       39133.227612] (         135.364578) c0 dai          5.26  ....../pipeline-stream.c:205  INFO perf comp_copy peak plat 273 cpu 4560
[       39154.946361] (          21.718750) c0 host         7.36  ....../pipeline-stream.c:205  INFO perf comp_copy peak plat 211 cpu 3520
[       39243.123441] (          88.177078) c0 dai          1.2   ....../pipeline-stream.c:205  INFO perf comp_copy peak plat 239 cpu 3976
[       39350.415103] (         107.291664) c0 pga          20.57 ....../pipeline-stream.c:205  INFO perf comp_copy peak plat 611 cpu 10174

[dmesg]

[ 5291.077680] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[ 5291.078667] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: error: ipc error for 0x60010000 size 20
[ 5291.078817] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: error: hw params ipc failed for stream 6
[ 5291.078825] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:0e.0: -12
[ 5291.078863] kernel:  Port5: ASoC: soc_pcm_hw_params() failed (-12)
[ 5291.078895] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: ipc tx: 0x80010000: GLB_DAI_MSG: CONFIG
[ 5291.079651] kernel: sof-audio-pci-intel-apl 0000:00:0e.0: ipc tx succeeded: 0x80010000: GLB_DAI_MSG: CONFIG
[ 5291.079664] kernel:  Port5: ASoC: dpcm_fe_dai_hw_params failed (-12)

[console]

2021-07-21 22:58:28 UTC [REMOTE_COMMAND] arecord   -D hw:0,2 -c 2 -r 48000 -f S16_LE /dev/null -q
arecord: set_params:1407: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (85333 85334)
PERIOD_SIZE: 4096
PERIOD_BYTES: 16384
PERIODS: 4
BUFFER_TIME: (341333 341334)
BUFFER_SIZE: 16384
BUFFER_BYTES: 65536
TICK_TIME: 0

Activity

  1. added
    bugSomething isn't working as expected
    APLApplies to Apollolake platform
    Intel Linux Daily testsThis issue can be found in internal Linux daily tests
    on Jul 22, 2021
  2. ranj063 commented on Jul 22, 2021

    @ranj063
    Collaborator

    @XiaoyunWu6666 could you please check if #4521 can fix this?

  3. marc-hb commented on Jul 22, 2021

    @marc-hb
    Collaborator

    Before testing a fix: can this be reproduced easily?

  4. XiaoyunWu6666 commented on Jul 22, 2021

    @XiaoyunWu6666
    ContributorAuthor

    Before testing a fix: can this be reproduced easily?

    yes, it can

  5. ranj063 commented on Jul 22, 2021

    @ranj063
    Collaborator

    Before testing a fix: can this be reproduced easily?

    @marc-hb I added a PR to add 2 more PCMs to all nocodec topologies yesterday for deep buffer support. Im not surprised this showed up. If Keyon's PR doesnt help, we might need to trim down the pipelines for APL nocodec.

  6. XiaoyunWu6666 commented on Jul 22, 2021

    @XiaoyunWu6666
    ContributorAuthor

    @XiaoyunWu6666 could you please check if #4521 can fix this?

    hi @ranj063 , with this PR firmware cannot boot successfully . @keyonjie is working on it

  7. keyonjie commented on Jul 22, 2021

    @keyonjie
    Contributor

    the PR#4521 is not quite ready yet, let's try it later.

  8. marc-hb commented on Jul 22, 2021

    @marc-hb
    Collaborator

    @marc-hb I added a PR to add 2 more PCMs to all nocodec topologies yesterday for deep buffer support. Im not surprised this showed up.

    Thanks, mentioning commit 6516a8c would have helped.

  9. plbossart commented on Jul 22, 2021

    @plbossart
    Member

    I just don't get how we end-up with such regressions.

    Ranjani's change to use the deep-buffer was tested with PR #4516 - no problems detected.
    https://sof-ci.01.org/sofpr/PR4516/build9704/devicetest/

    The mixer change was also tested https://sof-ci.01.org/sofpr/PR4517/build9703/devicetest/

    ????

  10. plbossart commented on Jul 22, 2021

    @plbossart
    Member

    Bisecting results:

    c5f50f533ff876600bc0899822e9763c7ab75cae is the first bad commit
    commit c5f50f533ff876600bc0899822e9763c7ab75cae
    Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
    Date:   Mon Apr 12 17:58:44 2021 +0300
    
        Drivers: Intel: DMIC: Separate decimation filters setup computation
        
        This patch moves the run-time decimation factors search and filter
        coefficients scaling code to separate module as preparation to add
        more functionality to the driver. There are no changes to
        functionality.
        
        Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
    
     src/drivers/intel/dmic/CMakeLists.txt  |    2 +-
     src/drivers/intel/dmic/dmic.c          | 1071 +-------------------------------
     src/drivers/intel/dmic/dmic_computed.c | 1002 ++++++++++++++++++++++++++++++
     src/include/sof/drivers/dmic.h         |   80 +++
     zephyr/CMakeLists.txt                  |    4 +
     5 files changed, 1100 insertions(+), 1059 deletions(-)
     create mode 100644 src/drivers/intel/dmic/dmic_computed.c
    
    
  11. plbossart commented on Jul 22, 2021

    @plbossart
    Member

    #4532 reverts all the recent commits impacting APL from the first bad commit above.

  12. ranj063 commented on Jul 22, 2021

    @ranj063
    Collaborator

    Ranjani's change to use the deep-buffer was tested with PR #4516 - no problems detected.

    we dont run multiple-pipeline-all test in the device test for PRs. thats why

  13. XiaoyunWu6666 commented on Jan 24, 2022

    @XiaoyunWu6666
    ContributorAuthor

    haven't seen it in CI for months

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    APLApplies to Apollolake platformIntel Linux Daily testsThis issue can be found in internal Linux daily testsbugSomething 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