]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: dapm: Initialise kcontrol data for mux/demux controls
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 23 Jun 2022 10:51:15 +0000 (11:51 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jun 2022 15:21:58 +0000 (16:21 +0100)
commit3314c5d0467431763a908aa3d830ff5d349d612d
treed6e081e5f97d557656450f1fda72a29a408bc384
parent8f3249ca5f604acd8575c55dc64b17fba8a7bc69
ASoC: dapm: Initialise kcontrol data for mux/demux controls

DAPM keeps a copy of the current value of mux/demux controls,
however this value is only initialised in the case of autodisable
controls. This leads to false notification events when first
modifying a DAPM kcontrol that has a non-zero default.

Autodisable controls are left as they are, since they already
initialise the value, and there would be more work required to
support autodisable muxes where the first option isn't disabled
and/or that isn't the default.

Technically this issue could affect mixer/switch elements as well,
although not on any of the devices I am currently running. There
is also a little more work to do to address the issue there due to
that side supporting stereo controls, so that has not been tackled
in this patch.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623105120.1981154-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c