Skip to content

[BUG] triggering multiple pipeline start failed for WoV tplg #6793

Closed

Description

@libinyang

Describe the bug
The WoV tplg has below connections:

sof-mtl-nocodec

    DMIC ------> KPB ------------------------------> host_copier
                          |                                  ^
                          |                                  |
                          |----> micsel ----> dummywov ----> virtual_widget

ppl0 contains DMIC, KPB
ppl1 contains micsel, dummywov
ppl2 contains host_copier

The driver triggers multiple pipelines with a single IPC with SOF_IPC4_GLB_PIPE_STATE_EXT_MULTI set in the ipc message extension field. The IPC message is:
ipc tx : 0x13000004|0x1
payload : 0x00000003 0x00000002 0x00000001 0x00000000
This sequence doesn't work and the trigger to running state will fail.

However, if we trigger single pipeline in sequence like:
ipc tx : 0x13000004|0x0
ipc tx : 0x13010004|0x0
ipc tx : 0x13020004|0x0
This sequence works.

ps: this bug is related to the trigger sequence.
I tried to send ipc message:
ipc tx : 0x13000004|0x1
payload : 0x00000003 0x00000000 0x00000001 0x00000002
It works.

Use a pipeline, which contains a KPB component, to record. For example, on MTL nocodec platform, run:

arecord -Dhw:0,11 -c2 -r16000 -fs32_le -M -N 2.wav -vvv

Reproduction Rate
100%

Expected behavior
Record works well.

Impact
The pipelines which contains kpb won't work

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).

  2. Name of the topology file

  3. Name of the platform(s) on which the bug is observed.

    • Platform: MTLP_RVP_NOCODEC

dmesg
dmesg.txt
mtrace.txt

The mtrace error:

[00:01:07.155,301] <inf> kd_test: test_keyword_trigger: comp:1 0xd0000 test_keyword_trigger()
[00:01:07.155,315] <err> module_adapter: comp:1 0x90000 module_process() error 1: for comp 589824
[00:01:07.155,323] <err> module_adapter: comp:1 0x90000 module_adapter_copy() error 1: module processing failed
[00:01:07.155,331] <inf> kpb: kpb_trigger: comp:0 0xe0000 kpb_trigger()
[00:01:07.155,343] <inf> kpb: kpb_trigger: comp:0 0xe0000 kpb_trigger()

ps: 0x90000 module is selector module.

The dmesg error:

[  219.532633] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x12000000|0x0: GLB_DELETE_PIPELINE
[  219.532971] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx reply: 0x3200000c|0x0: GLB_DELETE_PIPELINE
[  219.532978] sof-audio-pci-intel-mtl 0000:00:1f.3: FW reported error: 12 - Required resource is in invalid state
[  219.533252] sof-audio-pci-intel-mtl 0000:00:1f.3: ipc error for msg 0x12000000|0x0
[  219.533275] sof-audio-pci-intel-mtl 0000:00:1f.3: failed to free pipeline widget pipeline.19

ps: The dmesg shows error at deleting pipeline, but the mtrace shows error before this point. mtrace shows error at trigger multiple pipelines to running state.

Activity

  1. added
    bugSomething isn't working as expected
    on Dec 13, 2022
  2. changed the title [-][BUG] trigger multiple pipeline start failed for WoV tplg[/-] [+][BUG] triggering multiple pipeline start failed for WoV tplg[/+] on Dec 13, 2022
  3. libinyang commented on Dec 13, 2022

    @libinyang
    ContributorAuthor
  4. libinyang commented on Dec 13, 2022

    @libinyang
    ContributorAuthor

    The mtrace error:

    [00:01:07.155,301] <inf> kd_test: test_keyword_trigger: comp:1 0xd0000 test_keyword_trigger()
    [00:01:07.155,315] <err> module_adapter: comp:1 0x90000 module_process() error 1: for comp 589824
    [00:01:07.155,323] <err> module_adapter: comp:1 0x90000 module_adapter_copy() error 1: module processing failed
    [00:01:07.155,331] <inf> kpb: kpb_trigger: comp:0 0xe0000 kpb_trigger()
    [00:01:07.155,343] <inf> kpb: kpb_trigger: comp:0 0xe0000 kpb_trigger()
    

    ps: 0x90000 module is selector module.

    The dmesg error:

    [  219.532633] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x12000000|0x0: GLB_DELETE_PIPELINE
    [  219.532971] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx reply: 0x3200000c|0x0: GLB_DELETE_PIPELINE
    [  219.532978] sof-audio-pci-intel-mtl 0000:00:1f.3: FW reported error: 12 - Required resource is in invalid state
    [  219.533252] sof-audio-pci-intel-mtl 0000:00:1f.3: ipc error for msg 0x12000000|0x0
    [  219.533275] sof-audio-pci-intel-mtl 0000:00:1f.3: failed to free pipeline widget pipeline.19
    

    ps: The dmesg shows error at deleting pipeline, but the mtrace shows error before this point. mtrace shows error at trigger multiple pipelines to running state.

  5. added
    P1Blocker bugs or important features
    MTLApplies to Meteor Lake platform
    on Dec 14, 2022
  6. lgirdwood commented on Dec 14, 2022

    @lgirdwood
    Member

    @fkwasowi any insights ?

  7. kfrydryx commented on Dec 20, 2022

    @kfrydryx
    Contributor

    Can this be reproduced with #6827 merged?

  8. libinyang commented on Dec 21, 2022

    @libinyang
    ContributorAuthor

    #6827 can fix this issue on my old commit. But I tested on the latest fw code, which has already merged #6827, the trigger still failed...

  9. libinyang commented on Jan 10, 2023

    @libinyang
    ContributorAuthor

    The latest code doesn't work because the heap memory is not large enough on mtl. #6925 can fix this issue.

  10. mengdonglin commented on Jan 10, 2023

    @mengdonglin
    Collaborator

    Closing as it's no longer a trigger sequence issue. For memory fix, please track #6925

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

Metadata

Metadata

Assignees

Labels

Keyword DetectionApplies to Keyword DetectionMTLApplies to Meteor Lake platformP1Blocker bugs or important featuresbugSomething 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