]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: dapm: Add support for autodisable mux controls
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Fri, 1 May 2015 11:37:26 +0000 (12:37 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 May 2015 16:13:01 +0000 (17:13 +0100)
commit43734b9242978f59709465b947dbeeb016abafca
treedf2de90bd178c0873e526b4ea985ee97a17a29da
parent3474995b28365a568bb9fe2ae0167a7a7d5b9315
ASoC: dapm: Add support for autodisable mux controls

Commit e2f325bfc844 ("ASoC: dapm: Implement mixer input auto-disable")
added support for autodisable controls, controls whose values are only
written to the hardware when their respective widgets are powered up.
But it only added support for controls based on the mixer abstraction.

This patch add support for mux controls (DAPM controls based on the
enum abstraction) to be auto-disabled as well. As each mux can only have
a single control, there is no need to tie the autodisable widget to the
inputs (as is done for the mixer controls) it can be tided directly to
the mux widget itself.

Note that it is assumed that the first entry in a autodisable mux
control will always represent the off state for the mux and is what the
mux will be set to whilst it is disabled.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-dapm.c