From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: vkoul@kernel.org, broonie@kernel.org
Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com,
kai.vehmanen@linux.intel.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH v4 0/4] Allow SoundWire devices to communicate during remove
Date: Tue, 24 Nov 2026 16:09:57 +0000 [thread overview]
Message-ID: <20261124161001.702882-1-ckeepax@opensource.cirrus.com> (raw)
Currently on Intel systems SoundWire drivers can't communicate with the
device during driver removal. This is primarily because the IRQs are
disabled before the driver remove callback is run. The result of this is
such transactions timeout causing a) a lot of errors in the log and b)
driver remove to take a very long time.
This issue affects cs42l43 and cs42l45, primarily due to both using
regmap IRQ.
soundwire_intel soundwire_intel.link.0: IO transfer timed out, cmd 3 device 6 addr 5d len 1
soundwire sdw-master-0-0: trf on Slave 6 failed:-110 write addr 5d count 0
sdca_class sdw:0:0:01fa:4245:01: Failed to sync masks in 5d
As regmap IRQ is torn down it will mask the interrupts that are
removed. However, there are many valid reasons a driver might want
communicate with the device during removal, others would include
disabling jack detection, putting the device into the lowest possible
power state to save power, etc.
This patch set attempts to address this problem trying to locate the
reason interrupts are disabled, fixing that and then leaving the IRQs
enabled for the remove callback.
Thanks,
Charles
Changes since v3:
- Add IRQ chip to the Intel HDA stuff and use that to call the link
IRQs.
Changes since v2:
- Added a comment in the code for the splitting of device_unregister()
- Fixed missing i++ in error path if devm_add_action_or_reset() fails
during loop over links.
Changes since v1:
- Add a new helper to destroy the children on the bus separately, this
allows the IRQs to be disabled for final cleanup.
- Split device_unregister into device_del and put_device.
Charles Keepax (4):
ASoC: SOF: Intel: Add IRQ chip to distribute the SoundWire IRQ
soundwire: bus: Don't unassign dev_num before unregistering device
soundwire: bus: Expose a helper to remove devices from the bus
soundwire: intel_auxdevice: Don't disable IRQs before removing
children
drivers/soundwire/bus.c | 55 ++++++++++++++++++++++-------
drivers/soundwire/intel_auxdevice.c | 17 ++++++++-
drivers/soundwire/intel_init.c | 16 +++------
include/linux/soundwire/sdw.h | 1 +
include/linux/soundwire/sdw_intel.h | 6 ++--
sound/soc/sof/intel/hda.c | 42 ++++++++++++++++++----
sound/soc/sof/intel/hda.h | 8 +++++
7 files changed, 112 insertions(+), 33 deletions(-)
--
2.47.3
next reply other threads:[~2026-11-24 16:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 16:09 Charles Keepax [this message]
2026-11-24 16:09 ` [PATCH v4 1/4] ASoC: SOF: Intel: Add IRQ chip to distribute the SoundWire IRQ Charles Keepax
2026-11-24 16:49 ` Pierre-Louis Bossart
2026-11-24 17:06 ` Charles Keepax
2026-11-24 16:09 ` [PATCH v4 2/4] soundwire: bus: Don't unassign dev_num before unregistering device Charles Keepax
2026-11-24 16:10 ` [PATCH v4 3/4] soundwire: bus: Expose a helper to remove devices from the bus Charles Keepax
2026-11-24 16:10 ` [PATCH v4 4/4] soundwire: intel_auxdevice: Don't disable IRQs before removing children Charles Keepax
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=20261124161001.702882-1-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--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