Skip to content

[bug] suspend/resume test failed with warning on TGLU-SDCA #2877

Closed

Description

@keqiaozhang

Describe the bug
CI detected this issue on TGLU-SDCA(SDW 0.6) device. kernel warning:

===========================>>
[ 6293.883414] kernel: rt711-sdca sdw:0:25d:711:1: Unable to sync register 0x40400f09. -61
<<===========================

[23658.656382] soundwire sdw-master-3: SDW Slave Addr: 30025d071401
[23658.656384] soundwire sdw-master-3: SDW Slave class_id 0x01, mfg_id 0x025d, part_id 0x0714, unique_id 0x0, version 0x3
[23658.656385] soundwire sdw-master-3: Slave already registered, reusing dev_num:1
[23658.656490] rt1316-sdca sdw:2:25d:1316:1: Configured bus base 1, scale 3, mclk 19200000, curr_freq 4800000
[23658.656494] rt1316-sdca sdw:1:25d:1316:1: Configured bus base 1, scale 3, mclk 19200000, curr_freq 4800000
[23658.656572] soundwire_intel soundwire_intel.link.0: Msg ignored for Slave 1
[23658.656694] rt711-sdca sdw:0:25d:711:1: Unable to sync register 0x40400f09. -61
[23658.656706] soundwire_intel soundwire_intel.link.3: Msg ignored for Slave 0
[23658.656707] soundwire sdw-master-3: No more devices to enumerate

But audio still can work after this warning and no errors in sof-logger

To Reproduce
./check-suspend-resume.sh -l 50

Reproduction Rate
100%

Environment
Kernel Branch: topic/sof-dev
Kernel Commit: b7cd5a3
SOF Branch: main
SOF Commit: b5b244f
platform:TGLU_SKU0A32_SDCA

Activity

  1. added
    bugSomething isn't working
    TGLApplies to Tiger Lake platform
    on Apr 28, 2021
  2. plbossart commented on Apr 28, 2021

    @plbossart
    Member

    @keqiaozhang please attach the entire dmesg/slogger log, it's not possible to check if that happens on suspend or resume. Or at least a daily test ID for reference. Thank you.

  3. plbossart commented on Apr 28, 2021

    @plbossart
    Member

    This comes from daily test 3577
    dmesg.txt

    the sequence looks like a Command_Ignored reply, as if the register is not implemented.

    [ 6287.958869] kernel: soundwire_intel soundwire_intel.link.0: intel_suspend: pm_runtime status: suspended
    [ 6293.878173] kernel: soundwire_intel soundwire_intel.link.0: intel_resume: pm_runtime status was suspended, forcing active
    [ 6293.878181] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: powering up all links
    [ 6293.878182] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: first link up, programming SYNCPRD
    [ 6293.879493] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x2 // RT711 is attached as Device 0
    [ 6293.880001] kernel: soundwire_intel soundwire_intel.link.0: Msg ignored for Slave 0 // not an error, normal end of enumeration after programming Device number
    [ 6293.880044] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x21 // RT711 is attached as Device 1 and unattached as Device 0
    [ 6293.883048] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x40 // RT711 signals an Alert as Device1
    [ 6293.883331] kernel: soundwire_intel soundwire_intel.link.0: Msg ignored for Slave 1 // NOT GOOD!
    [ 6293.883414] kernel: rt711-sdca sdw:0:25d:711:1: Unable to sync register 0x40400f09. -61 // register access status -ENODATA
    [ 6293.884017] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x20 // RT711 is back to Attached as Device1
    

    @shumingfan can you please take a look? This doesn't look like a bus issue, the device never lost sync here.

  4. plbossart commented on Apr 28, 2021

    @plbossart
    Member

    In case this register is actually implemented in the device, this could be a problem with the paging management and we access the right offset but in the wrong page. That'd be tricky to debug :-(

  5. plbossart commented on May 3, 2021

    @plbossart
    Member

    This is reproduced in Intel daily tests 3673, so not an isolated incident.

  6. plbossart commented on May 4, 2021

    @plbossart
    Member

    Unless I am mistaken, this register address decodes as Function 1, entity 0x1E, control selector 1, control num 1?
    that should be USER_FU1E and the mute control.

    That looks inconsistent, the function 0x01 is JACK_CODEC, but the defaults are

    	{ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_VOLUME, CH_L), 0x00 },
    	{ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_VOLUME, CH_R), 0x00 },

    for MIC_ARRAY which should be function 0x02...

    { SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_VOLUME, CH_L), 0x00 },
    

    @shumingfan @jack-cy-yu @oder-chiou help!

  7. shumingfan commented on May 4, 2021

    @shumingfan

    @plbossart Sorry, I missed your message. I checked this issue that the problem comes from ca5118c. It is a copy/paste error by my fault.

    The SDCA control should use Function 1 in the rt711_sdca_set_fu1e_capture_ctl function.
    I will send the patch to upstream soon.

    @@ -683,13 +683,13 @@ static int rt711_sdca_set_fu1e_capture_ctl(struct rt711_sdca_priv *rt711)
            ch_r = (rt711->fu1e_dapm_mute || rt711->fu1e_mixer_r_mute) ? 0x01 : 0x00;
    
            err = regmap_write(rt711->regmap,
    -                       SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT711_SDCA_ENT_USER_FU1E,
    +                       SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT711_SDCA_ENT_USER_FU1E,
                            RT711_SDCA_CTL_FU_MUTE, CH_L), ch_l);
            if (err < 0)
                    return err;
    
            err = regmap_write(rt711->regmap,
    -                       SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT711_SDCA_ENT_USER_FU1E,
    +                       SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT711_SDCA_ENT_USER_FU1E,
                            RT711_SDCA_CTL_FU_MUTE, CH_R), ch_r);
            if (err < 0)
                    return err;
    
  8. plbossart commented on May 4, 2021

    @plbossart
    Member

    fixed

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

    TGLApplies to Tiger Lake platformbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions