ASoC: rt5651: Fix bias_level confusion
authorHans de Goede <hdegoede@redhat.com>
Sun, 25 Feb 2018 10:46:49 +0000 (11:46 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 1 Mar 2018 19:13:02 +0000 (19:13 +0000)
commit984c803f9a2ad6f1d2bea0b7ef2e3c18d69fbdfd
tree369636aa90017bf01eaeaf6e0c3b4f2829bed6e0
parentd082174c99e77beb06a51c90ac61934554e516e1
ASoC: rt5651: Fix bias_level confusion

The rt5651_set_bias_level() function was turning everything off at
SND_SOC_BIAS_STANDBY, rather then at SND_SOC_BIAS_OFF, requiring the bias-
level to be raised to SND_SOC_BIAS_PREPARE before turning anything on.

This is not how the bias-levels are supposed to work, this commit fixes
this by turning everything off at the SND_SOC_BIAS_OFF level and enabling
the pwr-bits needed for minimum functionality at SND_SOC_BIAS_STANDBY.

This fixes the minimum set of pwr-bits not getting enabled when
force-enabling some dapm-supplies (e.g. for jack type detection),
which raises the bias-level to standby.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5651.c