Re: [PATCH 0/2] soundwire: Suspend and resume asynchronously
From: Pierre-Louis Bossart
Date: Mon Nov 30 2026 - 09:31:28 EST
> 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.
makes sense to me, the enumeration is indeed serialized by construction
and the inits are also done in sequence. Doing a parallel resume does
not bring any benefits given the serial nature of enumeration, init and
command/control.
> 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]
I believe the analysis is correct, the sequence 'sync_arm+config update'
should be protected. It's probably a very unlikely issue, given that
sync_go will only happen on a 4kHz frequency and that's more than enough
to write CONFIG_UPDATE.
We should probably follow what's been done for sync_go, i.e. have an
unlocked version and take the shim_lock in intel_bus_common.c.