Forráskód Böngészése

asoc: kona: enable us/euro function for analog type-c headset

mbhc_mbhc_cfg.swap_gnd_mic is not initialized for analog type-c
headset on Kona which causes headset detection fails.
When analog type-c headset function is enabled on device, initialize
swap_gnd_mic to msm_usbc_swap_gnd_mic to resolve this issue.

Change-Id: Ia8244e41cbfa7c8844b761ff129a7d2cced0dacf
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 6 éve
szülő
commit
a60b408c5a
1 módosított fájl, 9 hozzáadás és 0 törlés
  1. 9 0
      asoc/kona.c

+ 9 - 0
asoc/kona.c

@@ -6164,6 +6164,15 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
 		wcd_mbhc_cfg.swap_gnd_mic = msm_swap_gnd_mic;
 	}
 
+	if (wcd_mbhc_cfg.enable_usbc_analog)
+		wcd_mbhc_cfg.swap_gnd_mic = msm_usbc_swap_gnd_mic;
+
+	pdata->fsa_handle = of_parse_phandle(pdev->dev.of_node,
+					"fsa4480-i2c-handle", 0);
+	if (!pdata->fsa_handle)
+		dev_dbg(&pdev->dev, "property %s not detected in node %s\n",
+			"fsa4480-i2c-handle", pdev->dev.of_node->full_name);
+
 	msm_i2s_auxpcm_init(pdev);
 	pdata->dmic01_gpio_p = of_parse_phandle(pdev->dev.of_node,
 					      "qcom,cdc-dmic01-gpios",