Skip to content

[BUG][CML] pause/release headset capture will cause pulse noise in recorded wave #2224

Closed

Description

@aiChaoSONG

Describe the bug
pause/release headset capture with SPACE will cause pulse noise in the recorded wave.
pause_release_trigger_noise

To Reproduce

  1. run arecord via headset pipeline: arecord -Dhw:0,0 -f dat -r 48000 -i -vvv -c2 ./headset.wav
  2. press SPACE in pair(double press)(see picture above)
  3. after several pairs of press, the noise should be triggered.

if you don't have correct UCM, the headset capture may be muted, please use the ucm file attached.

Reproduction Rate
within several pairs of SPACE press, you will see the pulse noise in the terminal. should be easy to reproduce on the platform specified below.

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-cml-rt1011-rt5682}
  3. Name of the platform(s) on which the bug is observed.
    • Platform: {CML with rt5682 and rt1011 codecs}

Error log
No obvious error seen in the log.
dmesg_pause_release_trigger_pulse_noise.log

soflogger_pause_release_trigger_pulse_noise.log

UCM Files
ucm_sof-cml_rt1011_rt5682.zip

Recorded Wave
headsetwave.zip

Activity

  1. added
    bugSomething isn't working as expected
    on Dec 18, 2019
  2. aiChaoSONG commented on Dec 18, 2019

    @aiChaoSONG
    CollaboratorAuthor

    I also observed:

    1. once the pulse is seen, it will exist along the whole recording.
    2. once the pulse is seen, unplug headset, it disappears, insert jack back, it appears again.
    3. once the pulse is seen, continue double press SPACE, it may disappear and appear again.
    4. Some of kcontrols which may change data route have influence on the pulse noise and the recording, such as ADCDAT Mux and Stereo1 ADC L Mux.
    5. once the pulse is seen, change Stereo1 ADC L Mux from ADC1 L to ADC1 R, and change it back, the pulse disappears, but press SPACE will trigger the noise again.
    6. sometimes, no need to press SPACE, the pulse noise appears at the beginning of recording
    7. tried nocodec kernel and tplg, this issue not reproduced.
  3. lgirdwood commented on Dec 18, 2019

    @lgirdwood
    Member

    @bardliao any insights here, it look like a codec driver (pause/release) issue if the noise disappears when 2, 4, 5 and 7 is tried ? Should be add realtek to issue ?

  4. bardliao commented on Dec 19, 2019

    @bardliao
    Collaborator

    @bardliao any insights here, it look like a codec driver (pause/release) issue if the noise disappears when 2, 4, 5 and 7 is tried ? Should be add realtek to issue ?

    @lgirdwood Yes, it could be. @aiChaoSONG Could you check if MCLK is active when the recording is paused? If not, please check if MCLK starts before I2S BCLK. IIRC, MCLK starts before BCLK is a requirement of rt5682. @shumingfan can you take a look?

  5. shumingfan commented on Dec 19, 2019

    @shumingfan
    Contributor

    @aiChaoSONG @bardliao I want to involve our hardware AE to debug this issue.
    He wants to know which is customer and project name to this issue?

  6. shumingfan commented on Dec 25, 2019

    @shumingfan
    Contributor

    We had done some experiments like loopback the signal inside/outside of codec when pulse noise happened. We heard the sound from the headset mic to the headphone. The sound is OK.
    Another test is that AP(Audio Precision) outputs the signal to SoC instead of rt5682i codec. This issue still happened.
    This issue we are discussing on Google issue tracker and please check the website below.
    https://partnerissuetracker.corp.google.com/issues/145640941

  7. added
    hardwareIssues caused by hardware (e.g. board design)
    CMLApplies to Comet Lake platform
    on Jan 10, 2020
  8. aiChaoSONG commented on Jan 13, 2020

    @aiChaoSONG
    CollaboratorAuthor

    this issue is not a sof issue nor kernel issue, close for now

  9. aiChaoSONG commented on Feb 25, 2020

    @aiChaoSONG
    CollaboratorAuthor

    Codecs seems fine, reopen

  10. slawblauciak commented on Feb 25, 2020

    @slawblauciak
    Collaborator

    Is this reproducible on the high DSP clock?

  11. bardliao commented on Feb 26, 2020

    @bardliao
    Collaborator

    @aiChaoSONG As I know, Realtek suspects that is a layout or HW design issue. They provided a solution to ODM and are waiting for new HW version to verify. @shumingfan Is there any update on the status of new HW version?

  12. shumingfan commented on Feb 26, 2020

    @shumingfan
    Contributor

    @bardliao
    I think there is no new progress for now. Realtek HW AE left a comment on Google issue tracker last week.
    I post his commit here.
    [From Realtek Albert Chen]
    The issue phenomenon is completely different between ALC1011 and ALC5682.
    ALC1011 request bclk output earlier than data is to prevent some sounds disappearing while start playback.
    And currently issue is random noise happened during recording in CML and measurement I2S signal waveform on PCB, it’s a signal reflection on the clock can’t solved by add delay between CLK start and data.

    FYI, Only for reference following my thinking.
    There are two methods maybe can process signal reflection phenomenon . One is to reduce I2S driving strength and the other is to modify the I2S traces on PCB layout.
    If platform can’t adjust I2S driving strength, only waiting for ODMs to modify the PCB layout for verify this issue.

  13. bardliao commented on Feb 26, 2020

    @bardliao
    Collaborator

    Let's close it for now since Realtek is working with Google. We can reopen it if Realtek needs our help.

  14. keyonjie commented on Mar 11, 2020

    @keyonjie
    Contributor

    Hi @aiChaoSONG can you try the method provided by Albert to check if the noise is from ADC via the 5682 A-D D-A loopback feature?

    Please following sequence setup.

    1. modify drivers/base/regmap/regmap-debugfs.c to enable regmap write permission
    --- a/drivers/base/regmap/regmap-debugfs.c
    +++ b/drivers/base/regmap/regmap-debugfs.c
    @@ -274,7 +274,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
                                      count, ppos);
    }
    
    -#undef REGMAP_ALLOW_WRITE_DEBUGFS
    +#define REGMAP_ALLOW_WRITE_DEBUGFS
    #ifdef REGMAP_ALLOW_WRITE_DEBUGFS
    
    1. enable ADDA path in rt5682i internal while recording noise happened
    # sudo -i
    # cd /sys/kernel/debug/regmap/i2c-10EC5682\:00/
    # echo 0029 4040 > registers
    
    1. run aplay and check if there is noise rendered to the headset when the arecord is recording noise.
  15. aiChaoSONG commented on Mar 11, 2020

    @aiChaoSONG
    CollaboratorAuthor

    @keyonjie

  16. keyonjie commented on Mar 11, 2020

    @keyonjie
    Contributor

    Thanks @aiChaoSONG

    So next step let's try if we can reproduce similar issue with nocodec SSP LBM feature.

    Using any other verified inputs(e.g. input from AP, from rt5651, DMIC injector, ...) to reproduce it can help for analyzing also.

  17. aiChaoSONG commented on Mar 12, 2020

    @aiChaoSONG
    CollaboratorAuthor

    @keyonjie I tried nocodec kernel and tplg:

    • only arecord, run arecord 30 times or pause-release
    • aplay fixed level wave, and arecord, run arecord 30 times or pause-release
    • aplay /dev/zero, and arecord, run arecord 30 times or pause-release
    • aplay a normal music, and arecord, run arecord 30 times or pause-release
      none of the above test reproduced the issue. Very wired.
  18. lancedkhou commented on Mar 12, 2020

    @lancedkhou

    @aiChaoSONG
    The noise symptom might be low reproduction rate in a certain sku of SoC.
    Normally I will use test scripts to reproduce.

    Let me mail you test scripts to see whether it helps.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CMLApplies to Comet Lake platformbugSomething isn't working as expectedhardwareIssues caused by hardware (e.g. board design)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions