[PATCH 0/2] soundwire: roll back failed master registration
From: Baek Kyu, Kim
Date: Mon Oct 19 2026 - 14:04:23 EST
A failed master registration can leave partial port allocations in the
SoundWire core. The Qualcomm driver also ignores registration errors and
can retain reservations from a failed attempt, so hw_params may report
success with incomplete master registration.
Patch 1 makes core master port allocation atomic and restores the state
changed by failed configuration. Patch 2 depends on patch 1 and restores
the Qualcomm port bitmap before propagating the registration error.
Please apply the patches in this order.
Tested with ARM64 QEMU KUnit through real SoundWire registration APIs,
Qualcomm hw_params and the ASoC wrapper, using synthetic devices and
task-scoped allocation failure injection. The baseline and a return-only
alternative each pass 2 of 8 tests; the complete series passes all 8.
KASAN and lockdep were enabled. Product-only ARM64 LLVM W=1 SoundWire
object builds and strict checkpatch also pass. No physical Qualcomm
SoundWire hardware or audio playback/capture was tested.
Baek Kyu, Kim (2):
soundwire: stream: roll back failed master registration
soundwire: qcom: restore port reservations on registration failure
drivers/soundwire/qcom.c | 26 ++++++++++++++------------
drivers/soundwire/stream.c | 35 +++++++++++++++++++++++++++++------
2 files changed, 43 insertions(+), 18 deletions(-)
base-commit: 58161ead29e50d70a317ea26b472e0c7508e69da