]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt5651: Enable sticky mode for OVCD
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Mar 2018 14:35:54 +0000 (15:35 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 7 Mar 2018 12:51:45 +0000 (12:51 +0000)
commitd0783a31f5dd426869b89834cb967ad6b9869376
tree8350057fa7225afa89ed6f75fa7835533a317f1b
parentc8ec1b0b2dd9c174c8bd2c231828d56e63afedde
ASoC: rt5651: Enable sticky mode for OVCD

When the mic-gnd contacts are short-circuited by a headphones plug, the
hardware periodically retries if it can apply the bias-current leading to
the OVCD status flip-flopping 1-0-1 with it being 0 about 10% of the time.
This commit enables the sticky bit for the OVCD status to deal with this.

This commit also introduces 2 helper functions to deal with the OVCD
status bit, this may seem a bit overkill now, but these will also be
used in future patches.

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