]> rtime.felk.cvut.cz Git - can-eth-gw-linux.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)
commitb8c0dab9bf3373010e857a8d3f1b594c60a348dd
tree9ea917827ed56fc655c3528431dfb234e8231660
parent2c36c2ce00987a416bf75681742617a0f85335eb
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