Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b99e002e authored by Vijay Kumar Maddula's avatar Vijay Kumar Maddula Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: rouleur-mbhc: Fix pop noise heard when headset insertion



Observed pop noise during impedance discharge after
headset/headphone plugged in.
Adding 40ms delay while discharge to complete ramp down properly.

Change-Id: I7eb4ba3423660454990722579b7c7b57156c8067
Signed-off-by: default avatarVijay Kumar Maddula <quic_vmaddula@quicinc.com>
parent 5fd49711
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 */
#include <linux/module.h>
#include <linux/init.h>
@@ -459,6 +460,10 @@ static void rouleur_mbhc_get_result_params(struct rouleur_priv *rouleur,
		__func__, *zdet);
	/* Start discharge */
	regmap_update_bits(rouleur->regmap, ROULEUR_ANA_MBHC_ZDET, 0x20, 0x00);
	/* Discharge operation takes time for the HPH PA to ramp down to 0V.
	 * Add finite amunt of delay to complete ramp down.
	 */
	usleep_range(40000, 40010);
}

static void rouleur_mbhc_zdet_start(struct snd_soc_component *component,