Skip to content

[BUG][TGL][DSM] one additional sample will be captured after playback ends #2880

Closed

Description

@keqiaozhang

Describe the bug
This issue happens when playback ends first. From the captured wav, there's one more cycle of single is captured. After more tests, we found that this issue only happens with s32_le, no reproductions when testing with S16_LE.

For example :
To Reproduce

  1. enable DSM loopback
    Run:
    amp_enable.sh.txt
  2. run playback(only for 3 seconds ) and capture at same time.
    aplay -Dhw:0,0 -f s32_le -c 2 -r 48000 sine_48k_32bit.wav -d 3 & arecord -Dhw:0,0 -f s32_le -c 4 -r 48000 capture.wav -d 5
  3. check the wav file, form the snapshot you can see, ~16ms after playback, there's one more cycle of single is captured.

dsm-cap

Reproduction Rate
10/10

Expected behavior
no extra singles after playback

Environment
Driver: fce7f93 + thesofproject/linux#1971 + https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=914f674bec6efe42f9d6b036850a618fd1698290
Firmware:
SOF branch: tgl-005-drop-stable Commit: 277a971
TPLG: sof-tgl-max98373-rt5682.tplg

dmesg.txt
logger.txt

Activity

  1. added
    bugSomething isn't working as expected
    TGLApplies to Tiger Lake
    DSMDynamic Speaker Management
    on Apr 26, 2020
  2. changed the title [-][BUG][TGL][DSM] one additional cycle of single will be captured after playback ends[/-] [+][BUG][TGL][DSM] one additional sample will be captured after playback ends[/+] on Apr 27, 2020
  3. keqiaozhang commented on Apr 27, 2020

    @keqiaozhang
    CollaboratorAuthor

    Duplicated as #2701

  4. YvonneYang2 commented on Jun 9, 2020

    @YvonneYang2

    Issue can still be reproduced with test recipe as below with command:

    aplay -Dhw:0,0 -f s32_le -c 2 -r 48000 sine_48k_32bit.wav -d 3 & arecord -Dhw:0,0 -f s32_le -c 4 -r 48000 capture.wav -d 5
    

    Kernel:https://github.com/thesofproject/linux/commits/topic/sof-dev commit:5cb79ee6f
    Revert 6a7c533
    Revert cd0a323+ thesofproject/linux#2062 + hack commit thesofproject/linux@6769df9
    FW: https://github.com/thesofproject/sof/tree/tgl-006-drop-stable + #3006

    image

  5. lgirdwood commented on Jun 10, 2020

    @lgirdwood
    Member

    Looks like 4ms of data coming 16ms after end of playback. Does this happens in SSP loopback mode ? i.e. is it a codec issue or a FW issue.

  6. sinahuang commented on Jun 24, 2020

    @sinahuang

    Error also can be reproduced with https://github.com/thesofproject/sof/tree/tgl-007-drop-stable on chrome book with codec 98373 in I2S mode.

  7. lgirdwood commented on Jun 24, 2020

    @lgirdwood
    Member

    @tlauda is it possible that DMA continues to drain pipeline (or parts thereof) ?

  8. Liviali155 commented on Jul 8, 2020

    @Liviali155

    On TGL chromebook in SDW mode with codec 98373 FW:https://github.com/thesofproject/sof/commits/releases/tgl/v7.0-rc7 ,commit: 33cfa90

    aplay -Dhw:0,2 -f s16_le -c 2 -r 48000 sine_48k_16bit_10s_stereo_l5_r2.wav -d 3 &sleep 0.5; arecord -Dhw:0,3 -f s16_le -c 4 -r 48000 record.wav -d 3

    The wave of capture file as below:
    Capture

    sof-logger0708.log
    dmesg0708.log
    record.zip

  9. Liviali155 commented on Jul 9, 2020

    @Liviali155

    Error still can be reproduced with https://github.com/thesofproject/sof/tree/releases/tgl/v7.0-rc8 ,commit: 2057409 on TGL chrome laptop I2S with codec 98357,the same phenomenon with FW:https://github.com/thesofproject/sof/commits/releases/tgl/v7.0-rc7 ,commit: 33cfa90

  10. ClarexZhou commented on Jul 27, 2020

    @ClarexZhou
  11. yongzhi1 commented on Oct 19, 2020

    @yongzhi1
    Contributor

    Hi, @Liviali155 , can you verify the same with https://github.com/thesofproject/sof/releases/tag/releases%2Ftgl%2Fv10.0-rc1 and cherry-pick 20fbbe77e47421dae? In my test, the last channel is always filled with 0, I am using SDW based sof-tgl-sdw-max98373-rt5682.mp4. Thanks!!

  12. lgirdwood commented on Oct 20, 2020

    @lgirdwood
    Member

    @slawblauciak @bkokoszx request for TGL release v10

  13. WYL-12 commented on Dec 1, 2020

    @WYL-12

    On TGL-Delbin-I2S-02 , using https://sof-ci-storage.sh.intel.com/release/sof/releases/tgl/v11.0-rc3/c6249fff6493_chrome_release/ ,issue can be reproduced in below steps:
    1.enable DSM loopback
    Run:
    amp_enable.sh.txt
    2.run playback(only for 3 seconds ) and capture at same time.
    aplay -Dhw:0,0 -f s32_le -c 2 -r 48000 sine_48k_32bit_10s_stereo_l5_r2.wav
    -d 3 & arecord -Dhw:0,0 -f s32_le -c 2 -r 48000 capture.wav -d 5
    3.check the wav file, form the snapshot you can see, ~16ms after playback, there's one more cycle of single is captured.
    sof-issue-2880

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

Metadata

Metadata

Assignees

Labels

DSMDynamic Speaker ManagementTGLApplies to Tiger LakebugSomething 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