]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: dapm: Do not pretend to support controls for non mixer/mux widgets
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 25 Oct 2014 15:41:58 +0000 (17:41 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 28 Oct 2014 00:19:59 +0000 (00:19 +0000)
commitc467b9bbd57ce15e0c3267cbf017eb0354e6da31
tree99c5814c3be1eeaaebe7f11fe051080828b3a545
parent0051baafc293c27ebb0ca3f55f70de4c14ebb19d
ASoC: dapm: Do not pretend to support controls for non mixer/mux widgets

Controls on a path only have an effect if the sink on the path is either a
mixer or mux widget. Currently we sort of silently ignore controls on other
paths, but since they don't do anything having them on other paths does not
make much sense and it is probably safe to assume that if we see such a path
it is a mistake in the driver that registered the path. This patch modifies
snd_soc_dapm_add_path() to report an error if a path with and control is
encountered where we didn't expect a control. This also allows to simplify
the code quite a bit.

The patch also moves the connecting of the path lists out of
dapm_connect_mux() and dapm_connect_mixer() into snd_soc_dapm_add_path().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c