Skip to content

[BUG] KWD w/ s24_le format pipeline will stop when DSP enters to D0i3 #3814

@keqiaozhang

Description

@keqiaozhang

Describe the bug
We observed this issue on firmware tag tag:v11.0-hotfix1. When testing wov with S24_LE format on TGL chrome-Volteer SDW, the KWD pipeline will stop when DSP enters to D0i3. but there're no obvious errors in kernel logs or etrace.
This issue is not the same as #3800 on master branch. For #3800, it happens with all audio format(S16_LE/S24_LE and S32_LE) and we have already found the root cause for the regression.
But for this issue, it only happens with S24_LE format, S16_LE and S32_LE formats work well.

I did the cross check for this issue on TGL-chrome-Volteer SDW and TGL-Chrome-Delbin I2S platforms, test results are:

Capture

Since the tip kernel sof-dev has an i915 regression on Delbin platform, so we are unable to check this issue on Delbin with tip of sof-dev. but for other recipes, kwd works well with all formats. But for Volteer, this issue happened after TGL-V10 release. so looks like this issue only happens on SDW device or this is a platform specific issue.

Keyon suggested me to check this issue with 2 ll scheduler fixes from bkokoszx personal branch:
bkokoszx@8430ed7
bkokoszx@8430ed7
So I applied these 2 fixes to https://github.com/thesofproject/sof/releases/tag/releases%2Ftgl%2Fv11.0-hotfix1. Indeed, it can fix this issue on Volteer. but we still need bkokoszx to confirm if we can merge these 2 patches to release branch.

To Reproduce
$ arecord -Dhw:0,5 -M -N -r 16000 -c 2 -f S24_LE --buffer-size=96000 -d 10 wov.wav -vvv

Reproduction Rate
100%

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
  2. Name of the topology file
    • Topology: sof-tgl-sdw-max98373-rt5682.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: TGL-Chrome-Volteer-sdw

Screenshots or console output

$ arecord -Dhw:0,5  -M -N -r 16000 -c 2 -f S24_LE --buffer-size=96000 -d 10 /tmp/wov_S16_record.wav -vvv
Recording WAVE '/tmp/wov_S16_record.wav' : Signed 24 bit Little Endian, Rate 16000 Hz, Stereo
Hardware PCM card 0 'sof-soundwire' device 5 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S24_LE
  subformat    : STD
  channels     : 2
  rate         : 16000
  exact rate   : 16000 (16000/1)
  msbits       : 32
  buffer_size  : 96000
  period_size  : 24000
  period_time  : 1500000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 24000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 96000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
  appl_ptr     : 0
  hw_ptr       : 0
mmap_area[0] = 0x7f079d43a000,0,64 (32)
mmap_area[1] = 0x7f079d43a000,32,64 (32)
Max peak (48000 samples): 0x001056cf ###                  12%
Max peak (16160 samples): 0x000968eb ##                   7%
Max peak (3360 samples): 0x00053d79 #                    4%
Max peak (3200 samples): 0x000b1561 ##                   8%
Max peak (3200 samples): 0x0008a087 ##                   6%
Max peak (3200 samples): 0x0007f0d8 ##                   6%
Max peak (3200 samples): 0x0005e326 #                    4%
Max peak (3200 samples): 0x00054a92 #                    4%
Max peak (3200 samples): 0x00088850 ##                   6%
Max peak (3360 samples): 0x00099d8d ##                   7%
Max peak (3200 samples): 0x0004e1cd #                    3%
Max peak (2720 samples): 0x0007f117 ##                   6%
Max peak (480 samples): 0x00026589 #                    1%
Max peak (3200 samples): 0x0006c08c ##                   5%
Max peak (3200 samples): 0x00095e0c ##                   7%
Max peak (3200 samples): 0x000ae081 ##                   8%
Max peak (3200 samples): 0x0006d961 ##                   5%
Max peak (3360 samples): 0x00070aec ##                   5%
Max peak (3200 samples): 0x0005cc6b #                    4%
Max peak (3200 samples): 0x00049476 #                    3%
Max peak (3200 samples): 0x000568d7 #                    4%
Max peak (3200 samples): 0x00056405 #                    4%
Max peak (3200 samples): 0x0006cce7 ##                   5%
Max peak (3200 samples): 0x0005376b #                    4%
Max peak (3200 samples): 0x00062fdf #                    4%
Max peak (3360 samples): 0x000b7d88 ##                   8%
Max peak (3200 samples): 0x00075629 ##                   5%
Max peak (2400 samples): 0x0006760c ##                   5%
Max peak (800 samples): 0x0007b312 ##                   6%
Max peak (3200 samples): 0x000a12cc ##                   7%
Max peak (3200 samples): 0x00064798 #                    4%
Max peak (800 samples): 0x00035a48 #                    2%
============stop here===============

dmesg
dmesg.txt
sof-logger
trace.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix confirmedFix for the issue has been found and verifiedKeyword DetectionApplies to Keyword DetectionP1Blocker bugs or important featuresSDWSoundWireTGLApplies to Tiger LakebugSomething isn't working as expectedchromeChromebooks or ChromeOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions