ASoC: dapm: Consolidate MUXs and virtual MUXs
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 28 Feb 2014 07:31:11 +0000 (08:31 +0100)
committerMark Brown <broonie@linaro.org>
Sat, 1 Mar 2014 03:03:36 +0000 (12:03 +0900)
MUXs and virtual MUXs are almost identical, the only difference is that for
virtual MUX there is no hardware backing register in which setting is stored.
This patch adds code, which is similar to what we already do for DAPM mixer
controls to support virtual mixer controls, to DAPM enum controls. The new code
will check if the enum does a hardware backing register and skip over reading
and writing to the register if it has not.  This allows us to use the same code
path for both MUXs and virtual MUXs and a lot of nearly identical code can be
removed.

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

Simple merge
Simple merge