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

Commit 941d1080 authored by Gopikrishnaiah Anandan's avatar Gopikrishnaiah Anandan Committed by Stephen Boyd
Browse files

ASoC: msm8226: Upgrade to kernel 3.10 ASoC



ASoC frame work in 3.10 kernel defers the machine driver
probe if all required modules for sound card installation
is not initialized.

Signed-off-by: default avatarGopikrishnaiah Anandan <agopik@codeaurora.org>
parent 1031f7f0
Loading
Loading
Loading
Loading
+20 −21
Original line number Original line Diff line number Diff line
@@ -1616,15 +1616,6 @@ static int msm8226_asoc_machine_probe(struct platform_device *pdev)
		goto err;
		goto err;
	}
	}


	/* Parse AUXPCM info from DT */
	ret = msm8226_dtparse_auxpcm(pdev, &pdata->auxpcm_ctrl,
					msm_auxpcm_gpio_name);
	if (ret) {
		dev_err(&pdev->dev,
		"%s: Auxpcm pin data parse failed\n", __func__);
		goto err;
	}

	card->dev = &pdev->dev;
	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, pdata);
	snd_soc_card_set_drvdata(card, pdata);
@@ -1664,6 +1655,26 @@ static int msm8226_asoc_machine_probe(struct platform_device *pdev)
		ret = -ENODEV;
		ret = -ENODEV;
		goto err;
		goto err;
	}
	}
	ret = msm8226_prepare_codec_mclk(card);
	if (ret)
		goto err;

	mutex_init(&cdc_mclk_mutex);
	ret = snd_soc_register_card(card);
	if (ret) {
		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
			ret);
		goto err;
	}

	/* Parse AUXPCM info from DT */
	ret = msm8226_dtparse_auxpcm(pdev, &pdata->auxpcm_ctrl,
					msm_auxpcm_gpio_name);
	if (ret) {
		dev_err(&pdev->dev,
		"%s: Auxpcm pin data parse failed\n", __func__);
		goto err;
	}


	vdd_spkr_gpio = of_get_named_gpio(pdev->dev.of_node,
	vdd_spkr_gpio = of_get_named_gpio(pdev->dev.of_node,
				"qcom,cdc-vdd-spkr-gpios", 0);
				"qcom,cdc-vdd-spkr-gpios", 0);
@@ -1706,18 +1717,6 @@ static int msm8226_asoc_machine_probe(struct platform_device *pdev)
					"qcom,headset-jack-type-NO");
					"qcom,headset-jack-type-NO");
	msm8226_setup_hs_jack(pdev, pdata);
	msm8226_setup_hs_jack(pdev, pdata);


	ret = msm8226_prepare_codec_mclk(card);
	if (ret)
		goto err_lineout_spkr;

	ret = snd_soc_register_card(card);
	if (ret) {
		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
			ret);
		goto err_lineout_spkr;
	}
	mutex_init(&cdc_mclk_mutex);

	ret = of_property_read_string(pdev->dev.of_node,
	ret = of_property_read_string(pdev->dev.of_node,
			"qcom,prim-auxpcm-gpio-set", &auxpcm_pri_gpio_set);
			"qcom,prim-auxpcm-gpio-set", &auxpcm_pri_gpio_set);
	if (ret) {
	if (ret) {