summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorScott Peterson <speterson@nvidia.com>2013-01-10 11:13:52 -0800
committerRiham Haidar <rhaidar@nvidia.com>2013-01-15 17:17:31 -0800
commit04dd8631fed1b90dfa2a57138c21fe7fc73deacd (patch)
treee87ae53339456fdf470d5bea4e753d248d326975 /sound/soc
parent0317463dfe078f5359d1de9fe43069d82daab4a6 (diff)
asoc: tegra: Enable voice call in LP1
Enable support in audio driver for voice call while in LP1 power state. Bug 1211157 Change-Id: If63d3ad89ebc09abc3b4d306a4ca35668ca245fc Signed-off-by: Scott Peterson <speterson@nvidia.com> Reviewed-on: http://git-master/r/190369 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Rajkumar Jayaraman <rjayaraman@nvidia.com> Tested-by: Rajkumar Jayaraman <rjayaraman@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra/tegra_cs42l73.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/tegra/tegra_cs42l73.c b/sound/soc/tegra/tegra_cs42l73.c
index b1d9cfe0701a..9de766e6faee 100644
--- a/sound/soc/tegra/tegra_cs42l73.c
+++ b/sound/soc/tegra/tegra_cs42l73.c
@@ -1171,10 +1171,8 @@ static int tegra_cs42l73_suspend_post(struct snd_soc_card *card)
if (gpio_is_valid(gpio->gpio))
disable_irq(gpio_to_irq(gpio->gpio));
- if (machine->clock_enabled) {
- machine->clock_enabled = 0;
+ if (machine->clock_enabled && !machine->is_call_mode)
tegra_asoc_utils_clk_disable(&machine->util_data);
- }
return 0;
}
@@ -1185,6 +1183,9 @@ static int tegra_cs42l73_resume_pre(struct snd_soc_card *card)
struct snd_soc_jack_gpio *gpio = &tegra_cs42l73_hp_jack_gpio;
struct tegra_cs42l73 *machine = snd_soc_card_get_drvdata(card);
+ if (machine->clock_enabled && !machine->is_call_mode)
+ tegra_asoc_utils_clk_enable(&machine->util_data);
+
if (gpio_is_valid(gpio->gpio)) {
val = gpio_get_value(gpio->gpio);
val = gpio->invert ? !val : val;
@@ -1192,11 +1193,6 @@ static int tegra_cs42l73_resume_pre(struct snd_soc_card *card)
enable_irq(gpio_to_irq(gpio->gpio));
}
- if (!machine->clock_enabled) {
- machine->clock_enabled = 1;
- tegra_asoc_utils_clk_enable(&machine->util_data);
- }
-
return 0;
}
@@ -1224,9 +1220,9 @@ static int tegra_cs42l73_set_bias_level_post(struct snd_soc_card *card,
level == SND_SOC_BIAS_OFF && machine->clock_enabled) {
machine->clock_enabled = 0;
tegra_asoc_utils_clk_disable(&machine->util_data);
+ machine->bias_level = level;
}
- machine->bias_level = level;
return 0 ;
}