asoc: tegra: rt5640: fix the machine bias standby
Dara Ramesh [Mon, 12 Nov 2012 09:32:48 +0000 (14:32 +0530)]
Before tegra_rt5640_init function get called
DAPM machine bias level set to off and again resetting
in _init function to standby causing the extern1 clock
always on.

bug 1054060

Change-Id: Id3b82bf85e45409302b0d288ca51120220514492
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/162986
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Vijay Mali <vmali@nvidia.com>

sound/soc/tegra/tegra_rt5640.c

index 82e9c67..1cd89d9 100644 (file)
@@ -583,9 +583,6 @@ static int tegra_rt5640_init(struct snd_soc_pcm_runtime *rtd)
                machine->gpio_requested |= GPIO_HP_DET;
        }
 
-       machine->bias_level = SND_SOC_BIAS_STANDBY;
-       machine->clock_enabled = 1;
-
        ret = tegra_asoc_utils_register_ctls(&machine->util_data);
        if (ret < 0)
                return ret;
@@ -771,6 +768,9 @@ static __devinit int tegra_rt5640_driver_probe(struct platform_device *pdev)
        if (ret)
                goto err_free_machine;
 
+       machine->bias_level = SND_SOC_BIAS_STANDBY;
+       machine->clock_enabled = 1;
+
        if (!gpio_is_valid(pdata->gpio_ldo1_en)) {
                machine->cdc_en = regulator_get(&pdev->dev, "ldo1_en");
                if (IS_ERR(machine->cdc_en)) {