Skip to content

soundwire: suppress expected unattach warnings during codec reset

Cole Leavitt linux-sound lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2soundwire: bus: downgrade expected unattach warnings to dev_dbgdrivers/soundwire/bus.c include/linux/soundwire/sdw.h+8 -20 replies
2/2ASoC: cs35l56: set unattach_pending before SoundWire system resetsound/soc/codecs/cs35l56.c+4 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Fitzgerald
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] soundwire: suppress expected unattach warnings during codec reset

On systems with CS35L56 SoundWire codecs (e.g. Lenovo ThinkPad P16 Gen3), every boot produces misleading dev_warn() messages:

cs35l56 sdw:0:2:01fa:3556:01:0: Slave 2 state check1: UNATTACHED, status was 1 cs35l56 sdw:0:2:01fa:3556:01:1: Slave 1 state check1: UNATTACHED, status was 1

These fire when the CS35L56 driver triggers a system reset after firmware download, which physically detaches the codec from the bus. This is expected and handled gracefully -- the driver waits for re-enumeration and the codec recovers within milliseconds.

The warnings were added in commit d1b328557058 ("soundwire: bus: add dev_warn() messages to track UNATTACHED devices") to debug genuine attachment failures. They remain valuable for unexpected detachments, but firing on every boot for normal codec operation degrades their diagnostic value.

This series adds a simple boolean flag (unattach_pending) to struct sdw_slave that codec drivers can set before triggering an expected detach. When set, the bus layer emits dev_dbg() instead of dev_warn() and auto-clears the flag.

Note: There is also a separate set of UNATTACHED warnings during initial multi-device enumeration, caused by the known PING frame race documented in cadence_master.c. That is a different problem with different constraints and is not addressed here.

Cole Leavitt (2):
soundwire: bus: downgrade expected unattach warnings to dev_dbg
ASoC: cs35l56: set unattach_pending before SoundWire system reset

 drivers/soundwire/bus.c       | 9 +++++++--
 include/linux/soundwire/sdw.h | 1 +
 sound/soc/codecs/cs35l56.c    | 4 ++++
 3 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.52.0