ASoC: wm8998: Correct handling of input muxes
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 25 Sep 2017 11:55:07 +0000 (12:55 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 25 Sep 2017 15:59:48 +0000 (16:59 +0100)
commitd24e95f8757e9df5d7a9f56448e609cabe611d0a
tree2d82c7ea00ca02eb431a928b17d7c914a9d66fd4
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
ASoC: wm8998: Correct handling of input muxes

Currently, wm8998 has two input mux controls on IN1 and attempts to
switch these together when the A position is configured to be in digital
mode. This is because the digital mode requires pins from both the L and
R channels. However, this doesn't work as intended because whilst the
registers on the chip are changed the corresponding DAPM
representation is only updated for the mux actually being changed by the
user. The DAPM graph being out of sync with the hardware can cause some
odd issues with incorrect things being powered etc.

To avoid this issue and simplify the code somewhat, simply let the user
set the muxes as they desire. If they set an invalid configuration they
might not get audio from the DMIC but most of the chip requires you to
set a valid audio route to get audio.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8998.c