Skip to content

TGL: RT5682-SDW S16_LE SoC Loop Playback is Noisy #1880

Closed

Description

@naveen-manohar

Issue Description:
RT5682-SDW Playback was Noisy and on debug observed that SOC output source has L/R channel phase error to Codec (PFA: Phase_err)

Further tried experiments wrt SoC Loop Playback using simultaneous arecord(muted) and aplay to observe issue happens only with S16_LE(2ch) playback file. PFA Tabulated Experiments
SoC_Loop_Playback

Recipe Used: Based on TGL_SoF_V0.3
Kernel: https://github.com/naveen-manohar/linux/commits/chrome_bp_sof-dev_debug_noise
Topology: naveen-manohar/sof@5f11032
DSP FW: SOF TGL v0_3 Beta release
Platform: TGL Reference Chromebook with Daughter Card - RT5682+Max98373 - SDW
Coreboot(SNDW): PFA coreboot_nondebug-SNDW.zip

Validation Steps to Reproduce the Issue:
Step#1: Flash the Coreboot & OS Recipe mentioned on TGL Reference Chromebook with Daughter Card - RT5682+Max98373 - SDW
Step#2: Plug Jack Headset
Step#3: Run following script for SoC Loop playback
s16-soc-output.sh.txt

Observation: Noise observed with S16_LE SoC Loop Playback File PFA
original-vs-soc_loop_playback.zip

Activity

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

    @plbossart
    Member

    @naveen-manohar can you please explain what the issue is?

    "SOC output source has phase error to Codec" is rather unclear to me.

    if you are doing a loopback inside of the codec, well of course the data will be delayed on the capture side...

  3. keqiaozhang commented on Mar 11, 2020

    @keqiaozhang

    @naveen-manohar
    Could you please send the PRs of machine driver and topology to github? I will try to reproduce your issue on my TGL device.

  4. naveen-manohar commented on Mar 11, 2020

    @naveen-manohar
    Author

    Hi @plbossart ,
    RT5682-SDW was observing headset playback noise and Realtek found that headphone L/R channel has phase error. On further analysis they found RT5682's SDW interface loop-back to check source from SOC to Codec has this phenomenon.

    To check above scenario, tried SoC Loop Playback(below code) using simultaneous arecord(muted) and aplay to observe issue happens only with S16_LE(2ch) playback file

    +++ b/drivers/soundwire/generic_bandwidth_allocation.c
    @@ -140,8 +141,8 @@ static void _sdw_compute_port_params(struct sdw_bus *bus,
                                               sdw_compute_master_ports(m_rt, &params[i],
                                                                                             port_bo, hstop);
    -                                            block_offset += m_rt->ch_count *
    -                                                                          m_rt->stream->params.bps;
    +                                           //block_offset += m_rt->ch_count *
    +                                           //                           m_rt->stream->params.bps;
                                               port_bo = block_offset;
                                }
    

    @keqiaozhang : Sure, I'm working on it, shall send it asap, ETA:ww11.4.

  5. naveen-manohar commented on Mar 11, 2020

    @naveen-manohar
    Author

    Hi @keqiaozhang :
    Please check following PRs based on TGL_SoF_V0.3, let me know if you observe any issues.
    #1885
    thesofproject/sof@d58fb7c

  6. bardliao commented on Mar 11, 2020

    @bardliao
    Collaborator

    @naveen-manohar @plbossart I just checked with Albert from Realtek. He confirmed that the phase error was originally from the testing source. I.e. They use a wav with phase error between L and R channels to do the loopback test. So, that is not from SoC

  7. naveen-manohar commented on Mar 11, 2020

    @naveen-manohar
    Author

    Thanks for the clarification @bardliao , Lets re-do the validation and close then close this issue.

  8. naveen-manohar commented on Mar 12, 2020

    @naveen-manohar
    Author

    Realtek shared additional settings in codec-driver(rt5682-sdw) with this Headset Audio Playback is Good and no-artifact is observed.
    0001-Sync-with-upstream.txt

    Appreciate the efforts of all to analyse the issue and share inputs. Closing it for now. Thanks

  9. bardliao commented on Mar 12, 2020

    @bardliao
    Collaborator

    Realtek shared additional settings in codec-driver(rt5682-sdw) with this Headset Audio Playback is Good and no-artifact is observed.
    0001-Sync-with-upstream.txt

    Appreciate the efforts of all to analyse the issue and share inputs. Closing it for now. Thanks

    I guess the key point is below :)

    • regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1,
    •   	RT5682_PM_HP_MASK, RT5682_PM_HP_HV);
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TGLApplies to Tiger Lake platformbugSomething isn't workingcodecCodec HW or driver restriction

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions