]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: cs42l43: Reset clamp override on jack removal
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 9 Apr 2025 12:07:17 +0000 (13:07 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 9 Apr 2025 14:25:15 +0000 (15:25 +0100)
Some of the manually selected jack configurations will disable the
headphone clamp override. Restore this on jack removal, such that
the state is consistent for a new insert.

Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250409120717.1294528-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l43-jack.c

index ac19a572fe70cb52d551089816fe07b9c05d751b..20e6ab6f0d4ad7a04be004330f715f1ac9fb6a73 100644 (file)
@@ -702,6 +702,9 @@ static void cs42l43_clear_jack(struct cs42l43_codec *priv)
                           CS42L43_PGA_WIDESWING_MODE_EN_MASK, 0);
        regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CTRL,
                           CS42L43_JACK_STEREO_CONFIG_MASK, 0);
+       regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
+                          CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_MASK,
+                          CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_MASK);
        regmap_update_bits(cs42l43->regmap, CS42L43_HS2,
                           CS42L43_HSDET_MODE_MASK | CS42L43_HSDET_MANUAL_MODE_MASK,
                           0x2 << CS42L43_HSDET_MODE_SHIFT);