Repository navigation
LNL/SDW AOIC: major regression with PIO commands #4889
Copy link
Copy link
Closed
Labels
LNLApplies to Lunar Lake platformApplies to Lunar Lake platformSDWApplies to SoundWire bus for codec connectionApplies to SoundWire bus for codec connection
Description
from Intel daily tests #/result/planresultdetail/39251?model=LNLM_SDW_AIOC&testcase=check-sof-logger
[ 4685.789060] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to reset HDA controller gctl 0x1
[ 4685.789067] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to reset controller during suspend
[ 4685.789070] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to power down DSP during suspend -5
[ 4685.789076] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: can't suspend (snd_sof_runtime_suspend [snd_sof] returned -5)
[ 4688.184905] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 4688.184915] kernel: soundwire_intel soundwire_intel.link.0: intel_resume_runtime: power_up failed after bus reset: -5
[ 4688.184919] kernel: soundwire_intel soundwire_intel.link.0: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.0: -5
[ 4688.184923] kernel: SDW0-Playback: ASoC: error at __soc_pcm_open on SDW0-Playback: -5
[ 4688.184926] kernel: Jack Out: ASoC: error at dpcm_be_dai_startup on Jack Out: -5
[ 4688.184928] kernel: Jack Out: ASoC: error at dpcm_fe_dai_startup on Jack Out: -5
[ 4688.186628] kernel: soundwire_intel soundwire_intel.link.0: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.0: -22
[ 4688.191686] kernel: soundwire_intel soundwire_intel.link.2: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 4688.191701] kernel: soundwire_intel soundwire_intel.link.2: intel_resume_runtime: power_up failed after bus reset: -5
[ 4688.191707] kernel: soundwire_intel soundwire_intel.link.2: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.2: -5
[ 4688.191713] kernel: SDW2-Playback: ASoC: error at __soc_pcm_open on SDW2-Playback: -5
[ 4688.191717] kernel: Speaker: ASoC: error at dpcm_be_dai_startup on Speaker: -5
[ 4688.191721] kernel: Speaker: ASoC: error at dpcm_fe_dai_startup on Speaker: -5
[ 4688.193344] kernel: soundwire_intel soundwire_intel.link.0: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.0: -22
[ 4688.195635] kernel: soundwire_intel soundwire_intel.link.2: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.2: -22
[ 4688.200113] kernel: soundwire_intel soundwire_intel.link.1: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 4688.200116] kernel: soundwire_intel soundwire_intel.link.1: intel_resume_runtime: power_up failed after bus reset: -5
[ 4688.200119] kernel: soundwire_intel soundwire_intel.link.1: ASoC: error at snd_soc_pcm_component_pm_runtime_get on soundwire_intel.link.1: -5
[ 4688.200121] kernel: SDW1-Capture: ASoC: error at __soc_pcm_open on SDW1-Capture: -5
[ 4688.200123] kernel: Microphone: ASoC: error at dpcm_be_dai_startup on Microphone: -5
[ 4688.200124] kernel: Microphone: ASoC: error at dpcm_fe_dai_startup on Microphone: -5
That's super bad...
manual tests run on a different device jf-lnlm-rvp-sdw-1 show this
[ 363.370649] kernel: hdaudio ehdaudio0D7: no AFG or MFG node found
[ 363.370671] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: device init failed for hdac device
[ 367.530144] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to reset HDA controller gctl 0x1
[ 367.530180] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to reset controller during suspend
[ 367.530196] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to power down DSP during suspend -5
[ 367.530228] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: can't suspend (snd_sof_runtime_suspend [snd_sof] returned -5)
[ 373.581625] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc4_tx_msg_unlocked: ipc message send for 0x44000000|0x31400008 failed: -19
[ 373.581627] kernel: sof-audio-pci-intel-lnl 0000:00:1f.3: sof_ipc4_set_get_data: large config set failed at offset 0: -19
[ 373.671146] kernel: soundwire_intel soundwire_intel.link.0: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 373.671168] kernel: soundwire_intel soundwire_intel.link.0: intel_resume failed: -5
[ 373.671178] kernel: soundwire_intel soundwire_intel.link.0: PM: dpm_run_callback(): pm_generic_resume+0x0/0x30 returns -5
[ 373.671215] kernel: soundwire_intel soundwire_intel.link.0: PM: failed to resume: error -5
[ 373.674568] kernel: soundwire_intel soundwire_intel.link.1: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 373.674570] kernel: soundwire_intel soundwire_intel.link.1: intel_resume failed: -5
[ 373.674571] kernel: soundwire_intel soundwire_intel.link.1: PM: dpm_run_callback(): pm_generic_resume+0x0/0x30 returns -5
[ 373.674575] kernel: soundwire_intel soundwire_intel.link.1: PM: failed to resume: error -5
[ 373.677853] kernel: soundwire_intel soundwire_intel.link.2: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 373.677855] kernel: soundwire_intel soundwire_intel.link.2: intel_resume failed: -5
[ 373.677856] kernel: soundwire_intel soundwire_intel.link.2: PM: dpm_run_callback(): pm_generic_resume+0x0/0x30 returns -5
[ 373.677858] kernel: soundwire_intel soundwire_intel.link.2: PM: failed to resume: error -5
[ 373.681192] kernel: soundwire_intel soundwire_intel.link.3: intel_link_power_up: hdac_bus_eml_sdw_power_up failed: -5
[ 373.681193] kernel: soundwire_intel soundwire_intel.link.3: intel_resume failed: -5
[ 373.681194] kernel: soundwire_intel soundwire_intel.link.3: PM: dpm_run_callback(): pm_generic_resume+0x0/0x30 returns -5
[ 373.681196] kernel: soundwire_intel soundwire_intel.link.3: PM: failed to resume: error -5
[ 373.787757] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: IP_MCP_CONTROL_SW_RST is not cleared
[ 373.789266] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: MCP_CONTROL_CMD_RST is not cleared
[ 373.789363] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: MCP_CONTROL_SOFT_RST is not cleared
[ 373.790132] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: MCP_CONTROL_CLK_STOP_CLR is not cleared
[ 373.790136] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: MCP_CONFIG_UPDATE_BIT is not cleared
[ 373.790138] kernel: soundwire_intel soundwire_intel.link.3: sdw_cdns_clock_stop failed: MCP_CONTROL_HW_RST is not cleared
[ 373.790155] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: IP_MCP_CONTROL_SW_RST is not cleared
[ 373.790159] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: MCP_CONTROL_CMD_RST is not cleared
[ 373.790160] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: MCP_CONTROL_SOFT_RST is not cleared
[ 373.790162] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: MCP_CONTROL_CLK_STOP_CLR is not cleared
[ 373.790175] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: MCP_CONFIG_UPDATE_BIT is not cleared
[ 373.790177] kernel: soundwire_intel soundwire_intel.link.2: sdw_cdns_clock_stop failed: MCP_CONTROL_HW_RST is not cleared
[ 373.790189] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: IP_MCP_CONTROL_SW_RST is not cleared
[ 373.790192] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: MCP_CONTROL_CMD_RST is not cleared
[ 373.790194] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: MCP_CONTROL_SOFT_RST is not cleared
[ 373.790195] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: MCP_CONTROL_CLK_STOP_CLR is not cleared
[ 373.790198] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: MCP_CONFIG_UPDATE_BIT is not cleared
[ 373.790209] kernel: soundwire_intel soundwire_intel.link.1: sdw_cdns_clock_stop failed: MCP_CONTROL_HW_RST is not cleared
[ 373.790220] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: IP_MCP_CONTROL_SW_RST is not cleared
[ 373.790245] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: MCP_CONTROL_CMD_RST is not cleared
[ 373.790247] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: MCP_CONTROL_SOFT_RST is not cleared
[ 373.790249] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: MCP_CONTROL_CLK_STOP_CLR is not cleared
[ 373.790251] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: MCP_CONFIG_UPDATE_BIT is not cleared
[ 373.790253] kernel: soundwire_intel soundwire_intel.link.0: sdw_cdns_clock_stop failed: MCP_CONTROL_HW_RST is not cleared
which is even worse - something is clearly not quite right.
We'll need to bisect this one further, I don't recall seeing all this before. @fredoh9 @marc-hb @bardliao @kv2019i @ujfalusi FYI
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
LNLApplies to Lunar Lake platformApplies to Lunar Lake platformSDWApplies to SoundWire bus for codec connectionApplies to SoundWire bus for codec connection
Activity
plbossart commentedon Mar 28, 2024
It looks like this is an issue with kmod-load-unload tests that get stuck, and then suspend happens due to idleness and everything goes South
TPLG=/lib/firmware/intel/sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg MODEL=LNLM_SDW_AIOC SOF_TEST_INTERVAL=5 /root/sof-test/test-case/check-kmod-load-unload.sh |
I guess we need to sort this out...I don't recall seeing all this when I was doing all my LNL BPT/BRA work a couple of months ago.
@bardliao if you can reproduce/confirm the issue that would be great.
marc-hb commentedon Mar 29, 2024
I don't remember anything that bad recently so it should be bisectable somehow.
plbossart commentedon Mar 29, 2024
I went back to the last PR I tested on this platform, which was precisely aimed at fixing kmod-load-unload issues
#4849 commit 32f632b
With this branch, I don't see any error proper at the kernel level. The sof-test do fail however, but I have no explanation for the results.
log.txt
plbossart commentedon Mar 29, 2024
The firmware boot complete log is show in dmesg
[ 1099.218270] snd_sof:snd_sof_run_firmware: sof-audio-pci-intel-lnl 0000:00:1f.3: firmware boot complete
But somehow we need to wait a bit on this platform.
The boot complete is only shown in the second filter. The boot takes a bit more time, probably because of some delay somewhere.
@marc-hb @fredoh9 can you remind me how this is configured?
plbossart commentedon Mar 29, 2024
At any rate, this error is 100% reproducible with the latest kernel topic/sof-dev commit f3f97ec
sof-test/tools/kmod/sof_remove.sh
sof-test/tools/kmod/sof_insert.sh
This also happens with the PR #4849 merged at commit b506cd8
So my money is on merges between
a) the base of PR #4849
Merge pull request #4805 from ujfalusi/merge/sound-upstream-20240205 8ea8586
b) intermediate point
Merge pull request #4815 from ujfalusi/merge/sound-upstream-20240213
1cf5eac
c)
and the base where this PR #4849 was merged.
Merge pull request #4850 from plbossart/merge/sound-upstream-20240306 19db44b
Gah.
plbossart commentedon Mar 29, 2024
b) seems to work fine, so now bisecting between b) and c)...
plbossart commentedon Mar 29, 2024
Very surprising results @ujfalusi @marc-hb
Revert "ASoC: SOF: Intel: hda-bus: Use PIO mode for Lunar Lake"
plbossart commentedon Mar 29, 2024
I can confirm that reverting this commit solves the issue on LNL SDW AOIC - no problem with the controller. Without this patch, we can see this error 100% during kmod load/unload tests
[-]LNL/SDW AOIC tests fail big time[/-][+]LNL/SDW AOIC: major regression with PIO commands[/+]plbossart commentedon Mar 29, 2024
@kv2019i @ujfalusi comments welcome. There are three possible explanations I could come up with:
a) the SoundWire solution relies on hdac_hda for LNL, so maybe setting the pio has a side effect in the SoundWire flows?
b) there's something problematic with the PIO commands used for DisplayAudio and this has ripple effects.
c) the PIO commands require something additional to make sure all in-flights command complete before resetting the controller
At any rate it's urgent that LNL be added to kernel PR CI and the daily tests looked at more closely.
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear
ujfalusi commentedon Apr 2, 2024
That series should have only effect on CORB/RIRB handling, which afaik only used for HDA links, not SDW.
ujfalusi commentedon Apr 2, 2024
d) what about the WAKE_STS clear patch? The PIO mode somehow brought this deficit up? Doing that only for SDW where the CORB should not been used in the first place?
ujfalusi commentedon Apr 2, 2024
@plbossart, @marc-hb, just for the record: before merging #4844 we run several rounds of LNL tests in CI (I think they were daily tests) on it and all came back clean.
ujfalusi commentedon Apr 2, 2024
@plbossart, with this diff we will know if SDW is using the command interface on LNL:
then
ujfalusi commentedon Apr 2, 2024
Interestingly the issue is visible even before the PIO mode, see test result 38429, it is from 01.03.2024, so it is not caused by the PIO support we just overlooked it before...
I'm not sure which is the better thing.
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear