Repository navigation
Closed
Labels
MAX98373Issues with Max98373 codecIssues with Max98373 codecP2Critical bugs or normal featuresCritical bugs or normal featuresSDWApplies to SoundWire bus for codec connectionApplies to SoundWire bus for codec connectionTGLApplies to Tiger Lake platformApplies to Tiger Lake platformbugSomething isn't workingSomething isn't working
Description
Low-level hardware error seen in unrelated nocodec test.
Recipe:
Start Time: 2021-07-23 01:00:47 UTC
End Time: 2021-07-23 04:34:04 UTC
Kernel Branch: topic/sof-dev
Kernel Commit: d54b780
SOF Branch: main
SOF Commit: 52bc39f
Hardware: jf-tglu-volt-sdw-01
LINK0 RESUME
[ 7159.394865] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: powering up all links
[ 7159.394870] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: first link up, programming SYNCPRD
[ 7159.395915] kernel: rt5682 sdw:0:025d:5682:00: sdw_modify_slave_status: initializing enumeration and init completion for Slave 1
[ 7159.397149] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x2
[ 7159.397159] kernel: soundwire sdw-master-0: Slave attached, programming device number
[ 7159.397494] kernel: soundwire sdw-master-0: SDW Slave Addr: 20025d568200
[ 7159.397495] kernel: soundwire sdw-master-0: SDW Slave class_id 0x00, mfg_id 0x025d, part_id 0x5682, unique_id 0x0, version 0x2
[ 7159.397498] kernel: soundwire sdw-master-0: Slave already registered, reusing dev_num:1
[ 7159.397811] kernel: soundwire_intel soundwire_intel.link.0: Msg ignored for Slave 0
[ 7159.397813] kernel: soundwire sdw-master-0: No more devices to enumerate
[ 7159.397850] kernel: soundwire_intel soundwire_intel.link.0: Slave status change: 0x21
[ 7159.397854] kernel: rt5682 sdw:0:025d:5682:00: sdw_modify_slave_status: signaling enumeration completion for Slave 1
[ 7159.397964] kernel: rt5682 sdw:0:025d:5682:00: Bus clash detected before INT mask is enabled
[ 7159.720037] kernel: rt5682 sdw:0:025d:5682:00: rt5682_io_init hw_init complete: 0
[ 7159.720042] kernel: rt5682 sdw:0:025d:5682:00: sdw_handle_slave_status: signaling initialization completion for Slave 1
LINK1 RESUME
[ 7159.720964] kernel: max98373 sdw:1:019f:8373:00:7: sdw_modify_slave_status: initializing enumeration and init completion for Slave 1
[ 7159.720976] kernel: max98373 sdw:1:019f:8373:00:3: sdw_modify_slave_status: initializing enumeration and init completion for Slave 2
[ 7159.722229] kernel: soundwire_intel soundwire_intel.link.1: Slave status change: 0x2
[ 7159.722239] kernel: soundwire sdw-master-1: Slave attached, programming device number
[ 7159.722551] kernel: soundwire sdw-master-1: SDW Slave Addr: 27019f837300
[ 7159.722552] kernel: soundwire sdw-master-1: SDW Slave class_id 0x00, mfg_id 0x019f, part_id 0x8373, unique_id 0x7, version 0x2
[ 7159.722555] kernel: soundwire sdw-master-1: Slave already registered, reusing dev_num:1
[ 7159.722866] kernel: soundwire_intel soundwire_intel.link.1: Msg ignored for Slave 0
[ 7159.722867] kernel: soundwire sdw-master-1: No more devices to enumerate
[ 7159.722901] kernel: soundwire_intel soundwire_intel.link.1: Slave status change: 0x21
[ 7159.722905] kernel: max98373 sdw:1:019f:8373:00:7: sdw_modify_slave_status: signaling enumeration completion for Slave 1
[ 7159.735160] kernel: max98373 sdw:1:019f:8373:00:7: Reset completed (retry:0)
[ 7159.737899] kernel: max98373 sdw:1:019f:8373:00:7: sdw_handle_slave_status: signaling initialization completion for Slave 1
LINK1 Device1 resumed
[ 7159.743729] kernel: soundwire_intel soundwire_intel.link.1: Slave status change: 0x2
[ 7159.743739] kernel: max98373 sdw:1:019f:8373:00:7: sdw_modify_slave_status: initializing enumeration and init completion for Slave 1
LINK1 Device1 not longer ATTACHED!!
[ 7159.743749] kernel: soundwire sdw-master-1: Slave attached, programming device number
[ 7159.743986] kernel: soundwire sdw-master-1: SDW Slave Addr: 23019f837300
[ 7159.743989] kernel: soundwire sdw-master-1: SDW Slave class_id 0x00, mfg_id 0x019f, part_id 0x8373, unique_id 0x3, version 0x2
[ 7159.743993] kernel: soundwire sdw-master-1: Slave already registered, reusing dev_num:2
[ 7159.744343] kernel: soundwire_intel soundwire_intel.link.1: Msg ignored for Slave 0
[ 7159.744346] kernel: soundwire sdw-master-1: No more devices to enumerate
LINK1 All devices enumerated
[ 7159.744525] kernel: soundwire_intel soundwire_intel.link.1: Slave status change: 0x201
LINK DEVICE2 shown as having completed its enumeration
[ 7159.744532] kernel: max98373 sdw:1:019f:8373:00:3: sdw_modify_slave_status: signaling enumeration completion for Slave 2
[ 7159.756896] kernel: max98373 sdw:1:019f:8373:00:3: Reset completed (retry:0)
[ 7159.759562] kernel: max98373 sdw:1:019f:8373:00:3: sdw_handle_slave_status: signaling initialization completion for Slave 2
LINK1 Device2 resumed
[ 7159.892336] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 7159.892496] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 7160.392278] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 7160.392323] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 7162.041548] kernel: ax88179_178a 4-1:1.0 enx000ec66a790d: ax88179 - Link status is: 1
[ 7164.955865] kernel: max98373 sdw:1:019f:8373:00:7: Initialization not complete, timed out
[ 7164.955872] kernel: PM: dpm_run_callback(): acpi_subsys_resume+0x0/0x70 returns -110
[ 7164.955886] kernel: max98373 sdw:1:019f:8373:00:7: PM: failed to resume: error -110
LINK1 Device never showed up again
Metadata
Metadata
Assignees
Labels
MAX98373Issues with Max98373 codecIssues with Max98373 codecP2Critical bugs or normal featuresCritical bugs or normal featuresSDWApplies to SoundWire bus for codec connectionApplies to SoundWire bus for codec connectionTGLApplies to Tiger Lake platformApplies to Tiger Lake platformbugSomething isn't workingSomething isn't working
Activity
mengdonglin commentedon Jul 26, 2021
It may be related to
plbossart commentedon Jul 26, 2021
That's quite possible indeed @mengdonglin. I added the log from the Intel test 592 dmesg.txt
When an interrupt is received we should double-check if the device is actually attached.
bardliao commentedon Jul 28, 2021
Sorry @plbossart I am confused here. Why
max98373 sdw:1:19f:8373:0:3: sdw_modify_slave_status: initializing completion for Slave 2means device 1 (unique number 7) is no longer attached? Doesn't it mean device 2 (unique number 3) is no longer attached?plbossart commentedon Jul 28, 2021
Yes indeed, my mistake @bardliao
plbossart commentedon Aug 2, 2021
This error was seen on TGL RVP with 2 Max98373 devices
https://sof-ci.sh.intel.com/#/result/planresultdetail/5652?model=TGLU_RVP_SDW&testcase=check-suspend-resume-50
dmesg.txt
@bardliao @RanderWang is this something you've seen before on TGL RVP?
bardliao commentedon Aug 3, 2021
IIRC, it is my first time to see this issue on RT1308. We saw -61 before, but it seems to be the first time to see timed out.
RanderWang commentedon Aug 9, 2021
this is also my first time to see such issue on 1308
plbossart commentedon Aug 24, 2021
Also seen on August 17 https://sof-ci.sh.intel.com/#/result/planresultdetail/5922
soundwire: bus: add dev_warn() messages to track UNATTACHED devices
14 remaining items
plbossart commentedon Feb 16, 2022
One theoretical possibility is that we mask all Slave status interrupts at once
Which raises the possibility that we miss a device re-attaching while we are dealing with the detach event.
IIRC these events are edge-based, not level-based, so we could miss them while masking.
Maybe we should only mask the bitfield we've detected, instead of the events that were not but might happen later.
Humm, more coffee needed.
soundwire: intel: don't mask all status changes, only the detected ones
marc-hb commentedon Feb 16, 2022
We have two devices of this type being used right now. I ran some simple
journalctlcommands likeThe other device has never experienced any
Initialization not complete, timed outerror since Wed 2022-02-02 03:55:46 UTC (the start of the logs)However they have something in common, they both show this:
These warnings appeared just before each timeout error (and many other times).
They're very frequent but not regular at all, sometimes they didn't happen for days.
There's also this on only one of the two devices, every time it boots:
plbossart commentedon Feb 17, 2022
@marc-hb thank you very much for all this data mining. The two results above with the device not detected made me think of a potential lost interrupt with PR #3439. We could also force a read of the device status to see what happens without relying on the interrupt mechanism to detect issues.
This issue should be filed separately, I think this is a coreboot problem?
jf-tglu-volt-sdw-03 kernel: File kernel/firmware/acpi/sdw-RT5682-MAX98373.aml exceeding MAX_CPIO_FILE_NAME [18]
The bus clash reports show something is wrong at the lowest layer, but the fact that we actually get those reports signal that the devices are on the bus. In other words, the error happened but the device was able to recover and sync. It still shouldn't happen.
soundwire: bus: add dev_warn() messages to track UNATTACHED devices
plbossart commentedon Mar 14, 2022
#3442 was merged on Feb 23, 2022 - almost 3 weeks ago. I haven't seen any reports of new problems, but I'd like to be sure before @bardliao sends this upstream in the next kernel cycle.
@marc-hb @keqiaozhang can you help us double-check if this suspend/resume problem was seen on any test on Google Volteer or TVL_RVP_SDW?
marc-hb commentedon Mar 16, 2022
@plbossart can you be more specific, what are we looking for? I mean what specific messages in the logs, which test failures? I'm sorry but this issue is quite complex, I know absolutely nothing about soundwire and I lost the previous context entirely after a million of context switches.
plbossart commentedon Mar 17, 2022
@marc-hb we're looking for this type of error
marc-hb commentedon Mar 17, 2022
These message never appeared in TGLU_VOLT_SDW recently. The last two examples were in
10046?model=TGLU_VOLT_SDW&testcase=check-suspend-resume-50 and
10221?model=TGLU_VOLT_SDW&testcase=check-suspend-resume-50 which had already been reported above.
So it's hard to tell whether #3442 made any difference because the problem did not reproduce either between run 10221 and when 3442 was merged.
plbossart commentedon Mar 18, 2022
@marc-hb not following your logic
Test 10221 was run on 2022-02-15 22:27:23 UTC
Test 10046 was run on 2022-02-08 22:28:34 UTC
The PR was merged on Feb 23, 2022
That tells me we haven't seen this problem since this PR was merged?
marc-hb commentedon Mar 18, 2022
Yes, but we haven't seen this problem between Feb 15 and Feb 23 either. So who knows whether Feb 23 made any difference.
plbossart commentedon Mar 18, 2022
well there was no change for SoundWire between Feb15 and Feb23 so there's no real difference to be expected between the two dates.
marc-hb commentedon Mar 18, 2022
I guess what I'm saying is this bug seems to be happening so rarely that it's hard to tell whether any change makes any difference.
plbossart commentedon Apr 19, 2022
we haven't seen this problem in two months since PR #3442 was merged, closing. Patches will be sent upstream