From: Mark Brown <broonie@kernel.org>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com, tiwai@suse.de
Subject: Re: [PATCH v2] ASoC: cs35l56: Fix probe deadlock waiting for SoundWire enumeration
Date: Thu, 13 Aug 2026 20:06:45 +0100 [thread overview]
Message-ID: <de6bc0e9-bf97-4bd8-9e6d-7b2fd608dcc3@sirena.org.uk> (raw)
In-Reply-To: <20260813173702.1534029-1-rf@opensource.cirrus.com>
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
On Thu, Aug 13, 2026 at 06:37:01PM +0100, Richard Fitzgerald wrote:
> Defer all the parts of cs35l56_component_probe() that require register
> access to a work item. This is to prevent a deadlock where
> cs35l56_component_probe() is waiting for init_completion to be signaled
> but is blocking the code that would signal it.
> static void cs35l56_wait_dsp_ready(struct cs35l56_private *cs35l56)
> {
> /* Wait for patching to complete */
> + flush_work(&cs35l56->deferred_component_init_work);
> flush_work(&cs35l56->dsp_work);
> }
>
This can be called from asoc_sdw_cs_spk_rtd_init() when limiting the
volume, that's still synchronous while setting up the card - the main
Speaker Volume control uses cs35l56_dspwait_{get,put}_volsw() and when
we set up the volume limit we at least read the current volume. The
deferred work will block on init_completion and error out if that times
out but init_completion is still signalled in the callback that's
blocked waiting for probe().
AFAICT we always try to limit the volume for these speakers?
I think the component registration needs to be moved out of probe into a
work item...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-08-13 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 17:37 Richard Fitzgerald
2026-08-13 19:06 ` Mark Brown [this message]
2026-08-14 9:08 ` Richard Fitzgerald
2026-08-14 12:39 ` Mark Brown
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=de6bc0e9-bf97-4bd8-9e6d-7b2fd608dcc3@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.com \
--cc=tiwai@suse.de \
/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®