mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>,
	Vinod Koul <vkoul@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
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 11:35:01 +0000	[thread overview]
Message-ID: <8cc8a6de-a84c-4caa-a1b4-dca009731b91@opensource.cirrus.com> (raw)
In-Reply-To: <20261127150101.48880-1-pmenzel@molgen.mpg.de>

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


  parent reply	other threads:[~2026-11-30 11:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:00 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 [this message]
2026-11-30 14:12   ` Pierre-Louis Bossart

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=8cc8a6de-a84c-4caa-a1b4-dca009731b91@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=pmenzel@molgen.mpg.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®