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

Commit 1a111b96 authored by Karthikeyan Mani's avatar Karthikeyan Mani Committed by Gerrit - the friendly Code Review server
Browse files

asoc: msm: remove codec specific checks for kona



Add dapm widget for all analog mics, remove bolero
and mtp specific checks from probe.

Change-Id: Ibaa81fb9a655c3d0f48b95d2e882b5fecf6adb73
Signed-off-by: default avatarKarthikeyan Mani <kmani@codeaurora.org>
parent 92fccbfd
Loading
Loading
Loading
Loading
+67 −75
Original line number Diff line number Diff line
@@ -3798,6 +3798,7 @@ static const struct snd_soc_dapm_widget msm_int_dapm_widgets[] = {
	SND_SOC_DAPM_MIC("Analog Mic2", NULL),
	SND_SOC_DAPM_MIC("Analog Mic3", NULL),
	SND_SOC_DAPM_MIC("Analog Mic4", NULL),
	SND_SOC_DAPM_MIC("Analog Mic5", NULL),
	SND_SOC_DAPM_MIC("Digital Mic0", msm_dmic_event),
	SND_SOC_DAPM_MIC("Digital Mic1", msm_dmic_event),
	SND_SOC_DAPM_MIC("Digital Mic2", msm_dmic_event),
@@ -3863,6 +3864,7 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd)
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic2");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic3");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic4");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic5");

	snd_soc_dapm_ignore_suspend(dapm, "WSA_SPK1 OUT");
	snd_soc_dapm_ignore_suspend(dapm, "WSA_SPK2 OUT");
@@ -5650,7 +5652,6 @@ static int msm_init_aux_dev(struct platform_device *pdev,
	u32 wsa_max_devs;
	u32 wsa_dev_cnt;
	u32 codec_aux_dev_cnt = 0;
	u32 bolero_codec = 0;
	int i;
	struct msm_wsa881x_dev_info *wsa881x_dev_info;
	struct aux_codec_dev_info *aux_cdc_dev_info;
@@ -5765,11 +5766,6 @@ static int msm_init_aux_dev(struct platform_device *pdev,
		__func__, found);

codec_aux_dev:
	ret = of_property_read_u32(pdev->dev.of_node, "qcom,bolero-codec", &bolero_codec);
	if (ret)
		dev_dbg(&pdev->dev, "%s: No DT match for bolero codec\n", __func__);

	if (bolero_codec) {
	/* Get count of aux codec device phandles for this platform */
	codec_aux_dev_cnt = of_count_phandle_with_args(
				pdev->dev.of_node,
@@ -5834,8 +5830,6 @@ static int msm_init_aux_dev(struct platform_device *pdev,
		"%s: found %d AUX codecs registered with ALSA core\n",
		__func__, codecs_found);

	}

	card->num_aux_devs = wsa_max_devs + codec_aux_dev_cnt;
	card->num_configs = wsa_max_devs + codec_aux_dev_cnt;

@@ -6145,7 +6139,6 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
	}

	msm_i2s_auxpcm_init(pdev);
	if (strcmp(card->name, "kona-mtp-snd-card")) {
	pdata->dmic01_gpio_p = of_parse_phandle(pdev->dev.of_node,
					      "qcom,cdc-dmic01-gpios",
					       0);
@@ -6155,7 +6148,6 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
	pdata->dmic45_gpio_p = of_parse_phandle(pdev->dev.of_node,
					      "qcom,cdc-dmic45-gpios",
					       0);
	}

	ret = msm_audio_ssr_register(&pdev->dev);
	if (ret)