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

Commit 62a0513d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm8998: Add support for ANC headset detection"

parents 1ad52ab5 1a5eeaa3
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -514,6 +514,8 @@ static struct wcd_mbhc_config wcd_mbhc_cfg = {
	.key_code[7] = 0,
	.linein_th = 5000,
	.moisture_en = true,
	.anc_micbias = MIC_BIAS_2,
	.enable_anc_mic_detect = false,
};

static struct snd_soc_dapm_route wcd_audio_paths_tasha[] = {
@@ -6843,15 +6845,20 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
			pdev->dev.of_node->full_name);
		dev_dbg(&pdev->dev, "Jack type properties set to default");
	} else {
		if (!strcmp(mbhc_audio_jack_type, "4-pole-jack"))
		if (!strcmp(mbhc_audio_jack_type, "4-pole-jack")) {
			wcd_mbhc_cfg.enable_anc_mic_detect = false;
			dev_dbg(&pdev->dev, "This hardware has 4 pole jack");
		else if (!strcmp(mbhc_audio_jack_type, "5-pole-jack"))
		} else if (!strcmp(mbhc_audio_jack_type, "5-pole-jack")) {
			wcd_mbhc_cfg.enable_anc_mic_detect = true;
			dev_dbg(&pdev->dev, "This hardware has 5 pole jack");
		else if (!strcmp(mbhc_audio_jack_type, "6-pole-jack"))
		} else if (!strcmp(mbhc_audio_jack_type, "6-pole-jack")) {
			wcd_mbhc_cfg.enable_anc_mic_detect = true;
			dev_dbg(&pdev->dev, "This hardware has 6 pole jack");
		else
		} else {
			wcd_mbhc_cfg.enable_anc_mic_detect = false;
			dev_dbg(&pdev->dev, "Unknown value, set to default");
		}
	}
	/*
	 * Parse US-Euro gpio info from DT. Report no error if us-euro
	 * entry is not found in DT file as some targets do not support