]> asedeno.scripts.mit.edu Git - linux.git/commit
soundwire: Add support to lock across bus instances
authorSanyog Kale <sanyog.r.kale@intel.com>
Fri, 27 Jul 2018 09:14:13 +0000 (14:44 +0530)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 Aug 2018 04:19:48 +0000 (09:49 +0530)
commit0c4a1049cf298721eaec4553d3d5039798086e12
treedba58261d1daf9e002055aa6388b09cd1fdec9e1
parenta306a0e4a5326269b6c78d136407f08433ab5ece
soundwire: Add support to lock across bus instances

Currently, the stream concept is limited to single Master and one
or more Codecs.

This patch extends the concept to support multiple Master(s)
sharing the same reference clock and synchronized in the hardware.
Modify sdw_stream_runtime to support a list of sdw_master_runtime
for the same. The existing reference to a single m_rt is removed
in the next patch.

Typically to lock, one would acquire a global lock and then lock
bus instances. In this case, the caller framework(ASoC DPCM)
guarantees that stream operations on a card are always serialized.
So, there is no race condition and hence no need for global lock.

Bus lock(s) are acquired to reconfigure the bus while the stream
is set-up.
So, we add sdw_acquire_bus_lock()/sdw_release_bus_lock() APIs which
are used only to reconfigure the bus.

Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/bus.h
drivers/soundwire/stream.c
include/linux/soundwire/sdw.h