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

Commit 052cb178 authored by Bhalchandra Gajare's avatar Bhalchandra Gajare
Browse files

ASoC: msm8x10: Parse the micbias internal property



Micbias can be either internal to the codec or external onboard pull up
resistor. Parse the property from device tree to setup the micbias
appropriately.

CRs-fixed: 539445
Change-Id: I2281b9b98a00d3d4cbfb98f912eaa41274a6c8ee
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent 1e6369d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -446,6 +446,8 @@ Optional properties:
- qcom,headset-jack-type-NO: Adjust GPIO level based on the headset jack type.
- qcom,tapan-codec-9302: Indicates that this device node is for WCD9302 audio
			    codec.
- qcom,mbhc-bias-internal: Flag to indicate if internal micbias should be used
			   for headset detection.

* APQ8074 ASoC Machine driver

+3 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ static struct wcd9xxx_mbhc_config mbhc_cfg = {
	.detect_extn_cable = false,
	.insert_detect = true,
	.swap_gnd_mic = NULL,
	.use_int_rbias = false,
};

/*
@@ -1042,6 +1043,8 @@ static int msm8x10_asoc_machine_probe(struct platform_device *pdev)
	prcgr = ioremap(MSM8X10_DINO_LPASS_DIGCODEC_CMD_RCGR, 4);
	mbhc_cfg.gpio_level_insert = of_property_read_bool(pdev->dev.of_node,
						"qcom,headset-jack-type-NC");
	mbhc_cfg.use_int_rbias = of_property_read_bool(pdev->dev.of_node,
						"qcom,mbhc-bias-internal");

	spdev = pdev;
	mutex_init(&cdc_mclk_mutex);