sof icon indicating copy to clipboard operation
sof copied to clipboard

[BUG][CHROME] TGL error code: -22 in 07_02_TestKdSsp16000Hz24b32b2ch

Open antonirx opened this issue 3 years ago • 2 comments

Describe the bug Test 07_02_TestKdSsp16000Hz24b32b2ch FW replied with error. Error code: -22 0x00000005 0x00000000 0x00004000

Topology

          pipe_plb
               +------------------+
        +----+ | +---+  +-------+ |
        |Host|-->|Buf|->|SSP Dai|----------------------------------+
        +----+ | +---+  +-------+ |                                |
               +----------------- +                                |
                                                                   |
                   +-------------------------+                     |
        +--------+ | +---+   +-----+   +---+ |                     |
        |KD Dummy|<->|Buf|<->|ChSel|<->|Buf|<->+                   |
        +--------+ | +---+   +-----+   +---+ | |  pipe_cap         |
                   +-------------------------+ |                   |
                                               |                   |
                             +-----------------+                   |
        +--------------------|-----------------------------------+ |
        |+----+  +------+  +---+  +---+  +---+  +---+  +-------+ | |
        ||Host|<-|Buffer|<-|Kpb|<-|Buf|<-|Vol|<-|Buf|<-|SSP Dai|---+
        |+----+  +------+  +---+  +---+  +---+  +---+  +-------+ |
        +--------------------------------------------------------+

To Reproduce Run test with Diagnostic driver: 07_02_TestKdSsp16000Hz24b32b2ch

Reproduction Rate 100 %

Environment SOF: BRANCH: main PLATFORM: TGL BUILD: CHROME https://github.com/thesofproject/sof/commit/5694cfa01234dee8f9e8f311f27cf7a6bf2f9454

Screenshot or logs

[     2222200.885417] (           9.140625) c0 memory                      src/lib/alloc.c:582     Number of Blocks: total 64 used 0 free 64
[     2222209.505208] (           8.619792) c0 memory                      src/lib/alloc.c:578   512 Bytes blocks ID:1 base 0xbe1d7000
[     2222223.619792] (          14.114583) c0 memory                      src/lib/alloc.c:578   1024 Bytes blocks ID:2 base 0xbe1d8000
[     2222237.421875] (          13.802083) c0 memory                      src/lib/alloc.c:569   heap: 0xbe1e6000 size 12288 blocks 3 caps 0x65
[     2222246.536458] (           9.114583) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 0 free 12288
[     2222255.156250] (           8.619792) c0 memory                      src/lib/alloc.c:578   64 Bytes blocks ID:0 base 0xbe1e6000
[     2222287.890625] (          32.734375) c0 memory                      src/lib/alloc.c:569   heap: 0xbe1f6000 size 12288 blocks 3 caps 0x65
[     2222296.848958] (           8.958333) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 0 free 12288
[     2222333.255208] (          36.406250) c0 memory                      src/lib/alloc.c:599  heap: buffer status
[     2222342.578125] (           9.322917) c0 memory                      src/lib/alloc.c:569   heap: 0x9e280000 size 393216 blocks 1 caps 0x71
[     2222351.640625] (           9.062500) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 393216 free 0
[     2222369.244792] (          17.604166) c0 memory                      src/lib/alloc.c:569   heap: 0xbe801800 size 59392 blocks 1 caps 0x69
[     2222378.515625] (           9.270833) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 59136 free 256
[     2222396.640625] (          18.125000) c0 memory                      src/lib/alloc.c:601  heap: runtime status
[     2222404.817708] (           8.177083) c0 memory                      src/lib/alloc.c:569   heap: 0xbe200000 size 524288 blocks 7 caps 0x45
[     2222413.880208] (           9.062500) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 3520 free 520768
[     2222486.536458] (          72.656250) c0 memory                      src/lib/alloc.c:604  heap: runtime shared status
[     2222495.442708] (           8.906250) c0 memory                      src/lib/alloc.c:569   heap: 0x9e0ee000 size 917504 blocks 5 caps 0x45
[     2222504.609375] (           9.166667) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 11200 free 906304
[     2222559.661458] (          55.052082) c0 memory                      src/lib/alloc.c:606  heap: system shared status
[     2222568.697917] (           9.036458) c0 memory                      src/lib/alloc.c:569   heap: 0x9e1ce000 size 5376 blocks 0 caps 0x45
[     2222577.760417] (           9.062500) c0 memory                      src/lib/alloc.c:571    (In Bytes) used 3904 free 1472
[     2222587.604167] (           9.843750) c0 dma-trace                 src/trace/trace.c:141  Suppressed 22 similar messages:    Number of Blocks: total %d used %d free %d
[     2222592.447917] (           4.843750) c0 kpb                         src/audio/kpb.c:350  kpb_allocate_history_buffer(): allocated 383744 bytes
[     2222602.031250] (           9.583333) c0 dma-trace                 src/trace/trace.c:141  Suppressed 19 similar messages:  %d Bytes blocks ID:%d base 0x%x
[     2222633.046875] (          31.015625) c0 kpb                         src/audio/kpb.c:531  ERROR kpb_prepare(): failed to allocate space for KPB buffer
[     2222642.161458] (           9.114583) c0 kpb                         src/audio/kpb.c:366  kpb_free_history_buffer()
[     2222970.104167] (         327.942719) c0 pipe         2.11  ....../pipeline-params.c:350  ERROR pipeline_prepare(): ret = -22, dev->comp.id = 6
[     2222981.067708] (          10.963542) c0 ipc                  src/ipc/ipc3/handler.c:314  ERROR ipc: pipe 2 comp 6 prepare failed -22
[     2222989.635417] (           8.567708) c0 pipe         2.11  ......./pipeline-graph.c:390  pipe reset
[     2223037.786458] (          48.151043) c0 kpb                         src/audio/kpb.c:628  kpb_reset(): resetting from state 3, state log 23
[     2223053.906250] (          16.119791) c0 pga          2.4      src/audio/component.c:66   comp_set_state(), state already set to 1
[     2971639.453125] (      748585.562500) c0 ll-schedule        ./schedule/ll_schedule.c:186  task 0x9e1cec18 agent-work <c63c4e75-8f61-4420-9319-1395932efa9e> avg 110, max 916
[     3995638.828125] (     1023999.375000) c0 ll-schedule        ./schedule/ll_schedule.c:186  task 0x9e1cec18 agent-work <c63c4e75-8f61-4420-9319-1395932efa9e> avg 109, max 113
[     5019638.750000] (     1023999.937500) c0 ll-schedule        ./schedule/ll_schedule.c:186  task 0x9e1cec18 agent-work <c63c4e75-8f61-4420-9319-1395932efa9e> avg 109, max 113
[     6043638.776042] (     1024000.000000) c0 ll-schedule        ./schedule/ll_schedule.c:186  task 0x9e1cec18 agent-work <c63c4e75-8f61-4420-9319-1395932efa9e> avg 109, max 113
[     7067638.828125] (     1024000.062500) c0 ll-schedule        ./schedule/ll_schedule.c:186  task 0x9e1cec18 agent-work <c63c4e75-8f61-4420-9319-1395932efa9e> avg 109, max 113
Skipped 0 bytes after the last statement. Wrap possible, check the start of the output for later logs.

Logs ERR-22.zip

antonirx avatar Oct 05 '22 07:10 antonirx

Looks like KPB is out of memory. Can you reproduce with IPC4 and Zephyr config ?

lgirdwood avatar Oct 05 '22 12:10 lgirdwood

Cannot reproduce KD test - blocked by higher prio issue.

antonirx avatar Oct 12 '22 08:10 antonirx

Found also on: c807d6844b535ff4ad90ac6429a2fef46f398cb4

antonirx avatar Oct 21 '22 12:10 antonirx

@antonirx main branch for TGL should use IPC4/Zephyr config, only the TGL production branch uses IPC3/xtos config. Can you test with main branch config. If unsure, pls chat with @mwasko .

lgirdwood avatar Jan 06 '23 15:01 lgirdwood