All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Vinod Koul <vkoul@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH 0/2] soundwire: Suspend and resume asynchronously
Date: Mon, 30 Nov 2026 15:12:36 +0100	[thread overview]
Message-ID: <0ece6c88-9e3d-4d30-9027-21722bea8754@linux.dev> (raw)
In-Reply-To: <8cc8a6de-a84c-4caa-a1b4-dca009731b91@opensource.cirrus.com>


> 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.

      reply	other threads:[~2026-11-30 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:00 [PATCH 0/2] soundwire: Suspend and resume asynchronously Paul Menzel
2026-11-27 15:00 ` [PATCH 1/2] soundwire: Suspend and resume managers and peripherals asynchronously Paul Menzel
2026-11-27 15:00 ` [PATCH 2/2] soundwire: intel: Suspend and resume the links asynchronously Paul Menzel
2026-11-28 11:21 ` [PATCH 0/2] soundwire: Suspend and resume asynchronously Pierre-Louis Bossart
2026-11-30 11:19 ` Richard Fitzgerald
2026-11-30 14:16   ` Pierre-Louis Bossart
2026-11-30 11:35 ` Richard Fitzgerald
2026-11-30 14:12   ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ece6c88-9e3d-4d30-9027-21722bea8754@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=rf@opensource.cirrus.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.