Skip to content

[BUG] Keyword detection trigger failure on WHL with S24_LE format #1615

Closed

Description

@keqiaozhang

Describe the bug
This issue only happens on WHL when doing the wov testing, Sometimes detection cannot be triggered after clapping.

To Reproduce
Run below test command repeatedly

  1. arecord -Dhw:0,8 -M -N -f s24_le --period-size=400 -r 16000 -c 2 wov.wav -d 10 -vvv
  2. clap your hands to trigger the detection.

Reproduction Rate
Reprodcution rate is about 20%

Expected behavior
detection can be triggered properly.

Impact
Failed to trigger the detection for WOV.

Environment

  1. Kernel:
    branch: topic/keyword-detect
    commit/9c986c39d452e88cdf97bf3934b99265263a499e
  2. Firmware
    branch: top cml-005-drop-stable
    commit: b8e53bc
  3. Platform: WHL-RVP/I2S mode.
  4. Reproducibility Rate. 20%

Screenshots or console output

 arecord -Dhw:0,8 -M -N -f s24_le --period-size=400 -r 16000 -c 2 wov.wav -d 10 -vvv
MobaXterm X11 proxy: Authorisation not recognised
xcb_connection_has_error() returned true
Recording WAVE 'wov.wav' : Signed 24 bit Little Endian, Rate 16000 Hz, Stereo
Hardware PCM card 0 'sof-sof_rt5682' device 8 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  : 6528
  period_size  : 408
  period_time  : 25500
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 408
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 6528
  silence_threshold: 0
  silence_size : 0
  boundary     : 7349874591868649472
  appl_ptr     : 0
  hw_ptr       : 0
mmap_area[0] = 0x7f3d9b912000,0,64 (32)
mmap_area[1] = 0x7f3d9b912000,32,64 (32)

trace.txt

Activity

  1. added
    bugSomething isn't working as expected
    CMLApplies to Comet Lake platform
    WHLApplies to WhiskeyLake platform
    on Jul 8, 2019
  2. self-assigned this
    on Jul 9, 2019
  3. mrajwa commented on Jul 9, 2019

    @mrajwa
    Contributor

    I will handle this one.

  4. mrajwa commented on Jul 16, 2019

    @mrajwa
    Contributor

    @keqiaozhang, the release branch has been updated regarding this issue.

  5. keyonjie commented on Jul 16, 2019

    @keyonjie
    Contributor
  6. keqiaozhang commented on Jul 17, 2019

    @keqiaozhang
    CollaboratorAuthor

    @mrajwa
    I tried the latest release branch, but this issue is still reproducible on both cml and whl-rvp.
    Firmware info:
    b85c320

    trace

     CORE  LEVEL      COMP_ID                TIMESTAMP            DELTA                FILE_NAME    CONTENT
        0      1          MEM         23760000439.427086              nan      src/lib/alloc.c:246  error: 171 blocks needed for allocation but only 170 blocks are remaining
        0      1          KPB         23763005260.364586   3004821.000000      src/audio/kpb.c:792  kpb_init_draining(), period_limit: 31968 [bytes] and interval 37 [ms] 888000 ticks
        0      1          MEM         23768152778.229168   5147518.000000      src/lib/alloc.c:246  error: 171 blocks needed for allocation but only 170 blocks are remaining
        0      1          KPB         23771130621.354168   2977843.000000      src/audio/kpb.c:792  kpb_init_draining(), period_limit: 31968 [bytes] and interval 37 [ms] 888000 ticks
        0      1          MEM         23776820880.989586   5690259.500000      src/lib/alloc.c:246  error: 171 blocks needed for allocation but only 170 blocks are remaining
    

    logger-t.txt

  7. keqiaozhang commented on Jul 18, 2019

    @keqiaozhang
    CollaboratorAuthor

    @mrajwa
    Looks like this issue only occurs when testing S24_LE format. No such issue when testing S16_LE format.

  8. mrajwa commented on Jul 19, 2019

    @mrajwa
    Contributor

    @keqiaozhang, I have provided patch for this on release branch. Please verify if it solved the issue.

  9. hualongfeng commented on Jul 22, 2019

    @hualongfeng

    I test the the latest release branch(d6335a4) on cml chromebook, this issue is still reproducible.

    The below is test script. And when the issue occur, the following are not trigger unless wait 3 second.

    #!/bin/bash

    rm -r ~/Desktop/test/*

    for (( i=1; i <= 100; i++ ))
    do
    arecord -Dhw:0,8 -M -N -f S24_LE --period-size=400 -r 16000 -c 2 ~/Desktop/test/wov$i.wav -d 10 -vvv
    sleep 1
    done

  10. YvonneYang2 commented on Jul 22, 2019

    @YvonneYang2

    Test it on WHL-I2S with test recipe as below, issue still can reproduced.

    The frequency : 1/5 1/7 1/2

    Test recipe:
    Firmware: d6335a4 https://github.com/thesofproject/sof/commits/cml-005-drop-stable
    Kernel: 9c986c3 https://github.com/thesofproject/linux/commits/topic/keyword_dete

  11. hualongfeng commented on Jul 23, 2019

    @hualongfeng

    This is error tips on firmware branch(6335a4).
    error.txt

  12. mrajwa commented on Jul 25, 2019

    @mrajwa
    Contributor

    @keqiaozhang @YvonneYang2 @hualongfeng, it's because I missed some related patches, sorry about that. They are pushed now, so please test again.

  13. 2 remaining items

  14. YvonneYang2 commented on Jul 26, 2019

    @YvonneYang2

    Update #1615 (comment). test 150 times with s16_le format cannot reproduce the bug, but can still reproduce the issue with s24_le format.

    Reproduce rate: 1/17
    log_17.txt

  15. mrajwa commented on Jul 26, 2019

    @mrajwa
    Contributor

    @keqiaozhang @YvonneYang2, logs doesn't say much, can I have dmesg. Also, how often does it happen? If there is no detection I assume you terminate arecord and start again, then can you trigger?

  16. YvonneYang2 commented on Jul 26, 2019

    @YvonneYang2

    Set the interval time between terminate arecord and start as 10s, issue occurred at 43rd with s24_le format.
    If no detection occurred, terminate it and start, can work again. Logs please see work_again.txt.

    logger43.log
    work_again_dmesg.txt
    work_again_logger.txt
    dmesg_42.log
    dmesg_43.log
    logger_42.log

  17. mrajwa commented on Jul 30, 2019

    @mrajwa
    Contributor
  18. YvonneYang2 commented on Jul 31, 2019

    @YvonneYang2

    Issue still reproduced with test recipe as below. Meanwhile, arecord status will stuck during test. Sometimes, arecord stuck issue will block the trigger issue validation.

    Reproduce rate:
    Trigger issue: 1/11
    arecord stuck: 1/5

    Test recipe:
    Firmware: 442cfb2 https://github.com/thesofproject/sof/commits/cml-007-drop-stable
    Kernel: f267c3d https://github.com/thesofproject/linux/commits/topic/keyword_detect
    Topology:file: sof-cml-rt5682.tplg link from sof-whl-rt5682-kwd.tplg
    platform: whl-i2s

    arecord_stuck_error_logger.txt
    arecord_stuck_logger.txt
    arecord_stuck_dmesg.txt
    trigger_dmesg.txt
    trigger_logger.txt

  19. YvonneYang2 commented on Jul 31, 2019

    @YvonneYang2

    Arecord stuck issue will track in #1692

  20. changed the title [-][BUG] Keyword detection trigger failure on WHL[/-] [+][BUG] Keyword detection trigger failure on WHL with S24_LE format[/+] on Aug 1, 2019
  21. added
    P1Blocker bugs or important features
    on Aug 5, 2019
  22. mrajwa commented on Sep 2, 2019

    @mrajwa
    Contributor

    This issue should be finally fixed by #1768, @keqiaozhang please verify on your side.

  23. YvonneYang2 commented on Sep 3, 2019

    @YvonneYang2

    Issue is blocked by #1775 , so cannot verify it now.

  24. mrajwa commented on Sep 3, 2019

    @mrajwa
    Contributor

    @YvonneYang2, can you test cml-007-drop-stable, with #1768 merged into?

  25. keqiaozhang commented on Sep 3, 2019

    @keqiaozhang
    CollaboratorAuthor

    @mrajwa
    I tried to manually apply your PR1768 on 007 stable branch, but failed, there're some hard conflicts, please check the src/audio/pipeline.c, "flags" is still in used and can not be removed, so I keep the flags definition and run test on WHL, this issue still can be reproduced with 100%, even the S16_LE format.

  26. YvonneYang2 commented on Sep 4, 2019

    @YvonneYang2

    Test it 200 times on WHL platform with recipe as below, issue cannot reproduce.

    FW: master branch 90873c5 + #1689 + #1740 + #1768
    Kernel: topic/sof-dev branch f95e4eb + PR1037

  27. aiChaoSONG commented on Sep 4, 2019

    @aiChaoSONG
    Collaborator

    Test it 200 times on CML Chrome with recipe as below, issue cannot reproduce too.

    FW: master branch 90873c5 + #1689 + #1740 + #1768
    Kernel: topic/sof-dev branch f95e4eb + PR1037

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

Metadata

Metadata

Assignees

Labels

CMLApplies to Comet Lake platformKeyword DetectionApplies to Keyword DetectionP1Blocker bugs or important featuresWHLApplies to WhiskeyLake platformbugSomething 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