Re: [PATCH 0/2] soundwire: Suspend and resume asynchronously
From: Richard Fitzgerald
Date: Mon Nov 30 2026 - 06:35:39 EST
On 27/11/2026 3:00 pm, Paul Menzel wrote:
...
Their span is 28.9 ms. With both patches, the callbacks overlap, and the
span drops to 17.1 ms (median of five s2idle cycles each, sleepgraph with
the device callback trace events). It is on the critical path of the resume
with the panel on, right behind SOF, which waits for i915 through its
device link.
Patch 1 marks the generic manager and peripheral devices, patch 2 the Intel
link devices. The SHIM registers are shared by the links; patch 2 explains
why the multi-link SYNC arm and SYNCGO sequence in intel_start_bus()
tolerates two links interleaving. It is the part I am least sure about, so
please check it. The second link’s power-up waits on shim_lock, so in 49 of
50 traced cycles the start-up was serial anyway; in one cycle both links
were armed before the first SYNCGO, and the bus came up fine. If you
prefer, I can serialize intel_start_bus() across links instead; it takes
about 0.1 ms per link.
Codex GPT-Astra-ultra report:
HEAD~1 (9fef13a61342) can cause a same-link resume timeout
Sibling codecs can now start their resume timeouts together. The bus
still initializes one peripheral at a time on each link. It signals
completion only after that peripheral's update_status() returns. A
codec can therefore time out while the bus initializes its siblings.
[1, 2]
Meteor Lake supports four TAS2783 amplifiers on one link. After power
loss, each amp can wait up to three seconds for a firmware download.
Its resume callback allows five seconds for initialization. [3, 4]
In a timing model, each amp takes 1.5 seconds to initialize. With
synchronous callbacks in enumeration order, all four succeed. With
concurrent waits, the fourth amp times out at five seconds and skips
its regcache sync. Its initialization completes at six seconds. The
Dell test had one codec per link, so it could not exercise this case.
I would keep cross-link parallelism and either preserve same-link
ordering for these devices or account for time spent behind siblings
when setting the timeout.
HEAD (2818746b2ca5) leaves one Intel resume ordering untested
Link B can arm and stall before writing CONFIG_UPDATE. Link A can
then issue SYNCGO, clearing B's CMDSYNC. In the overlap reported in
the commit, both links wrote CONFIG_UPDATE before the first SYNCGO.
Intel documents CMDSYNC as holding command execution. Each link also
polls its own CONFIG_UPDATE before issuing a hardware reset. I found
no demonstrated failure from the early SYNCGO. I would test it by
pausing B after it arms and letting A issue SYNCGO. [5, 6]
Child-driver ordering
I found no new deadlock in the drivers reviewed. ASoC normally links
the card to each component. The paired Qualcomm WCD drivers explicitly
order RX and TX. SDCA function devices retain parent-child ordering.
[7, 8]
CS35L56 protects its once-per-suspend firmware delay with a mutex.
It asserts shared RESET in late suspend and releases it in early
resume. The PM phase barriers separate both operations from every
amp's normal register access. [9, 10]
No SoundWire device was available locally. The TAS2783 result comes
from the code and a timing model. Actual amp initialization times and
the Intel early-SYNCGO case remain unverified on hardware.
Source references (paths relative to the kernel tree)
[1] drivers/soundwire/slave.c:91
[2] drivers/soundwire/bus.c:1951, 2014, 2023
[3] sound/soc/intel/common/soc-acpi-intel-mtl-match.c:1077
[4] sound/soc/codecs/tas2783-sdw.c:43, 46, 1137, 1206
[5] drivers/soundwire/intel_bus_common.c:25
[6] Intel Core Processors (Series 3) I/O Registers, document 917383,
SoundWire Link Synchronization (SNDWLSYNC), offset D9C
[7] sound/soc/soc-core.c:1814
[8] sound/soc/codecs/wcd937x.c:2792
[9] sound/soc/codecs/cs35l56-sdw.c:413
[10] sound/soc/codecs/cs35l56.c:1715, 1785