diff options
author | Gopikrishnaiah Anandan <agopik@codeaurora.org> | 2013-07-26 18:29:57 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2013-09-04 17:24:00 -0700 |
commit | 941d108085c817fc3cd47e22988af94a30f24717 (patch) | |
tree | 63112cb91daeeb07efb99b561661e48732741108 /sound/soc/msm/msm8226.c | |
parent | 1031f7f0e095e043e4e8721d63ff53a93d46d87d (diff) |
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: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Diffstat (limited to 'sound/soc/msm/msm8226.c')
-rw-r--r-- | sound/soc/msm/msm8226.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/sound/soc/msm/msm8226.c b/sound/soc/msm/msm8226.c index bd247b2b1632..8034527ad117 100644 --- a/sound/soc/msm/msm8226.c +++ b/sound/soc/msm/msm8226.c @@ -1616,15 +1616,6 @@ static int msm8226_asoc_machine_probe(struct platform_device *pdev) 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; platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, pdata); @@ -1664,6 +1655,26 @@ static int msm8226_asoc_machine_probe(struct platform_device *pdev) ret = -ENODEV; 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, "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"); 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, "qcom,prim-auxpcm-gpio-set", &auxpcm_pri_gpio_set); if (ret) { |