Skip to content

[BUG][TGL]Arecord sound have some overshoot noise output when captured via DMIC0,4. #1876

Closed

Description

@sinahuang

Describe the bug
Arecord sound have some noise output when captured via DMIC0,4.

To Reproduce

  1. Boot up system and waiting for suspend.
  2. Arecord -Dhw:0,4 -r16000 -c4 -fs16_le 00.wav -vv -i
  3. Check the beginning of captured wav files .

Reproduced rate
5/5

Expected result
Arecord sound should be normally and no noise output.

Actual result
Arecord sound have some overshoot noise output when captured via DMIC0,4.

Capture

Test recipe

Kernel:https://github.com/thesofproject/linux/commits/topic/sof-dev commit:ac3abc5
FW: https://github.com/thesofproject/sof/commits/master commit: b206b7a
Tplg: Same with FW branch, sof-tgl-rt711-i2s-rt1308.tplg
Platform:TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode

No error info in dmesg:
dmesg9.log
sof_trace9.log

Activity

  1. added
    bugSomething isn't working
    TGLApplies to Tiger Lake platform
    on Mar 9, 2020
  2. plbossart commented on Mar 9, 2020

    @plbossart
    Member

    @sinahuang do you also see this with the regular 48kHz capture?

    Wondering if the filters @singalsu worked on are enabled in 16kHz mode, or if they need to be different?

  3. sinahuang commented on Mar 10, 2020

    @sinahuang
    Author

    Issue still can be reproduced with the regular 48kHz capture.

  4. singalsu commented on Mar 10, 2020

    @singalsu
    Collaborator

    @sinahuang Can you please attach wav files for both 48 kHz and 16 kHz capture. The screenshots prove the issue but are not as useful for considering fix alternatives as wav files.

    It's known issue that there's some remaining DC pulse with 16 kHz DMIC. The start waveform with competing microphone DC pulling up the waveform and lower rate updated gain ramp pulling it down creates some small buzz sound. It should be at least made non-audible.

    There's a HW shortcoming with time constant of DC blocker filter that becomes rather slow for low sample rates like 16 kHz. It's possible hide this issue with FW driver even more than currently with gain ramp and apply higher cutoff FW high-pass filtering but the muted time is becoming quite long and might disturb use cases (utterance start could be missed in recording). Though in the plot the DC pulse looks quite strong. Maybe there is no high-pass filtering in topology at all. If that's the case then the 16 kHz case could be improved without increasing muted time.

  5. self-assigned this
    on Mar 10, 2020
  6. sinahuang commented on Mar 10, 2020

    @sinahuang
    Author

    Attached the 48 kHz and 16 kHz captured wav files. Please notice the beginning of captured files.
    captured wav.zip

  7. singalsu commented on Mar 10, 2020

    @singalsu
    Collaborator

    I got them, the 48 kHz version looks quite normal. Though the 4ch volume control issue shows up.

    In the 16 kHz version the voice pitch sounds elevated (another potential issue - please check this). Does the 6.225 seconds recording length match your arecord command? Also if you run "time arecord -d 10" does the shown time match the recording duration?

    Yep, there's some DC left in both. I'll see what could be done.

  8. sinahuang commented on Mar 16, 2020

    @sinahuang
    Author

    Checked it seems the recording length doesn't match arecord command .
    Run with command "timed arecord -d 10", but actual recording length is 30s,

    Wav files:

    10s.zip

  9. ClarexZhou commented on Mar 24, 2020

    @ClarexZhou

    Blocked by issue thesofproject/sof#2445 which can be fixed by thesofproject/sof#2506, still wait to merge.

  10. sinahuang commented on Mar 24, 2020

    @sinahuang
    Author

    Issue also can be reproduced on TGL-RVP with codec ALC711 and RT1308 in SDW mode.

  11. singalsu commented on Mar 24, 2020

    @singalsu
    Collaborator

    @sinahuang Thanks for confirming the issue.

    @xiuli Is there in CI test for actual playback and recording lengths, e.g. aplay/arecord 10s should take min 10s and max 11s.? This kind of regressions would be easy to avoid with such test.

  12. added
    P2Critical bugs or normal features
    on Apr 8, 2020
  13. singalsu commented on Jun 15, 2020

    @singalsu
    Collaborator

    @ClarexZhou @sinahuang Does this issue still happen?

  14. added
    SDWApplies to SoundWire bus for codec connection
    on Jun 16, 2020
  15. sinahuang commented on Jun 16, 2020

    @sinahuang
    Author

    Issue still can be reproduced on TGL RVP with codec ALC711 and RT1308 in SDW mode.

  16. singalsu commented on Jun 16, 2020

    @singalsu
    Collaborator

    @sinahuang Thanks for confirm. The issue #1969 has some similarity. I now have a device that is similar to that report. I will try to enhance capture beginning within firmware what can be done, and I think it could help with this issue with different codec IC too. There could be also issues in driver control sequence.

  17. added
    dmicIssues related to PCH connected DMIC
    on Sep 22, 2020
  18. singalsu commented on Sep 25, 2020

    @singalsu
    Collaborator

    The issue no more happens with a device that uses sof-cml-rt711-rt1308-rt715.tplg.

    Kernel Branch: topic/sof-dev
    Kernel Commit: 0253ee5
    SOF Branch: master
    SOF Commit: 52e82f4

    Here's the result of command

    $ time arecord -Dhw:0,4 -f dat -d 10 rec04.wav
    Recording WAVE 'rec04.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
    
    real	0m10,481s
    user	0m0,013s
    sys	0m0,016s
    
    

    Screenshot from 2020-09-25 17-13-26

    The recording is at correct pitch, recording length, and no more DC pulses in the beginning. The DC pulse is suppressed by the high-pass IIR filter in capture pipeline.

    sof-cml-rt711-rt1308-mono-rt715

  19. singalsu commented on Sep 25, 2020

    @singalsu
    Collaborator

    I'll close this issue. Please reopen if this is seen with TGL since I can't test with exactly the same configuration.

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

Metadata

Metadata

Assignees

Labels

P2Critical bugs or normal featuresSDWApplies to SoundWire bus for codec connectionTGLApplies to Tiger Lake platformbugSomething isn't workingdmicIssues related to PCH connected DMIC

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions