Skip to content

[BUG] DMIC capture fails to DSP out of memory with GCC build #10318

@singalsu

Description

@singalsu

Describe the bug
Running DMIC capture with four channels fails in 2nd - 6th time with topology sof-hda-generic-4ch.tplg.

To Reproduce

#!/bin/bash

set -e

arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav
sleep 1
arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav
sleep 1
arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav
sleep 1
arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav
sleep 1
arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav
sleep 1
arecord -Dhw:0,6 -f S32_LE -c 4 -r 48000 -d 3 rec.wav

Reproduction Rate
Always in 2nd - 6th capture.

Expected behavior
Successful repeated captures.

Impact
Blocker for gcc builds.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: 59ba1133147b8d96c17ef7d1ba11ef38e066e177
    • SOF: cb65c6a
  2. Name of the topology file
    • Topology: sof-hda-generic-4ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: TGL

Screenshots or console output'

dmesg

[ 81.021208] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx : 0x11000008|0x0: GLB_CREATE_PIPELINE
[ 81.021795] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx reply: 0x31000003|0x0: GLB_CREATE_PIPELINE
[ 81.021809] sof-audio-pci-intel-tgl 0000:00:1f.3: FW reported error: 3 - Not enough space in the IPC reply buffer to complete the request
[ 81.021854] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc error for msg 0x11000008|0x0
[ 81.021869] sof-audio-pci-intel-tgl 0000:00:1f.3: failed to create module pipeline.12
[ 81.021881] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set up connected widgets
[ 81.021896] sof-audio-pci-intel-tgl 0000:00:1f.3: failed widget list set up for pcm 6 dir 1
[ 81.021906] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC error (-22): at snd_soc_pcm_component_prepare() on 0000:00:1f.3

mtrace

[ 60.068863] ipc: ipc_cmd: rx : 0x13000003|0x1
[ 60.068880] pipe: pipeline_trigger: pipe:0 0x0 pipe trigger cmd 2
[ 60.069630] dai_intel_dmic: dai_dmic_stop: dmic_stop(), dmic_active_fifos_mask = 0x1
[ 60.069640] ll_schedule: zephyr_ll_task_done: task complete 0xbe0c96c0 0xbe091034U
[ 60.069645] ll_schedule: zephyr_ll_task_done: num_tasks 2 total_num_tasks 2
[ 60.069671] pipe: pipeline_trigger: pipe:1 0x0 pipe trigger cmd 2
[ 60.070585] ll_schedule: zephyr_ll_task_done: task complete 0xbe0c6940 0xbe091034U
[ 60.070593] ll_schedule: zephyr_ll_task_done: num_tasks 1 total_num_tasks 1
[ 60.070601] ll_schedule: zephyr_domain_unregister: zephyr_domain_unregister domain->type 1 domain->clk 0
[ 60.071126] ipc: ipc_cmd: rx : 0x13000002|0x1
[ 60.071141] pipe: pipeline_trigger: pipe:1 0x0 pipe trigger cmd 0
[ 60.071261] pipe: pipeline_trigger: pipe:0 0x0 pipe trigger cmd 0
[ 60.071275] dai_intel_dmic: dai_dmic_stop: dmic_stop(), dmic_active_fifos_mask = 0x0
[ 60.071285] dma_dw_common: dw_dma_stop: dma@7c000: channel 0 stop
[ 60.071786] ipc: ipc_cmd: rx : 0x46010004|0x14
[ 60.072223] ipc: ipc_cmd: rx : 0x12000000|0x0
[ 60.072240] dma: sof_dma_put: dma_put(), dma = 0x9e0a2a70, sref = 0
[ 60.072838] ipc: ipc_cmd: rx : 0x12010000|0x0
[ 60.073005] dma: sof_dma_put: dma_put(), dma = 0x9e0a2b00, sref = 0
[ 81.021196] ipc: ipc_cmd: rx : 0x11000008|0x0
[ 81.021206] pipe: pipeline_new: pipeline new pipe_id 0 priority 0
[ 81.021213] mem_allocator: heap_alloc_aligned: heap allocated: 23520 free: 2232136 max allocated: 80832
[ 81.021218] pipe: pipeline_new: Out of Memory
[ 81.021221] ipc: ipc4_create_pipeline: ipc: pipeline_new() failed
[ 81.021235] ipc: ipc_cmd: ipc4: FW_GEN_MSG failed with err 3

It appears the the issue happened at commit 9cdef9f

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-impact bugs or 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