]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core - PCM mutex per rtd
authorLiam Girdwood <lrg@ti.com>
Thu, 9 Jun 2011 16:04:39 +0000 (17:04 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 9 Jun 2011 18:29:29 +0000 (19:29 +0100)
commit7862812ac91cd91f93aa1fbd87acdd6c0eb5e669
tree9ea917827ed56fc655c3528431dfb234e8231660
parent6921615887cad4ab74180c92bc3d94ef84ebc257
ASoC: core - PCM mutex per rtd

In preparation for the new ASoC Dynamic PCM support (AKA DSP support).

The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
at runtime between the PCM device end (or Frontend - FE) and the physical DAI
(Backend - BE) using regular kcontrols (just like a hardware CODEC routes
audio in the analog domain). The Dynamic PCM core therefore must be
able to call PCM operations for both the Frontend and Backend(s) DAIs at
the same time.

Currently we have a global pcm_mutex that is used to serialise
the ASoC PCM operations. This patch removes the global mutex
and adds a mutex per RTD allowing the PCM operations to be reentrant and
allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
could configure multiple backend DAI hw_params() with similar or different
hw parameters at the same time.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-pcm.c