asoc: tegra: aic326x: Don't disable clock if call is active
Rahul Mittal [Wed, 17 Apr 2013 07:00:37 +0000 (12:00 +0530)]
Don't disable codec clock if voice call is going on
Bug 1272679

Change-Id: I80e9e6922cdfd728128486c492299c08ea745f3c
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/220089
Reviewed-by: Vijay Mali <vmali@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

sound/soc/tegra/tegra_aic326x.c

index dbcab64..5564820 100644 (file)
@@ -1430,7 +1430,7 @@ static int tegra_aic326x_suspend_post(struct snd_soc_card *card)
        if (gpio_is_valid(gpio->gpio))
                disable_irq(gpio_to_irq(gpio->gpio));
 
-       if (machine->clock_enabled) {
+       if (machine->clock_enabled && !machine->is_call_mode) {
                machine->clock_enabled = 0;
                tegra_asoc_utils_clk_disable(&machine->util_data);
        }
@@ -1452,7 +1452,7 @@ static int tegra_aic326x_resume_pre(struct snd_soc_card *card)
                enable_irq(gpio_to_irq(gpio->gpio));
        }
 
-       if (!machine->clock_enabled) {
+       if (!machine->clock_enabled && !machine->is_call_mode) {
                machine->clock_enabled = 1;
                tegra_asoc_utils_clk_enable(&machine->util_data);
        }