mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-25 16:19:48 +02:00
ASoC: cs42l43: Disable headphone clamps during type detection
[ Upstream commit 70ad2e6bd1 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0ab50f622f
commit
4c017ff3d7
@@ -642,6 +642,10 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
|
||||
|
||||
reinit_completion(&priv->type_detect);
|
||||
|
||||
regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
|
||||
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK,
|
||||
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK);
|
||||
|
||||
cs42l43_start_hs_bias(priv, true);
|
||||
regmap_update_bits(cs42l43->regmap, CS42L43_HS2,
|
||||
CS42L43_HSDET_MODE_MASK, 0x3 << CS42L43_HSDET_MODE_SHIFT);
|
||||
@@ -653,6 +657,9 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
|
||||
CS42L43_HSDET_MODE_MASK, 0x2 << CS42L43_HSDET_MODE_SHIFT);
|
||||
cs42l43_stop_hs_bias(priv);
|
||||
|
||||
regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
|
||||
CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK, 0);
|
||||
|
||||
if (!time_left)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user