[PATCH 0/3] soundwire: revisit peripheral driver bind/unbind

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Jun 22 00:56:37 CEST 2022


This patchset fixes the driver bind/unbind cases which are not
well-supported today. I initially reported a race condition in March
2022 [1] and the more tests I ran the more timing assumptions crept to
the surface.

With this patchset, I've been able to bind the drivers in any order,
and when all dependencies were available the card is
created/registered. Likewise I was able to remove codec drivers while
the bus was still running. The initial suggestion to use
device_lock()/unlock() led to system hangs in suspend-resume that I
was unable to root-cause after weeks of tests, hence this patchset
relies on a SoundWire-specific lock doesn't interfere with other core
device locking.

I think it's a pretty important set of changes that would ideally be
merged in this kernel cycle, so that we can finally add the inclusive
'manager/peripheral' language change in the next kernel cycle.

Feedback and comments welcome.

[1] https://lore.kernel.org/alsa-devel/d0559e97-c4a0-b817-428c-d3e305390270@linux.intel.com/

Pierre-Louis Bossart (3):
  soundwire: revisit driver bind/unbind and callbacks
  soundwire: peripheral: remove useless ops pointer
  soundwire: intel: use pm_runtime_resume() on component probe

 drivers/soundwire/bus.c       | 75 ++++++++++++++++++++---------------
 drivers/soundwire/bus_type.c  | 30 +++++++++++---
 drivers/soundwire/intel.c     | 18 +++++++++
 drivers/soundwire/slave.c     |  3 +-
 drivers/soundwire/stream.c    | 53 ++++++++++++++++---------
 include/linux/soundwire/sdw.h |  8 +---
 6 files changed, 124 insertions(+), 63 deletions(-)

-- 
2.34.1



More information about the Alsa-devel mailing list