Skip to content

Commit ee593fb

Browse files
charleskeepaxjfvogel
authored andcommitted
ASoC: cs42l43: Disable headphone clamps during type detection
[ Upstream commit 70ad2e6 ] The headphone clamps cause fairly loud pops during type detect because they sink current from the detection process itself. Disable the clamps whilst the type detect runs, to improve the detection pop performance. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250423090944.1504538-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 63affdae7ff494a9f685726f23dfafdec12fd241) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 8e402a6 commit ee593fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/soc/codecs/cs42l43-jack.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,10 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
654654

655655
reinit_completion(&priv->type_detect);
656656

657+
regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
658+
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK,
659+
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK);
660+
657661
cs42l43_start_hs_bias(priv, true);
658662
regmap_update_bits(cs42l43->regmap, CS42L43_HS2,
659663
CS42L43_HSDET_MODE_MASK, 0x3 << CS42L43_HSDET_MODE_SHIFT);
@@ -665,6 +669,9 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
665669
CS42L43_HSDET_MODE_MASK, 0x2 << CS42L43_HSDET_MODE_SHIFT);
666670
cs42l43_stop_hs_bias(priv);
667671

672+
regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
673+
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK, 0);
674+
668675
if (!time_left)
669676
return -ETIMEDOUT;
670677

0 commit comments

Comments
 (0)