Skip to content

Early wake from DSP when running hotword pipeline with FW debug enabled #3034

Closed

Description

@sathyap-chrome

When we open wov stream and then try soix, there is early wake from DSP

see attached logs:
https://github.com/thesofproject/linux/files/6783689/soix.txt

Resume caused by IRQ 179, AudioDSP

But when wov stream is closed, the soix entry and exit is fine.

In kernel config,i had enabled FW debug and other options for debug purpose: (everything under SOF_DEBUG)
+CONFIG_SND_SOC_SOF_DEBUG=y
+CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE=y
+CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE=y
+CONFIG_SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION=y
+CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST=y
+CONFIG_SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT=y
+CONFIG_SND_SOC_SOF_DEBUG_VERBOSE_IPC=y
+CONFIG_SND_SOC_SOF_DEBUG_XRUN_STOP=y
+CONFIG_SND_SOC_SOF_DEVELOPER_SUPPORT=y

Activity

  1. ranj063 commented on Jul 9, 2021

    @ranj063
    Collaborator

    @sathyap-chrome thank you for reporting this. Im not sure if this is kernel issue or a FW issue yet. In the driver, we set the flag to disable trace when entering D0i3 in S0ix. But maybe the FW is not acting on it. Need to check

  2. added
    bug
    Keyword Detection
    S0ix
    on Jul 20, 2021
  3. added
    ADL
    P1
    on Jul 26, 2021
  4. libinyang commented on Jul 26, 2021

    @libinyang

    @sathyap-chrome I tried it on my Brya. My Brya can't enter S0ix from reading the residencies. Is there anything I should do to make the OS enter S0ix? My platform is Brya proto1 SKU1. BTW: if I run echo "freeze" > state, the display will be off, and if I clap, the WoV will waken the display.

  5. libinyang commented on Aug 3, 2021

    @libinyang

    some updates:
    1 can't enter S0ix is because the coreboot is too old.
    2 Based on the phenomenon, we suspect that fw is sending the log to host, which cause early wake from S0ix. After some debug, this assumption is precluded.
    3. And I also found, if I disable dma trace either in driver or fw, this bug won’t happen.
    4. After study the code, I guess maybe DMA should be disabled to enter S0ix on ADL.

  6. ranj063 commented on Aug 3, 2021

    @ranj063
    Collaborator

    @libinyang we do send the TRACE_DISABLE flag along with the PM_GATE IPC when we enter D0i3 during system suspend, right? Are you saying that more needs to be done from the host? Or is the FW not acting on it?

  7. libinyang commented on Aug 4, 2021

    @libinyang

    After some debug, this issue is caused when dma is triggered. So it seems this is an ADL specific issue. I will prepare a patch for this issue.

  8. libinyang commented on Aug 4, 2021

    @libinyang

    @libinyang we do send the TRACE_DISABLE flag along with the PM_GATE IPC when we enter D0i3 during system suspend, right? Are you saying that more needs to be done from the host? Or is the FW not acting on it?

    @ranj063 Yes, we send the flag, but it didn't work. I have checked even there is no any log sent from fw, but if we triggered start the dma, pc10 won't be entered on ADL.

  9. libinyang commented on Aug 16, 2021

    @libinyang

    This bug can be fixed by #3099.

    However, we still have an open: why WoV dma needn't be stopped in S0ix.

  10. kv2019i commented on Dec 10, 2021

    @kv2019i
    Collaborator

    I can confim with SOF1.9.1 and kernel with dma-stop fixes, this still happens. System logs show system not cleanly entering S0ix in this case. Disabling the FW trace helps to solve the issue.

  11. mwasko commented on Dec 13, 2021

    @mwasko

    What is the reproduction rate of this issue?

  12. kv2019i commented on Dec 13, 2021

    @kv2019i
    Collaborator

    @mwasko This is 100% reproducible. The fact that we leave DMA programmed for trace, prevents S0ix entry although on TGL it works just fine.

  13. keqiaozhang commented on Jan 10, 2022

    @keqiaozhang

    PR #3332 can fix this issue, so this bug can be closed.

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

Metadata

Metadata

Assignees

Labels

ADLKeyword DetectionP1S0ixbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions