diff options
author | Chandrakanth <cgorantla@nvidia.com> | 2012-10-09 16:59:52 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-10-11 14:59:20 -0700 |
commit | 63ae7a23a7a00d2c830b9d37f93f754618ef43ec (patch) | |
tree | f4e6d2d1d14d998603550bf15f9051d17b6340d4 /sound | |
parent | f1b4b99e06f96a40b0c3c3cb4ac925cb75ce7014 (diff) |
asoc:tegra: disable ext1 clock in suspend
disable ext1 clock in suspend call and enable in resume. disabling
ext1 clock in bias enable/disable is not sufficient now
BUG 1052180
Change-Id: Iff588ac92c2d8cfe62b7a6c597c68b9f1215f64c
Signed-off-by: Chandrakanth <cgorantla@nvidia.com>
Reviewed-on: http://git-master/r/139375
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_max98088.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_max98088.c b/sound/soc/tegra/tegra_max98088.c index d1e9e411f278..3107d11d1f2e 100644 --- a/sound/soc/tegra/tegra_max98088.c +++ b/sound/soc/tegra/tegra_max98088.c @@ -1145,6 +1145,27 @@ static int tegra30_soc_set_bias_level_post(struct snd_soc_card *card, return 0 ; } +static int tegra_max98088_suspend_post(struct snd_soc_card *card) +{ + struct tegra_max98088 *machine = snd_soc_card_get_drvdata(card); + + if (machine->clock_enabled) + tegra_asoc_utils_clk_disable(&machine->util_data); + + return 0; + +} + +static int tegra_max98088_resume_pre(struct snd_soc_card *card) +{ + struct tegra_max98088 *machine = snd_soc_card_get_drvdata(card); + + if (!machine->clock_enabled) + tegra_asoc_utils_clk_enable(&machine->util_data); + + return 0; +} + static struct snd_soc_card snd_soc_tegra_max98088 = { .name = "tegra-max98088", .owner = THIS_MODULE, @@ -1152,6 +1173,8 @@ static struct snd_soc_card snd_soc_tegra_max98088 = { .num_links = ARRAY_SIZE(tegra_max98088_dai), .set_bias_level = tegra30_soc_set_bias_level, .set_bias_level_post = tegra30_soc_set_bias_level_post, + .suspend_post = tegra_max98088_suspend_post, + .resume_pre = tegra_max98088_resume_pre, }; static __devinit int tegra_max98088_driver_probe(struct platform_device *pdev) |