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

Commit 7ced75d4 authored by Simmi Pateriya's avatar Simmi Pateriya Committed by Yeleswarapu, Nagaradhesh
Browse files

ASoC: wcd9xxx: Make vddio usage configurable



Switching to VDDIO for DCE measurement can cause
micbias to drop. If micbias is shared for handset
and headset, this can result in pop noise in
recorded data. Make this option configurable
so that it can be disable if micbias is shared.

CRs-Fixed: 562782
Change-Id: I77aa973583c482d5c0169774054627aed81d22cd
Signed-off-by: default avatarYeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
parent 8512698b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ module_param(impedance_detect_en, int,
			S_IRUGO | S_IWUSR | S_IWGRP);
MODULE_PARM_DESC(impedance_detect_en, "enable/disable impedance detect");

static bool detect_use_vddio_switch = true;
static bool detect_use_vddio_switch;

struct wcd9xxx_mbhc_detect {
	u16 dce;
@@ -1767,6 +1767,7 @@ wcd9xxx_codec_get_plug_type(struct wcd9xxx_mbhc *mbhc, bool highhph)

	/* GND and MIC swap detection requires at least 2 rounds of DCE */
	BUG_ON(NUM_DCE_PLUG_INS_DETECT < 2);
	detect_use_vddio_switch = mbhc->mbhc_cfg->use_vddio_meas;

	/*
	 * There are chances vddio switch is on and cfilt voltage is adjusted
+1 −0
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ struct wcd9xxx_mbhc_config {
	unsigned long cs_enable_flags;
	bool use_int_rbias;
	bool do_recalibration;
	bool use_vddio_meas;
};

struct wcd9xxx_cfilt_mode {
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ static struct wcd9xxx_mbhc_config mbhc_cfg = {
			    1 << MBHC_CS_ENABLE_INSERTION |
			    1 << MBHC_CS_ENABLE_REMOVAL),
	.do_recalibration = true,
	.use_vddio_meas = true,
};

struct msm_auxpcm_gpio {
+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ static struct wcd9xxx_mbhc_config mbhc_cfg = {
			    1 << MBHC_CS_ENABLE_INSERTION |
			    1 << MBHC_CS_ENABLE_REMOVAL),
	.do_recalibration = true,
	.use_vddio_meas = true,
};

struct msm_auxpcm_gpio {
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ static struct wcd9xxx_mbhc_config mbhc_cfg = {
			    1 << MBHC_CS_ENABLE_INSERTION |
			    1 << MBHC_CS_ENABLE_REMOVAL),
	.do_recalibration = false,
	.use_vddio_meas = false,
};

/*